libatomic has mind of its own when it comes to setting -march for arm64 which conflicts with -mcpu option we pass from environment in some cases since we always pass -march/-mcpu in OE, its safe to remove this option
mcpu removal from cortex-a55 is no longer needed since the option conflict is now removed from libatomic instead Signed-off-by: Khem Raj <raj.k...@gmail.com> --- meta/recipes-devtools/gcc/gcc-10.1.inc | 1 + ...omic-Do-not-enforce-march-on-aarch64.patch | 42 +++++++++++++++++++ meta/recipes-devtools/gcc/gcc-runtime.inc | 4 -- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 meta/recipes-devtools/gcc/gcc-10.1/0039-libatomic-Do-not-enforce-march-on-aarch64.patch diff --git a/meta/recipes-devtools/gcc/gcc-10.1.inc b/meta/recipes-devtools/gcc/gcc-10.1.inc index 245f0a6fdb..82b5a20a42 100644 --- a/meta/recipes-devtools/gcc/gcc-10.1.inc +++ b/meta/recipes-devtools/gcc/gcc-10.1.inc @@ -66,6 +66,7 @@ SRC_URI = "\ file://0036-Enable-CET-in-cross-compiler-if-possible.patch \ file://0037-mingw32-Enable-operation_not_supported.patch \ file://0038-Revert-AArch64-Use-__getauxval-instead-of-getauxval-.patch \ + file://0039-libatomic-Do-not-enforce-march-on-aarch64.patch \ " SRC_URI[sha256sum] = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2" diff --git a/meta/recipes-devtools/gcc/gcc-10.1/0039-libatomic-Do-not-enforce-march-on-aarch64.patch b/meta/recipes-devtools/gcc/gcc-10.1/0039-libatomic-Do-not-enforce-march-on-aarch64.patch new file mode 100644 index 0000000000..fecb562f51 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-10.1/0039-libatomic-Do-not-enforce-march-on-aarch64.patch @@ -0,0 +1,42 @@ +From 411fc85c14bb14b07c0db807c55d25ce3f3e507f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.k...@gmail.com> +Date: Wed, 13 May 2020 15:10:38 -0700 +Subject: [PATCH] libatomic: Do not enforce march on aarch64 + +OE passes the right options via gcc compiler cmdline via TUNE_CCARGS +this can conflict between -mcpu settings and -march setting here, since +-mcpu will translate into an appropriate -march, lets depend on that +instead of setting it explicitly + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.k...@gmail.com> +--- + libatomic/Makefile.am | 1 - + libatomic/Makefile.in | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/libatomic/Makefile.am b/libatomic/Makefile.am +index 133fbbca77e..ac1ca645876 100644 +--- a/libatomic/Makefile.am ++++ b/libatomic/Makefile.am +@@ -125,7 +125,6 @@ libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix _$(s)_.lo,$(SIZEOBJS))) + ## On a target-specific basis, include alternates to be selected by IFUNC. + if HAVE_IFUNC + if ARCH_AARCH64_LINUX +-IFUNC_OPTIONS = -march=armv8-a+lse + libatomic_la_LIBADD += $(foreach s,$(SIZES),$(addsuffix _$(s)_1_.lo,$(SIZEOBJS))) + endif + if ARCH_ARM_LINUX +diff --git a/libatomic/Makefile.in b/libatomic/Makefile.in +index a51807e95c9..97df2d7ff03 100644 +--- a/libatomic/Makefile.in ++++ b/libatomic/Makefile.in +@@ -431,7 +431,6 @@ M_SRC = $(firstword $(filter %/$(M_FILE), $(all_c_files))) + libatomic_la_LIBADD = $(foreach s,$(SIZES),$(addsuffix \ + _$(s)_.lo,$(SIZEOBJS))) $(am__append_1) $(am__append_2) \ + $(am__append_3) $(am__append_4) +-@ARCH_AARCH64_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv8-a+lse + @ARCH_ARM_LINUX_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64 + @ARCH_I386_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -march=i586 + @ARCH_X86_64_TRUE@@HAVE_IFUNC_TRUE@IFUNC_OPTIONS = -mcx16 diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc index 38c1672876..e12c74613f 100644 --- a/meta/recipes-devtools/gcc/gcc-runtime.inc +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc @@ -18,10 +18,6 @@ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu" EXTRA_OECONF_append = " --cache-file=${B}/config.cache" EXTRA_OECONF_append_libc-newlib = " --with-newlib" -# cortex-a55 is ARMv8.2-a based but libatomic explicitly asks for -march=armv8.1-a -# which caused -march conflicts in gcc -TUNE_CCARGS_remove = "-mcpu=cortex-a55+crc -mcpu=cortex-a55 -mcpu=cortex-a55+crc+crypto" - # Disable ifuncs for libatomic on arm conflicts -march/-mcpu EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no " EXTRA_OECONF_append_armeb = " libat_cv_have_ifunc=no " -- 2.26.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#138245): https://lists.openembedded.org/g/openembedded-core/message/138245 Mute This Topic: https://lists.openembedded.org/mt/74199030/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-