libgcc: Create linux-musleabihf and linux-gnueabihf symlinks

Submitted by Khem Raj on April 4, 2019, 5:49 a.m. | Patch ID: 160125

Details

Message ID 20190404054932.38231-1-raj.khem@gmail.com
State New
Headers show

Commit Message

Khem Raj April 4, 2019, 5:49 a.m.
When we have hard-float ABI enabled, certain tools e.g. llvm/clang
expects the hf version of tuples for crt files from libgcc, therefore
create a symlink to help the cause.

This makes clang work with hard-float defaults on target

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/libgcc.inc | 7 +++++++
 1 file changed, 7 insertions(+)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index e4e0c48007..e008d14f36 100644
--- a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -11,6 +11,13 @@  do_install_append_class-target () {
 		esac
 		ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
 	fi
+	if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then
+		case "${TARGET_OS}" in
+			"linux-musleabi") extra_target_os="linux-musleabihf";;
+			"linux-gnueabi") extra_target_os="linux-gnueabihf";;
+		esac
+		ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
+	fi
 }
 
 PACKAGES = "\