Skip to contentSkip to conversation

Add gcc 9.1

PATCH Superseded Romain Naour 4 participants 29 messages May 6, 2019 – May 8, 2019 PowerPC

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Add gcc 9.1

Before adding gcc 9.1 [1] to Buildroot, add some fixes for issues discovered by toolchain-builder [2] that are trigged by this new compiler version. (disable powerpc Werror, uClibc-ng asm sparc and ARC glibc).

Then add gcc 9.1 for internal and extenal toolchain backend and switch gcc 8.x as default compiler.

Thanks to Yann E. MORIN for providing a patch series that add new ARM cores added by gcc 9.1.

Finally, enbable the new ork1 (openrisc) that will replace in the following series the old gcc fork (gcc 5.x).

[1] https://gcc.gnu.org/gcc-9/changes.html
[2] https://gitlab.com/kubu93/toolchains-builder/pipelines/59794237

Romain Naour (9):
package/glibc/arc: fix build issue with gcc-9.1 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >=

    9.1

[RFC] package/uclibc: remove asm constraint
arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9
toolchain: add gcc 9 entry
package/gcc: add support for gcc 9.1
toolchain-external: add gcc 9 entry
package/gcc: switch to gcc 8.x as the default
package/gcc: enable gcc 9.1 for ork1 (openrisc)

Yann E. MORIN (6):
arch/arm: move dependency on 64-bit down to individual cores arch/arm: some cores have a different name with gcc-9 arch/arm: saphira is in fact an armv8.4a
arch/arm: add two new 64-bit-only armv8a cores arch/arm: add two new cortex-based armv8.2a cores arch/arm: add two new non-cortex-based armv8.2a cores

 arch/Config.in                                     |   4 +
 arch/Config.in.arm                                 |  95 ++++-
 .../linux/linux-ppc-disable-werror.fragment        |   1 +
 configs/qemu_ppc64_e5500_defconfig                 |   2 +-
 configs/qemu_ppc64_pseries_defconfig               |   1 +
 configs/qemu_ppc64le_pseries_defconfig             |   1 +
 configs/qemu_ppc_g3beige_defconfig                 |   1 +
 configs/qemu_ppc_mpc8544ds_defconfig               |   1 +
 configs/qemu_ppc_virtex_ml507_defconfig            |   1 +
 package/gcc/Config.in.host                         |   8 +-
 package/gcc/gcc.hash                               |   2 +
 package/gcc/gcc.mk                                 |   4 +-
 ...0001-Add-support-for-GCC-9-attribute-copy.patch | 402 +++++++++++++++++++++
 ...FC-sparc-syscalls.h-remove-asm-constraint.patch |  46 +++
 toolchain/Config.in                                |   5 +
 .../toolchain-external-custom/Config.in.options    |   6 +
 16 files changed, 560 insertions(+), 20 deletions(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
 create mode 100644 package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
 create mode 100644 package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
Signature · 1 line
2.14.5
#1 lore raw

PATCH 1/15 package/glibc/arc: fix build issue with gcc-9.1

Backport from upstream [1] to fix build issue with glibc arc-2018.09-release (based on glibc 2.28) and gcc 9.1 [2]]

Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1626a1cfcd6ba1cc64721be1036c2873211d499b
[2] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435682

Cc Alexey Brodkin <[email protected]>
Cc Evgeniy Didin <[email protected]>
Cc Eugeniy Paltsev <[email protected]>
---
 ...0001-Add-support-for-GCC-9-attribute-copy.patch | 402 +++++++++++++++++++++
 1 file changed, 402 insertions(+)
 create mode 100644 package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch new file +402 -0
new file mode 100644
index 0000000000..635ba97ec3
@@ -0,0 +1,402 @@
+From 79937801dfe4d86f0cc813ab41dd541ad729a267 Mon Sep 17 00:00:00 2001
+From: Martin Sebor <[email protected]>
+Date: Fri, 9 Nov 2018 17:24:12 -0700
+Subject: [PATCH] Add support for GCC 9 attribute copy.
+
+GCC 9 has gained an enhancement to help detect attribute mismatches
+between alias declarations and their targets.  It consists of a new
+warning, -Wattribute-alias, an enhancement to an existing warning,
+-Wmissing-attributes, and a new attribute called copy.
+
+The purpose of the warnings is to help identify either possible bugs
+(an alias declared with more restrictive attributes than its target
+promises) or optimization or diagnostic opportunities (an alias target
+missing some attributes that it could be declared with that might
+benefit analysis and code generation).  The purpose of the new
+attribute is to easily apply (almost) the same set of attributes
+to one declaration as those already present on another.
+
+As expected (and intended) the enhancement triggers warnings for
+many alias declarations in Glibc code.  This change, tested on
+x86_64-linux, avoids all instances of the new warnings by making
+use of the attribute where appropriate.  To fully benefit from
+the enhancement Glibc will need to be compiled with
+ -Wattribute-alias=2 and remaining warnings reviewed and dealt with
+(there are a couple of thousand but most should be straightforward
+to deal with).
+
+ChangeLog:
+
+	* include/libc-symbols.h (__attribute_copy__): Define macro unless
+	it's already defined.
+	(_strong_alias): Use __attribute_copy__.
+	(_weak_alias,  __hidden_ver1,  __hidden_nolink2): Same.
+	* misc/sys/cdefs.h (__attribute_copy__): New macro.
+	* sysdeps/x86_64/multiarch/memchr.c (memchr): Use __attribute_copy__.
+	* sysdeps/x86_64/multiarch/memcmp.c (memcmp): Same.
+	* sysdeps/x86_64/multiarch/mempcpy.c (mempcpy): Same.
+	* sysdeps/x86_64/multiarch/memset.c (memset): Same.
+	* sysdeps/x86_64/multiarch/stpcpy.c (stpcpy): Same.
+	* sysdeps/x86_64/multiarch/strcat.c (strcat): Same.
+	* sysdeps/x86_64/multiarch/strchr.c (strchr): Same.
+	* sysdeps/x86_64/multiarch/strcmp.c (strcmp): Same.
+	* sysdeps/x86_64/multiarch/strcpy.c (strcpy): Same.
+	* sysdeps/x86_64/multiarch/strcspn.c (strcspn): Same.
+	* sysdeps/x86_64/multiarch/strlen.c (strlen): Same.
+	* sysdeps/x86_64/multiarch/strncmp.c (strncmp): Same.
+	* sysdeps/x86_64/multiarch/strncpy.c (strncpy): Same.
+	* sysdeps/x86_64/multiarch/strnlen.c (strnlen): Same.
+	* sysdeps/x86_64/multiarch/strpbrk.c (strpbrk): Same.
+	* sysdeps/x86_64/multiarch/strrchr.c (strrchr): Same.
+	* sysdeps/x86_64/multiarch/strspn.c (strspn): Same.
+
+[Romain:
+    Backport from upstream [1] to fix build issue with glibc arc-2018.09-release
+    (based on glibc 2.28) and gcc 9.1 [2]]
+
+Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1626a1cfcd6ba1cc64721be1036c2873211d499b
+[2] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435682
+
+Signed-off-by: Romain Naour <[email protected]>
+Cc: Alexey Brodkin <[email protected]>
+Cc: Evgeniy Didin <[email protected]>
+Cc: Eugeniy Paltsev <[email protected]>
+---
+ include/libc-symbols.h             | 20 +++++++++++++++-----
+ misc/sys/cdefs.h                   | 10 ++++++++++
+ sysdeps/x86_64/multiarch/memchr.c  |  2 +-
+ sysdeps/x86_64/multiarch/memcmp.c  |  2 +-
+ sysdeps/x86_64/multiarch/mempcpy.c |  4 ++--
+ sysdeps/x86_64/multiarch/memset.c  |  2 +-
+ sysdeps/x86_64/multiarch/stpcpy.c  |  4 ++--
+ sysdeps/x86_64/multiarch/strcat.c  |  2 +-
+ sysdeps/x86_64/multiarch/strchr.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcmp.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcpy.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcspn.c |  2 +-
+ sysdeps/x86_64/multiarch/strlen.c  |  2 +-
+ sysdeps/x86_64/multiarch/strncat.c |  2 +-
+ sysdeps/x86_64/multiarch/strncmp.c |  2 +-
+ sysdeps/x86_64/multiarch/strncpy.c |  2 +-
+ sysdeps/x86_64/multiarch/strnlen.c |  4 ++--
+ sysdeps/x86_64/multiarch/strpbrk.c |  2 +-
+ sysdeps/x86_64/multiarch/strrchr.c |  2 +-
+ sysdeps/x86_64/multiarch/strspn.c  |  2 +-
+ 20 files changed, 46 insertions(+), 26 deletions(-)
+
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 8b9273c13a..e71a479e84 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -125,6 +125,11 @@
+ # define ASM_LINE_SEP ;
+ #endif
+ 
++#ifndef __attribute_copy__
++/* Provide an empty definition when cdefs.h is not included.  */
++# define __attribute_copy__(arg)
++#endif
++
+ #ifndef __ASSEMBLER__
+ /* GCC understands weak symbols and aliases; use its interface where
+    possible, instead of embedded assembly language.  */
+@@ -132,7 +137,8 @@
+ /* Define ALIASNAME as a strong alias for NAME.  */
+ # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
+ # define _strong_alias(name, aliasname) \
+-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
++  extern __typeof (name) aliasname __attribute__ ((alias (#name))) \
++    __attribute_copy__ (name);
+ 
+ /* This comes between the return type and function name in
+    a function definition to make that definition weak.  */
+@@ -143,14 +149,16 @@
+    If weak aliases are not available, this defines a strong alias.  */
+ # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
+ # define _weak_alias(name, aliasname) \
+-  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
++  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
++    __attribute_copy__ (name);
+ 
+ /* Same as WEAK_ALIAS, but mark symbol as hidden.  */
+ # define weak_hidden_alias(name, aliasname) \
+   _weak_hidden_alias (name, aliasname)
+ # define _weak_hidden_alias(name, aliasname) \
+   extern __typeof (name) aliasname \
+-    __attribute__ ((weak, alias (#name), __visibility__ ("hidden")));
++    __attribute__ ((weak, alias (#name), __visibility__ ("hidden"))) \
++    __attribute_copy__ (name);
+ 
+ /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */
+ # define weak_extern(symbol) _weak_extern (weak symbol)
+@@ -532,7 +540,8 @@ for linking")
+ #  define __hidden_ver1(local, internal, name) \
+   extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
+   extern __typeof (name) __EI_##name \
+-	__attribute__((alias (__hidden_asmname (#local))))
++    __attribute__((alias (__hidden_asmname (#local))))	\
++    __attribute_copy__ (name)
+ #  define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name);
+ #  define hidden_data_ver(local, name)	hidden_ver(local, name)
+ #  define hidden_def(name)		__hidden_ver1(__GI_##name, name, name);
+@@ -545,7 +554,8 @@ for linking")
+ #  define __hidden_nolink1(local, internal, name, version) \
+   __hidden_nolink2 (local, internal, name, version)
+ #  define __hidden_nolink2(local, internal, name, version) \
+-  extern __typeof (name) internal __attribute__ ((alias (#local))); \
++  extern __typeof (name) internal __attribute__ ((alias (#local)))	\
++    __attribute_copy__ (name);						\
+   __hidden_nolink3 (local, internal, #name "@" #version)
+ #  define __hidden_nolink3(local, internal, vername) \
+   __asm__ (".symver " #internal ", " vername);
+diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
+index 3f6fe3cc85..8d585680a6 100644
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -431,6 +431,16 @@
+ # define __attribute_nonstring__
+ #endif
+ 
++/* Undefine (also defined in libc-symbols.h).  */
++#undef __attribute_copy__
++#if __GNUC_PREREQ (9, 0)
++/* Copies attributes from the declaration or type referenced by
++   the argument.  */
++# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
++#else
++# define __attribute_copy__(arg)
++#endif
++
+ #if (!defined _Static_assert && !defined __cplusplus \
+      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+      && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+diff --git a/sysdeps/x86_64/multiarch/memchr.c b/sysdeps/x86_64/multiarch/memchr.c
+index 016f57846a..372dd7784a 100644
+--- a/sysdeps/x86_64/multiarch/memchr.c
++++ b/sysdeps/x86_64/multiarch/memchr.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ());
+ strong_alias (memchr, __memchr)
+ # ifdef SHARED
+ __hidden_ver1 (memchr, __GI_memchr, __redirect_memchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (memchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/memcmp.c b/sysdeps/x86_64/multiarch/memcmp.c
+index 6f3ca43128..bbd3b01ed8 100644
+--- a/sysdeps/x86_64/multiarch/memcmp.c
++++ b/sysdeps/x86_64/multiarch/memcmp.c
+@@ -32,6 +32,6 @@ weak_alias (memcmp, bcmp)
+ 
+ # ifdef SHARED
+ __hidden_ver1 (memcmp, __GI_memcmp, __redirect_memcmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memcmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/mempcpy.c b/sysdeps/x86_64/multiarch/mempcpy.c
+index 9fe41dda82..d2f7928ae4 100644
+--- a/sysdeps/x86_64/multiarch/mempcpy.c
++++ b/sysdeps/x86_64/multiarch/mempcpy.c
+@@ -35,8 +35,8 @@ libc_ifunc_redirected (__redirect_mempcpy, __mempcpy, IFUNC_SELECTOR ());
+ weak_alias (__mempcpy, mempcpy)
+ # ifdef SHARED
+ __hidden_ver1 (__mempcpy, __GI___mempcpy, __redirect___mempcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+ __hidden_ver1 (mempcpy, __GI_mempcpy, __redirect_mempcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/memset.c b/sysdeps/x86_64/multiarch/memset.c
+index 064841d5fc..4b8f57ffaa 100644
+--- a/sysdeps/x86_64/multiarch/memset.c
++++ b/sysdeps/x86_64/multiarch/memset.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memset, memset, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (memset, __GI_memset, __redirect_memset)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memset);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/stpcpy.c b/sysdeps/x86_64/multiarch/stpcpy.c
+index 1e340fca99..f74a54b153 100644
+--- a/sysdeps/x86_64/multiarch/stpcpy.c
++++ b/sysdeps/x86_64/multiarch/stpcpy.c
+@@ -35,8 +35,8 @@ libc_ifunc_redirected (__redirect_stpcpy, __stpcpy, IFUNC_SELECTOR ());
+ weak_alias (__stpcpy, stpcpy)
+ # ifdef SHARED
+ __hidden_ver1 (__stpcpy, __GI___stpcpy, __redirect___stpcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+ __hidden_ver1 (stpcpy, __GI_stpcpy, __redirect_stpcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcat.c b/sysdeps/x86_64/multiarch/strcat.c
+index 1f7f6263f3..1922c0a0da 100644
+--- a/sysdeps/x86_64/multiarch/strcat.c
++++ b/sysdeps/x86_64/multiarch/strcat.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcat, strcat, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcat, __GI_strcat, __redirect_strcat)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcat);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strchr.c b/sysdeps/x86_64/multiarch/strchr.c
+index 76d64fb378..87e99ba82a 100644
+--- a/sysdeps/x86_64/multiarch/strchr.c
++++ b/sysdeps/x86_64/multiarch/strchr.c
+@@ -50,6 +50,6 @@ libc_ifunc_redirected (__redirect_strchr, strchr, IFUNC_SELECTOR ());
+ weak_alias (strchr, index)
+ # ifdef SHARED
+ __hidden_ver1 (strchr, __GI_strchr, __redirect_strchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcmp.c b/sysdeps/x86_64/multiarch/strcmp.c
+index b903e418df..e3cf39d2c5 100644
+--- a/sysdeps/x86_64/multiarch/strcmp.c
++++ b/sysdeps/x86_64/multiarch/strcmp.c
+@@ -54,6 +54,6 @@ libc_ifunc_redirected (__redirect_strcmp, strcmp, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcmp, __GI_strcmp, __redirect_strcmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcpy.c b/sysdeps/x86_64/multiarch/strcpy.c
+index 12e0e3ffe2..ce819dd232 100644
+--- a/sysdeps/x86_64/multiarch/strcpy.c
++++ b/sysdeps/x86_64/multiarch/strcpy.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcpy, strcpy, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcpy, __GI_strcpy, __redirect_strcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcspn.c b/sysdeps/x86_64/multiarch/strcspn.c
+index 9712e8410c..9d9652627c 100644
+--- a/sysdeps/x86_64/multiarch/strcspn.c
++++ b/sysdeps/x86_64/multiarch/strcspn.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcspn, strcspn, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcspn, __GI_strcspn, __redirect_strcspn)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcspn);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strlen.c b/sysdeps/x86_64/multiarch/strlen.c
+index 1758d22b8f..a2307409d9 100644
+--- a/sysdeps/x86_64/multiarch/strlen.c
++++ b/sysdeps/x86_64/multiarch/strlen.c
+@@ -29,6 +29,6 @@
+ libc_ifunc_redirected (__redirect_strlen, strlen, IFUNC_SELECTOR ());
+ # ifdef SHARED
+ __hidden_ver1 (strlen, __GI_strlen, __redirect_strlen)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strlen);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncat.c b/sysdeps/x86_64/multiarch/strncat.c
+index 841c165565..2546277450 100644
+--- a/sysdeps/x86_64/multiarch/strncat.c
++++ b/sysdeps/x86_64/multiarch/strncat.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strncat, strncat, IFUNC_SELECTOR ());
+ strong_alias (strncat, __strncat);
+ # ifdef SHARED
+ __hidden_ver1 (strncat, __GI___strncat, __redirect_strncat)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strncat);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncmp.c b/sysdeps/x86_64/multiarch/strncmp.c
+index 02b6d0b6f5..32f5c6c6c7 100644
+--- a/sysdeps/x86_64/multiarch/strncmp.c
++++ b/sysdeps/x86_64/multiarch/strncmp.c
+@@ -55,6 +55,6 @@ libc_ifunc_redirected (__redirect_strncmp, strncmp, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strncmp, __GI_strncmp, __redirect_strncmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncpy.c b/sysdeps/x86_64/multiarch/strncpy.c
+index 3c3de8b18e..37aae2c3ba 100644
+--- a/sysdeps/x86_64/multiarch/strncpy.c
++++ b/sysdeps/x86_64/multiarch/strncpy.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strncpy, strncpy, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strncpy, __GI_strncpy, __redirect_strncpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strnlen.c b/sysdeps/x86_64/multiarch/strnlen.c
+index 3ab94ce230..9d64335fc2 100644
+--- a/sysdeps/x86_64/multiarch/strnlen.c
++++ b/sysdeps/x86_64/multiarch/strnlen.c
+@@ -32,8 +32,8 @@ libc_ifunc_redirected (__redirect_strnlen, __strnlen, IFUNC_SELECTOR ());
+ weak_alias (__strnlen, strnlen);
+ # ifdef SHARED
+ __hidden_ver1 (__strnlen, __GI___strnlen, __redirect___strnlen)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strnlen);
+ __hidden_ver1 (strnlen, __GI_strnlen, __redirect_strnlen)
+-  __attribute__((weak, visibility ("hidden")));
++  __attribute__((weak, visibility ("hidden"))) __attribute_copy__ (strnlen);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strpbrk.c b/sysdeps/x86_64/multiarch/strpbrk.c
+index a0d435a504..f1103678b6 100644
+--- a/sysdeps/x86_64/multiarch/strpbrk.c
++++ b/sysdeps/x86_64/multiarch/strpbrk.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strpbrk, strpbrk, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strpbrk, __GI_strpbrk, __redirect_strpbrk)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strpbrk);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strrchr.c b/sysdeps/x86_64/multiarch/strrchr.c
+index a719edde10..ba7458a7d6 100644
+--- a/sysdeps/x86_64/multiarch/strrchr.c
++++ b/sysdeps/x86_64/multiarch/strrchr.c
+@@ -29,6 +29,6 @@ libc_ifunc_redirected (__redirect_strrchr, strrchr, IFUNC_SELECTOR ());
+ weak_alias (strrchr, rindex);
+ # ifdef SHARED
+ __hidden_ver1 (strrchr, __GI_strrchr, __redirect_strrchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strrchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strspn.c b/sysdeps/x86_64/multiarch/strspn.c
+index 56ab4d9558..5b9654e16c 100644
+--- a/sysdeps/x86_64/multiarch/strspn.c
++++ b/sysdeps/x86_64/multiarch/strspn.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strspn, strspn, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strspn, __GI_strspn, __redirect_strspn)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strspn);
+ # endif
+ #endif
+-- 
+2.14.5
+
Signature · 1 line
2.14.5
#2 lore raw

PATCH 1/15 package/glibc/arc: fix build issue with gcc-9.1

Romain, All,

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 5 lines

Backport from upstream [1] to fix build issue with glibc arc-2018.09-release (based on glibc 2.28) and gcc 9.1 [2]]

Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.

So, here is a small summary of my discussion with Romain on IRC:

- this patch touches mostly x86_64 files, so I was puzzled why it had

    to be applied to the arc fork;

- however, that patch also touxphces teo generic headers; in there the new __attribute_copy__() macro is defined *and* used to complement existing attribute-related macros.

So, it is not much the x86_64 part we're interested in, but the generic two headers, which changes percolate to the various functions via the various attribute macros...

So, for other reviewers: just ignore the x86_64 part.

Romain: what do you think about this: remove those x86_64 files from the patch, and update the soh-line as... (see below)

Quoted 18 lines

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1626a1cfcd6ba1cc64721be1036c2873211d499b
[2] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435682

Cc Alexey Brodkin <[email protected]>
Cc Evgeniy Didin <[email protected]>
Cc Eugeniy Paltsev <[email protected]>
---
 ...0001-Add-support-for-GCC-9-attribute-copy.patch | 402 +++++++++++++++++++++
 1 file changed, 402 insertions(+)
 create mode 100644 package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch new file +0 -0
new file mode 100644
index 0000000000..635ba97ec3

package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch line 4

Quoted 4 lines
package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch new file +4 -0
@@ -0,0 +1,402 @@
+From 79937801dfe4d86f0cc813ab41dd541ad729a267 Mon Sep 17 00:00:00 2001
+From: Martin Sebor <[email protected]>
+Date: Fri, 9 Nov 2018 17:24:12 -0700
+Subject: [PATCH] Add support for GCC 9 attribute copy.

[--SNIP--]

package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch line 55

Quoted 3 lines
package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch new file +3 -0
+[Romain:
+    Backport from upstream [1] to fix build issue with glibc arc-2018.09-release
+    (based on glibc 2.28) and gcc 9.1 [2]]

Here also add;

[Romain:
- Backport from upstream [1] to fix build issue with glibc arc-2018.09-release (based on glibc 2.28) and gcc 9.1 [2]]
- Also drop the x86-64 related hunks to avoid confusion.
]

Regards,
Yann E. MORIN.

Quoted 353 lines
package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch new file +346 -0
+Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=1626a1cfcd6ba1cc64721be1036c2873211d499b
+[2] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435682
+
+Signed-off-by: Romain Naour <[email protected]>
+Cc: Alexey Brodkin <[email protected]>
+Cc: Evgeniy Didin <[email protected]>
+Cc: Eugeniy Paltsev <[email protected]>
+---
+ include/libc-symbols.h             | 20 +++++++++++++++-----
+ misc/sys/cdefs.h                   | 10 ++++++++++
+ sysdeps/x86_64/multiarch/memchr.c  |  2 +-
+ sysdeps/x86_64/multiarch/memcmp.c  |  2 +-
+ sysdeps/x86_64/multiarch/mempcpy.c |  4 ++--
+ sysdeps/x86_64/multiarch/memset.c  |  2 +-
+ sysdeps/x86_64/multiarch/stpcpy.c  |  4 ++--
+ sysdeps/x86_64/multiarch/strcat.c  |  2 +-
+ sysdeps/x86_64/multiarch/strchr.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcmp.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcpy.c  |  2 +-
+ sysdeps/x86_64/multiarch/strcspn.c |  2 +-
+ sysdeps/x86_64/multiarch/strlen.c  |  2 +-
+ sysdeps/x86_64/multiarch/strncat.c |  2 +-
+ sysdeps/x86_64/multiarch/strncmp.c |  2 +-
+ sysdeps/x86_64/multiarch/strncpy.c |  2 +-
+ sysdeps/x86_64/multiarch/strnlen.c |  4 ++--
+ sysdeps/x86_64/multiarch/strpbrk.c |  2 +-
+ sysdeps/x86_64/multiarch/strrchr.c |  2 +-
+ sysdeps/x86_64/multiarch/strspn.c  |  2 +-
+ 20 files changed, 46 insertions(+), 26 deletions(-)
+
+diff --git a/include/libc-symbols.h b/include/libc-symbols.h
+index 8b9273c13a..e71a479e84 100644
+--- a/include/libc-symbols.h
++++ b/include/libc-symbols.h
+@@ -125,6 +125,11 @@
+ # define ASM_LINE_SEP ;
+ #endif
+ 
++#ifndef __attribute_copy__
++/* Provide an empty definition when cdefs.h is not included.  */
++# define __attribute_copy__(arg)
++#endif
++
+ #ifndef __ASSEMBLER__
+ /* GCC understands weak symbols and aliases; use its interface where
+    possible, instead of embedded assembly language.  */
+@@ -132,7 +137,8 @@
+ /* Define ALIASNAME as a strong alias for NAME.  */
+ # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
+ # define _strong_alias(name, aliasname) \
+-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
++  extern __typeof (name) aliasname __attribute__ ((alias (#name))) \
++    __attribute_copy__ (name);
+ 
+ /* This comes between the return type and function name in
+    a function definition to make that definition weak.  */
+@@ -143,14 +149,16 @@
+    If weak aliases are not available, this defines a strong alias.  */
+ # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
+ # define _weak_alias(name, aliasname) \
+-  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
++  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) \
++    __attribute_copy__ (name);
+ 
+ /* Same as WEAK_ALIAS, but mark symbol as hidden.  */
+ # define weak_hidden_alias(name, aliasname) \
+   _weak_hidden_alias (name, aliasname)
+ # define _weak_hidden_alias(name, aliasname) \
+   extern __typeof (name) aliasname \
+-    __attribute__ ((weak, alias (#name), __visibility__ ("hidden")));
++    __attribute__ ((weak, alias (#name), __visibility__ ("hidden"))) \
++    __attribute_copy__ (name);
+ 
+ /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */
+ # define weak_extern(symbol) _weak_extern (weak symbol)
+@@ -532,7 +540,8 @@ for linking")
+ #  define __hidden_ver1(local, internal, name) \
+   extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
+   extern __typeof (name) __EI_##name \
+-	__attribute__((alias (__hidden_asmname (#local))))
++    __attribute__((alias (__hidden_asmname (#local))))	\
++    __attribute_copy__ (name)
+ #  define hidden_ver(local, name)	__hidden_ver1(local, __GI_##name, name);
+ #  define hidden_data_ver(local, name)	hidden_ver(local, name)
+ #  define hidden_def(name)		__hidden_ver1(__GI_##name, name, name);
+@@ -545,7 +554,8 @@ for linking")
+ #  define __hidden_nolink1(local, internal, name, version) \
+   __hidden_nolink2 (local, internal, name, version)
+ #  define __hidden_nolink2(local, internal, name, version) \
+-  extern __typeof (name) internal __attribute__ ((alias (#local))); \
++  extern __typeof (name) internal __attribute__ ((alias (#local)))	\
++    __attribute_copy__ (name);						\
+   __hidden_nolink3 (local, internal, #name "@" #version)
+ #  define __hidden_nolink3(local, internal, vername) \
+   __asm__ (".symver " #internal ", " vername);
+diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
+index 3f6fe3cc85..8d585680a6 100644
+--- a/misc/sys/cdefs.h
++++ b/misc/sys/cdefs.h
+@@ -431,6 +431,16 @@
+ # define __attribute_nonstring__
+ #endif
+ 
++/* Undefine (also defined in libc-symbols.h).  */
++#undef __attribute_copy__
++#if __GNUC_PREREQ (9, 0)
++/* Copies attributes from the declaration or type referenced by
++   the argument.  */
++# define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
++#else
++# define __attribute_copy__(arg)
++#endif
++
+ #if (!defined _Static_assert && !defined __cplusplus \
+      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+      && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__))
+diff --git a/sysdeps/x86_64/multiarch/memchr.c b/sysdeps/x86_64/multiarch/memchr.c
+index 016f57846a..372dd7784a 100644
+--- a/sysdeps/x86_64/multiarch/memchr.c
++++ b/sysdeps/x86_64/multiarch/memchr.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memchr, memchr, IFUNC_SELECTOR ());
+ strong_alias (memchr, __memchr)
+ # ifdef SHARED
+ __hidden_ver1 (memchr, __GI_memchr, __redirect_memchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (memchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/memcmp.c b/sysdeps/x86_64/multiarch/memcmp.c
+index 6f3ca43128..bbd3b01ed8 100644
+--- a/sysdeps/x86_64/multiarch/memcmp.c
++++ b/sysdeps/x86_64/multiarch/memcmp.c
+@@ -32,6 +32,6 @@ weak_alias (memcmp, bcmp)
+ 
+ # ifdef SHARED
+ __hidden_ver1 (memcmp, __GI_memcmp, __redirect_memcmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memcmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/mempcpy.c b/sysdeps/x86_64/multiarch/mempcpy.c
+index 9fe41dda82..d2f7928ae4 100644
+--- a/sysdeps/x86_64/multiarch/mempcpy.c
++++ b/sysdeps/x86_64/multiarch/mempcpy.c
+@@ -35,8 +35,8 @@ libc_ifunc_redirected (__redirect_mempcpy, __mempcpy, IFUNC_SELECTOR ());
+ weak_alias (__mempcpy, mempcpy)
+ # ifdef SHARED
+ __hidden_ver1 (__mempcpy, __GI___mempcpy, __redirect___mempcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+ __hidden_ver1 (mempcpy, __GI_mempcpy, __redirect_mempcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/memset.c b/sysdeps/x86_64/multiarch/memset.c
+index 064841d5fc..4b8f57ffaa 100644
+--- a/sysdeps/x86_64/multiarch/memset.c
++++ b/sysdeps/x86_64/multiarch/memset.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_memset, memset, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (memset, __GI_memset, __redirect_memset)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memset);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/stpcpy.c b/sysdeps/x86_64/multiarch/stpcpy.c
+index 1e340fca99..f74a54b153 100644
+--- a/sysdeps/x86_64/multiarch/stpcpy.c
++++ b/sysdeps/x86_64/multiarch/stpcpy.c
+@@ -35,8 +35,8 @@ libc_ifunc_redirected (__redirect_stpcpy, __stpcpy, IFUNC_SELECTOR ());
+ weak_alias (__stpcpy, stpcpy)
+ # ifdef SHARED
+ __hidden_ver1 (__stpcpy, __GI___stpcpy, __redirect___stpcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+ __hidden_ver1 (stpcpy, __GI_stpcpy, __redirect_stpcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcat.c b/sysdeps/x86_64/multiarch/strcat.c
+index 1f7f6263f3..1922c0a0da 100644
+--- a/sysdeps/x86_64/multiarch/strcat.c
++++ b/sysdeps/x86_64/multiarch/strcat.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcat, strcat, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcat, __GI_strcat, __redirect_strcat)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcat);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strchr.c b/sysdeps/x86_64/multiarch/strchr.c
+index 76d64fb378..87e99ba82a 100644
+--- a/sysdeps/x86_64/multiarch/strchr.c
++++ b/sysdeps/x86_64/multiarch/strchr.c
+@@ -50,6 +50,6 @@ libc_ifunc_redirected (__redirect_strchr, strchr, IFUNC_SELECTOR ());
+ weak_alias (strchr, index)
+ # ifdef SHARED
+ __hidden_ver1 (strchr, __GI_strchr, __redirect_strchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcmp.c b/sysdeps/x86_64/multiarch/strcmp.c
+index b903e418df..e3cf39d2c5 100644
+--- a/sysdeps/x86_64/multiarch/strcmp.c
++++ b/sysdeps/x86_64/multiarch/strcmp.c
+@@ -54,6 +54,6 @@ libc_ifunc_redirected (__redirect_strcmp, strcmp, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcmp, __GI_strcmp, __redirect_strcmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcpy.c b/sysdeps/x86_64/multiarch/strcpy.c
+index 12e0e3ffe2..ce819dd232 100644
+--- a/sysdeps/x86_64/multiarch/strcpy.c
++++ b/sysdeps/x86_64/multiarch/strcpy.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcpy, strcpy, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcpy, __GI_strcpy, __redirect_strcpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strcspn.c b/sysdeps/x86_64/multiarch/strcspn.c
+index 9712e8410c..9d9652627c 100644
+--- a/sysdeps/x86_64/multiarch/strcspn.c
++++ b/sysdeps/x86_64/multiarch/strcspn.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strcspn, strcspn, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strcspn, __GI_strcspn, __redirect_strcspn)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcspn);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strlen.c b/sysdeps/x86_64/multiarch/strlen.c
+index 1758d22b8f..a2307409d9 100644
+--- a/sysdeps/x86_64/multiarch/strlen.c
++++ b/sysdeps/x86_64/multiarch/strlen.c
+@@ -29,6 +29,6 @@
+ libc_ifunc_redirected (__redirect_strlen, strlen, IFUNC_SELECTOR ());
+ # ifdef SHARED
+ __hidden_ver1 (strlen, __GI_strlen, __redirect_strlen)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strlen);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncat.c b/sysdeps/x86_64/multiarch/strncat.c
+index 841c165565..2546277450 100644
+--- a/sysdeps/x86_64/multiarch/strncat.c
++++ b/sysdeps/x86_64/multiarch/strncat.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strncat, strncat, IFUNC_SELECTOR ());
+ strong_alias (strncat, __strncat);
+ # ifdef SHARED
+ __hidden_ver1 (strncat, __GI___strncat, __redirect_strncat)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strncat);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncmp.c b/sysdeps/x86_64/multiarch/strncmp.c
+index 02b6d0b6f5..32f5c6c6c7 100644
+--- a/sysdeps/x86_64/multiarch/strncmp.c
++++ b/sysdeps/x86_64/multiarch/strncmp.c
+@@ -55,6 +55,6 @@ libc_ifunc_redirected (__redirect_strncmp, strncmp, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strncmp, __GI_strncmp, __redirect_strncmp)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncmp);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strncpy.c b/sysdeps/x86_64/multiarch/strncpy.c
+index 3c3de8b18e..37aae2c3ba 100644
+--- a/sysdeps/x86_64/multiarch/strncpy.c
++++ b/sysdeps/x86_64/multiarch/strncpy.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strncpy, strncpy, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strncpy, __GI_strncpy, __redirect_strncpy)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncpy);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strnlen.c b/sysdeps/x86_64/multiarch/strnlen.c
+index 3ab94ce230..9d64335fc2 100644
+--- a/sysdeps/x86_64/multiarch/strnlen.c
++++ b/sysdeps/x86_64/multiarch/strnlen.c
+@@ -32,8 +32,8 @@ libc_ifunc_redirected (__redirect_strnlen, __strnlen, IFUNC_SELECTOR ());
+ weak_alias (__strnlen, strnlen);
+ # ifdef SHARED
+ __hidden_ver1 (__strnlen, __GI___strnlen, __redirect___strnlen)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strnlen);
+ __hidden_ver1 (strnlen, __GI_strnlen, __redirect_strnlen)
+-  __attribute__((weak, visibility ("hidden")));
++  __attribute__((weak, visibility ("hidden"))) __attribute_copy__ (strnlen);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strpbrk.c b/sysdeps/x86_64/multiarch/strpbrk.c
+index a0d435a504..f1103678b6 100644
+--- a/sysdeps/x86_64/multiarch/strpbrk.c
++++ b/sysdeps/x86_64/multiarch/strpbrk.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strpbrk, strpbrk, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strpbrk, __GI_strpbrk, __redirect_strpbrk)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strpbrk);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strrchr.c b/sysdeps/x86_64/multiarch/strrchr.c
+index a719edde10..ba7458a7d6 100644
+--- a/sysdeps/x86_64/multiarch/strrchr.c
++++ b/sysdeps/x86_64/multiarch/strrchr.c
+@@ -29,6 +29,6 @@ libc_ifunc_redirected (__redirect_strrchr, strrchr, IFUNC_SELECTOR ());
+ weak_alias (strrchr, rindex);
+ # ifdef SHARED
+ __hidden_ver1 (strrchr, __GI_strrchr, __redirect_strrchr)
+-  __attribute__((visibility ("hidden")));
++  __attribute__((visibility ("hidden"))) __attribute_copy__ (strrchr);
+ # endif
+ #endif
+diff --git a/sysdeps/x86_64/multiarch/strspn.c b/sysdeps/x86_64/multiarch/strspn.c
+index 56ab4d9558..5b9654e16c 100644
+--- a/sysdeps/x86_64/multiarch/strspn.c
++++ b/sysdeps/x86_64/multiarch/strspn.c
+@@ -30,6 +30,6 @@ libc_ifunc_redirected (__redirect_strspn, strspn, IFUNC_SELECTOR ());
+ 
+ # ifdef SHARED
+ __hidden_ver1 (strspn, __GI_strspn, __redirect_strspn)
+-  __attribute__ ((visibility ("hidden")));
++  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strspn);
+ # endif
+ #endif
+-- 
+2.14.5
+
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/15 package/glibc/arc: fix build issue with gcc-9.1

Hi Romain, Yann, all,

Quoted 26 lines

-----Original Message-----
From: Yann E. MORIN <[email protected]> On Behalf Of Yann E. MORIN
Sent: Monday, May 6, 2019 10:41 PM
To: Romain Naour <[email protected]>
Cc: buildroot at buildroot.org; Evgeniy Didin <[email protected]>; Alexey Brodkin <[email protected]>; Eugeniy Paltsev <[email protected]>
Subject: Re: [Buildroot] [PATCH 01/15] package/glibc/arc: fix build issue with gcc-9.1

Romain, All,

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 5 lines

Backport from upstream [1] to fix build issue with glibc arc-2018.09-release (based on glibc 2.28) and gcc 9.1 [2]]

Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.

So, here is a small summary of my discussion with Romain on IRC:

- this patch touches mostly x86_64 files, so I was puzzled why it had

    to be applied to the arc fork;

- however, that patch also touxphces teo generic headers; in there the new __attribute_copy__() macro is defined *and* used to complement existing attribute-related macros.

Quoted 8 lines

So, it is not much the x86_64 part we're interested in, but the generic two headers, which changes percolate to the various functions via the various attribute macros...

So, for other reviewers: just ignore the x86_64 part.

Romain: what do you think about this: remove those x86_64 files from the patch, and update the soh-line as... (see below)

First of all thanks a lot for fixing stuff for ARC.
Also pls pardon my late reply - there were long May holidays Russia and a lot of people including myself were enjoying anything but work :)

Now given we're about to cut ARC 2019.03 release of our tools which among other things has Glibc rebased on upstream 2.29 version this particular fix won't be required at all.

So let us post ARC toolchain bump to 2019.03-RC1 ASAP.

Also with GCC 9.1 out of the door we have pretty much all our changes right in upstream release tarball so hopefully even ARC fork won't be that important any longer and we'll try to use upstream GCC by default.

-Alexey

P.S. Romain I'm really sorry for letting you do that extra yet not very
useful work!

#4 lore raw

PATCH 1/15 package/glibc/arc: fix build issue with gcc-9.1

Hi Alexey, All,

Le 08/05/2019 ? 13:12, Alexey Brodkin a ?crit?:

Quoted 32 lines

Hi Romain, Yann, all,

Quoted 30 lines

-----Original Message-----
From: Yann E. MORIN <[email protected]> On Behalf Of Yann E. MORIN
Sent: Monday, May 6, 2019 10:41 PM
To: Romain Naour <[email protected]>
Cc: buildroot at buildroot.org; Evgeniy Didin <[email protected]>; Alexey Brodkin <[email protected]>; Eugeniy Paltsev <[email protected]>
Subject: Re: [Buildroot] [PATCH 01/15] package/glibc/arc: fix build issue with gcc-9.1

Romain, All,

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 5 lines

Backport from upstream [1] to fix build issue with glibc arc-2018.09-release (based on glibc 2.28) and gcc 9.1 [2]]

Using glibc arc-2.29-2019.02.08 or the upcoming arc-2019.03 release include this patch.

So, here is a small summary of my discussion with Romain on IRC:

- this patch touches mostly x86_64 files, so I was puzzled why it had

    to be applied to the arc fork;

- however, that patch also touxphces teo generic headers; in there the new __attribute_copy__() macro is defined *and* used to complement existing attribute-related macros.

So, it is not much the x86_64 part we're interested in, but the generic two headers, which changes percolate to the various functions via the various attribute macros...

Quoted 8 lines
Quoted 4 lines

So, for other reviewers: just ignore the x86_64 part.

Romain: what do you think about this: remove those x86_64 files from the patch, and update the soh-line as... (see below)

First of all thanks a lot for fixing stuff for ARC.
Also pls pardon my late reply - there were long May holidays Russia and a lot of people including myself were enjoying anything but work :)

No problem at all, It's perfectly normal to look for a fix when a toolchain component is updated :)
I really appreciate your work (and Synopsys effort) on ARC support in Buildroot, I don't want to introduce regressions.

Quoted 5 lines

Now given we're about to cut ARC 2019.03 release of our tools which among other things has Glibc rebased on upstream 2.29 version this particular fix won't be required at all.

So let us post ARC toolchain bump to 2019.03-RC1 ASAP.

We are close to -rc1, I don't think gcc 9.1 will be merged for this release so we have some time to merge ARC 2019.03 release.

Quoted 5 lines

Also with GCC 9.1 out of the door we have pretty much all our changes right in upstream release tarball so hopefully even ARC fork won't be that important any longer and we'll try to use upstream GCC by default.

Great, congratulations :)

Quoted 5 lines

-Alexey

P.S. Romain I'm really sorry for letting you do that extra yet not very
useful work!

No problem :)

Best regards,
Romain

#5 lore raw

PATCH 1/15 package/glibc/arc: fix build issue with gcc-9.1

Hi Romain,

Quoted 7 lines

-----Original Message-----
From: Romain Naour <[email protected]>
Sent: Wednesday, May 8, 2019 4:28 PM
To: Alexey Brodkin <[email protected]>; Yann E. MORIN <[email protected]>
Cc: buildroot at buildroot.org; Evgeniy Didin <[email protected]>; Eugeniy Paltsev <[email protected]>
Subject: Re: [Buildroot] [PATCH 01/15] package/glibc/arc: fix build issue with gcc-9.1

[snip]

Quoted 8 lines
Quoted 5 lines

Now given we're about to cut ARC 2019.03 release of our tools which among other things has Glibc rebased on upstream 2.29 version this particular fix won't be required at all.

So let us post ARC toolchain bump to 2019.03-RC1 ASAP.

We are close to -rc1, I don't think gcc 9.1 will be merged for this release so we have some time to merge ARC 2019.03 release.

Cool. We'll be sending arc-2019.03-rc1 either by the end of this week or early next week so hopefully it gets in Buildroot's RC1.

And looking forward to rocking vanilla GCC 9.1 in BR starting from the next release cycle.

-Alexey

#6 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

In reply to Romain Naour

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target.

In particular, it triggers for all the init/cleanup_module aliases in the kernel (defined by the module_init/exit macros), ending up being very noisy.

These aliases point to the __init/__exit functions of a module, which are defined as __cold (among other attributes). However, the aliases themselves do not have the __cold attribute.

Since the compiler behaves differently when compiling a __cold function as well as when compiling paths leading to calls to __cold functions, the warning is trying to point out the possibly-forgotten attribute in the alias."

Werror is set by default while building ppc kernel [2], but some warning can be introduced while building current kernel with newer compiler (for example building kernel 4.19 with gcc 9.1).

Instead of backporting this patch [1] to kernel 4.19, select the Kconfig option CONFIG_PPC_DISABLE_WERROR that allow to disable Werror.

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig since they are used for CI with toolchain-builder's gitlab [3].

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for other ppc board defconfig.

v2: add a shared fragment in board/fragments/linux and update qemu ppc* defconfigs. (Arnout)

---
 board/fragments/linux/linux-ppc-disable-werror.fragment | 1 +
 configs/qemu_ppc64_e5500_defconfig                      | 2 +-
 configs/qemu_ppc64_pseries_defconfig                    | 1 +
 configs/qemu_ppc64le_pseries_defconfig                  | 1 +
 configs/qemu_ppc_g3beige_defconfig                      | 1 +
 configs/qemu_ppc_mpc8544ds_defconfig                    | 1 +
 configs/qemu_ppc_virtex_ml507_defconfig                 | 1 +
 7 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
board/fragments/linux/linux-ppc-disable-werror.fragment new file +1 -0
new file mode 100644
index 0000000000..6ea12a1243
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
configs/qemu_ppc64_e5500_defconfig +1 -1
index 59b8636918..624155316c 100644
@@ -13,7 +13,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 
 # Filesystem
configs/qemu_ppc64_pseries_defconfig +1 -0
index 5f55b246f7..277d08989a 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc64le_pseries_defconfig +1 -0
index 8356e4e250..1848667abf 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc_g3beige_defconfig +1 -0
index 4b2f3ed2fe..c8bbd74ada 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_mpc8544ds_defconfig +1 -0
index 98985b7b76..68a9e80e93 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_virtex_ml507_defconfig +1 -0
index eddaf3558a..2a127ed70d 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
Signature · 1 line
2.14.5
#7 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Romain, All,

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 22 lines

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target.

In particular, it triggers for all the init/cleanup_module aliases in the kernel (defined by the module_init/exit macros), ending up being very noisy.

These aliases point to the __init/__exit functions of a module, which are defined as __cold (among other attributes). However, the aliases themselves do not have the __cold attribute.

Since the compiler behaves differently when compiling a __cold function as well as when compiling paths leading to calls to __cold functions, the warning is trying to point out the possibly-forgotten attribute in the alias."

Werror is set by default while building ppc kernel [2], but some warning can be introduced while building current kernel with newer compiler (for example building kernel 4.19 with gcc 9.1).

Quoted 6 lines

Instead of backporting this patch [1] to kernel 4.19, select the Kconfig option CONFIG_PPC_DISABLE_WERROR that allow to disable Werror.

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig since they are used for CI with toolchain-builder's gitlab [3].

When you introduce gcc-9 later in the series, itis not the default compiler, so it will not be selected for these defconfigs.

So, I don't think we need this change (yet).

If we decide to update these defconfigs to use the latest gcc-9, later, then that would be the moment to include the fix.

Regards,
Yann E. MORIN.

Quoted 106 lines

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for other ppc board defconfig.

v2: add a shared fragment in board/fragments/linux and update qemu ppc* defconfigs. (Arnout)

---
 board/fragments/linux/linux-ppc-disable-werror.fragment | 1 +
 configs/qemu_ppc64_e5500_defconfig                      | 2 +-
 configs/qemu_ppc64_pseries_defconfig                    | 1 +
 configs/qemu_ppc64le_pseries_defconfig                  | 1 +
 configs/qemu_ppc_g3beige_defconfig                      | 1 +
 configs/qemu_ppc_mpc8544ds_defconfig                    | 1 +
 configs/qemu_ppc_virtex_ml507_defconfig                 | 1 +
 7 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
board/fragments/linux/linux-ppc-disable-werror.fragment new file +1 -0
new file mode 100644
index 0000000000..6ea12a1243
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
configs/qemu_ppc64_e5500_defconfig +1 -1
index 59b8636918..624155316c 100644
@@ -13,7 +13,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 
 # Filesystem
configs/qemu_ppc64_pseries_defconfig +1 -0
index 5f55b246f7..277d08989a 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc64le_pseries_defconfig +1 -0
index 8356e4e250..1848667abf 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc_g3beige_defconfig +1 -0
index 4b2f3ed2fe..c8bbd74ada 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_mpc8544ds_defconfig +1 -0
index 98985b7b76..68a9e80e93 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_virtex_ml507_defconfig +1 -0
index eddaf3558a..2a127ed70d 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Le 06/05/2019 ? 21:49, Yann E. MORIN a ?crit?:

Quoted 32 lines

Romain, All,

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 22 lines

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target.

In particular, it triggers for all the init/cleanup_module aliases in the kernel (defined by the module_init/exit macros), ending up being very noisy.

These aliases point to the __init/__exit functions of a module, which are defined as __cold (among other attributes). However, the aliases themselves do not have the __cold attribute.

Since the compiler behaves differently when compiling a __cold function as well as when compiling paths leading to calls to __cold functions, the warning is trying to point out the possibly-forgotten attribute in the alias."

Werror is set by default while building ppc kernel [2], but some warning can be introduced while building current kernel with newer compiler (for example building kernel 4.19 with gcc 9.1).

Quoted 6 lines

Instead of backporting this patch [1] to kernel 4.19, select the Kconfig option CONFIG_PPC_DISABLE_WERROR that allow to disable Werror.

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig since they are used for CI with toolchain-builder's gitlab [3].

Quoted 7 lines

When you introduce gcc-9 later in the series, itis not the default compiler, so it will not be selected for these defconfigs.

So, I don't think we need this change (yet).

If we decide to update these defconfigs to use the latest gcc-9, later, then that would be the moment to include the fix.

This fix is required for toolchain-builder that use a bleeding-edge toolchain. Since we test the new toolchain by building a small rootfs + a kernel Linux for Qemu, we really need this fix before introducing gcc 9.1.

Best regards,
Romain

Quoted 111 lines

Regards,
Yann E. MORIN.

Quoted 106 lines

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for other ppc board defconfig.

v2: add a shared fragment in board/fragments/linux and update qemu ppc* defconfigs. (Arnout)

---
 board/fragments/linux/linux-ppc-disable-werror.fragment | 1 +
 configs/qemu_ppc64_e5500_defconfig                      | 2 +-
 configs/qemu_ppc64_pseries_defconfig                    | 1 +
 configs/qemu_ppc64le_pseries_defconfig                  | 1 +
 configs/qemu_ppc_g3beige_defconfig                      | 1 +
 configs/qemu_ppc_mpc8544ds_defconfig                    | 1 +
 configs/qemu_ppc_virtex_ml507_defconfig                 | 1 +
 7 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
board/fragments/linux/linux-ppc-disable-werror.fragment new file +1 -0
new file mode 100644
index 0000000000..6ea12a1243
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
configs/qemu_ppc64_e5500_defconfig +1 -1
index 59b8636918..624155316c 100644
@@ -13,7 +13,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 
 # Filesystem
configs/qemu_ppc64_pseries_defconfig +1 -0
index 5f55b246f7..277d08989a 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc64le_pseries_defconfig +1 -0
index 8356e4e250..1848667abf 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc_g3beige_defconfig +1 -0
index 4b2f3ed2fe..c8bbd74ada 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_mpc8544ds_defconfig +1 -0
index 98985b7b76..68a9e80e93 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_virtex_ml507_defconfig +1 -0
index eddaf3558a..2a127ed70d 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#9 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Romain, All,

On 2019-05-06 21:57 +0200, Romain Naour spake thusly:

Quoted 6 lines

Le 06/05/2019 ? 21:49, Yann E. MORIN a ?crit?:

Quoted 5 lines

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 4 lines

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target.

[--SNIP--]

Quoted 6 lines
Quoted 6 lines
Quoted 2 lines

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig since they are used for CI with toolchain-builder's gitlab [3].

When you introduce gcc-9 later in the series, itis not the default compiler, so it will not be selected for these defconfigs.

Quoted 8 lines
Quoted 4 lines

So, I don't think we need this change (yet).

If we decide to update these defconfigs to use the latest gcc-9, later, then that would be the moment to include the fix.

This fix is required for toolchain-builder that use a bleeding-edge toolchain. Since we test the new toolchain by building a small rootfs + a kernel Linux for Qemu, we really need this fix before introducing gcc 9.1.

Then it should be that toolchain-builder that is responsible to provide the fragment, no?

The defconfigs as they are in Buildroot do not need it, so I fail to understand why we, in Buildroot, would need that.

Regards,
Yann E. MORIN.

Quoted 115 lines

Best regards,
Romain

Quoted 111 lines

Regards,
Yann E. MORIN.

Quoted 106 lines

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for other ppc board defconfig.

v2: add a shared fragment in board/fragments/linux and update qemu ppc* defconfigs. (Arnout)

---
 board/fragments/linux/linux-ppc-disable-werror.fragment | 1 +
 configs/qemu_ppc64_e5500_defconfig                      | 2 +-
 configs/qemu_ppc64_pseries_defconfig                    | 1 +
 configs/qemu_ppc64le_pseries_defconfig                  | 1 +
 configs/qemu_ppc_g3beige_defconfig                      | 1 +
 configs/qemu_ppc_mpc8544ds_defconfig                    | 1 +
 configs/qemu_ppc_virtex_ml507_defconfig                 | 1 +
 7 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
board/fragments/linux/linux-ppc-disable-werror.fragment new file +1 -0
new file mode 100644
index 0000000000..6ea12a1243
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
configs/qemu_ppc64_e5500_defconfig +1 -1
index 59b8636918..624155316c 100644
@@ -13,7 +13,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 
 # Filesystem
configs/qemu_ppc64_pseries_defconfig +1 -0
index 5f55b246f7..277d08989a 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc64le_pseries_defconfig +1 -0
index 8356e4e250..1848667abf 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc_g3beige_defconfig +1 -0
index 4b2f3ed2fe..c8bbd74ada 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_mpc8544ds_defconfig +1 -0
index 98985b7b76..68a9e80e93 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_virtex_ml507_defconfig +1 -0
index eddaf3558a..2a127ed70d 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#10 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Hi Yann,

Le 06/05/2019 ? 22:01, Yann E. MORIN a ?crit?:

Quoted 21 lines

Romain, All,

On 2019-05-06 21:57 +0200, Romain Naour spake thusly:

Quoted 6 lines

Le 06/05/2019 ? 21:49, Yann E. MORIN a ?crit?:

Quoted 5 lines

On 2019-05-06 20:29 +0200, Romain Naour spake thusly:

Quoted 4 lines

From patch [1] included in kernel >= 5.0:
"The upcoming GCC 9 release extends the -Wmissing-attributes warnings (enabled by -Wall) to C and aliases: it warns when particular function attributes are missing in the aliases but not in their target.

[--SNIP--]

Quoted 11 lines
Quoted 10 lines
Quoted 2 lines

Add CONFIG_PPC_DISABLE_WERROR only for qemu ppc{64} defconfig since they are used for CI with toolchain-builder's gitlab [3].

When you introduce gcc-9 later in the series, itis not the default compiler, so it will not be selected for these defconfigs.

So, I don't think we need this change (yet).

If we decide to update these defconfigs to use the latest gcc-9, later, then that would be the moment to include the fix.

Quoted 6 lines
Quoted 3 lines

This fix is required for toolchain-builder that use a bleeding-edge toolchain. Since we test the new toolchain by building a small rootfs + a kernel Linux for Qemu, we really need this fix before introducing gcc 9.1.

Then it should be that toolchain-builder that is responsible to provide the fragment, no?

Indeed, the fragment can be part of toolchain-builder but...

Quoted 3 lines

The defconfigs as they are in Buildroot do not need it, so I fail to understand why we, in Buildroot, would need that.

I believe that's the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here.

Also this option is a bit strange since it's specific to ppc kernels:
"The intention is to make it harder for people to inadvertantly introduce warnings in the arch/powerpc code." Other kernel developers on other arch may be interested by this option.

So, It's clearly intended for kernel developers.

Best regards,
Romain

Quoted 120 lines

Regards,
Yann E. MORIN.

Quoted 115 lines

Best regards,
Romain

Quoted 111 lines

Regards,
Yann E. MORIN.

Quoted 106 lines

Fixes:
https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435741

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=a6e60d84989fa0e91db7f236eda40453b0e44afa
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=ba55bd74360ea4b8b95e73ed79474d37ff482b36
[3] https://gitlab.com/bootlin/toolchains-builder

---
Note: It can be usefull to select CONFIG_PPC_DISABLE_WERROR for other ppc board defconfig.

v2: add a shared fragment in board/fragments/linux and update qemu ppc* defconfigs. (Arnout)

---
 board/fragments/linux/linux-ppc-disable-werror.fragment | 1 +
 configs/qemu_ppc64_e5500_defconfig                      | 2 +-
 configs/qemu_ppc64_pseries_defconfig                    | 1 +
 configs/qemu_ppc64le_pseries_defconfig                  | 1 +
 configs/qemu_ppc_g3beige_defconfig                      | 1 +
 configs/qemu_ppc_mpc8544ds_defconfig                    | 1 +
 configs/qemu_ppc_virtex_ml507_defconfig                 | 1 +
 7 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 board/fragments/linux/linux-ppc-disable-werror.fragment
board/fragments/linux/linux-ppc-disable-werror.fragment new file +1 -0
new file mode 100644
index 0000000000..6ea12a1243
@@ -0,0 +1 @@
+CONFIG_PPC_DISABLE_WERROR=y
configs/qemu_ppc64_e5500_defconfig +1 -1
index 59b8636918..624155316c 100644
@@ -13,7 +13,7 @@ BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="corenet64_smp"
-BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/ppc64-e5500/linux.fragment board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
 
 # Filesystem
configs/qemu_ppc64_pseries_defconfig +1 -0
index 5f55b246f7..277d08989a 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc64le_pseries_defconfig +1 -0
index 8356e4e250..1848667abf 100644
@@ -19,3 +19,4 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_DEFCONFIG="pseries_le"
 BR2_LINUX_KERNEL_VMLINUX=y
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
configs/qemu_ppc_g3beige_defconfig +1 -0
index 4b2f3ed2fe..c8bbd74ada 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-g3beige/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_mpc8544ds_defconfig +1 -0
index 98985b7b76..68a9e80e93 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-mpc8544ds/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 
 # Serial port config
configs/qemu_ppc_virtex_ml507_defconfig +1 -0
index eddaf3558a..2a127ed70d 100644
@@ -18,6 +18,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.16"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/ppc-virtex-ml507/linux.config"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/fragments/linux/linux-ppc-disable-werror.fragment"
 BR2_LINUX_KERNEL_VMLINUX=y
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="virtex440-ml507"
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#11 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Romain, All,

On 2019-05-07 10:26 +0200, Romain Naour spake thusly:

Quoted 6 lines

Le 06/05/2019 ? 22:01, Yann E. MORIN a ?crit?:

Quoted 2 lines

The defconfigs as they are in Buildroot do not need it, so I fail to understand why we, in Buildroot, would need that.

I believe that's the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here.

What you say makes sense, but then it means we should *always* disable Werror for the kernel builds, not just in the defconfigs, as you did. We would need something like:

    diff --git a/linux/linux.mk b/linux/linux.mk
    index 51fd41fa15..85364451a8 100644
    --- a/linux/linux.mk
    +++ b/linux/linux.mk
    @@ -315,6 +315,8 @@ define LINUX_KCONFIG_FIXUP_CMDS
     	$(LINUX_FIXUP_CONFIG_ENDIANNESS)
     	$(if $(BR2_arm)$(BR2_armeb),
     		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
    +	$(if $(BR2_powerpc)$(BR2_powerpc64)$(B R2_powerpc64le),
    +		$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR,$(@D)/.config))
     	$(if $(BR2_TARGET_ROOTFS_CPIO),
     		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
     	# As the kernel gets compiled before root filesystems are

This is the way we disable Werror in packages. We don;t do that in the defconfigs, we do it in the pacakge's .mk file (or we patch/sed it out).

Quoted 1 line

So, It's clearly intended for kernel developers.

All the more reasons to always disable it, and not limit it to the defconfigs.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#12 lore raw

PATCH 2/15 board/qemu/ppc*: disable Werror while building ppc kernel with gcc >= 9.1

Yann, All,

Le 08/05/2019 ? 14:01, Yann E. MORIN a ?crit?:

Quoted 28 lines

Romain, All,

On 2019-05-07 10:26 +0200, Romain Naour spake thusly:

Quoted 6 lines

Le 06/05/2019 ? 22:01, Yann E. MORIN a ?crit?:

Quoted 2 lines

The defconfigs as they are in Buildroot do not need it, so I fail to understand why we, in Buildroot, would need that.

I believe that's the same reason why we remove Werror in packages's compiler flags. Building with Werror is not bulletproof when we start using a newer compiler that introduce new warnings. This is the case here.

What you say makes sense, but then it means we should *always* disable Werror for the kernel builds, not just in the defconfigs, as you did. We would need something like:

    diff --git a/linux/linux.mk b/linux/linux.mk
    index 51fd41fa15..85364451a8 100644
    --- a/linux/linux.mk
    +++ b/linux/linux.mk
    @@ -315,6 +315,8 @@ define LINUX_KCONFIG_FIXUP_CMDS
     	$(LINUX_FIXUP_CONFIG_ENDIANNESS)
     	$(if $(BR2_arm)$(BR2_armeb),
     		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
    +	$(if $(BR2_powerpc)$(BR2_powerpc64)$(B R2_powerpc64le),
    +		$(call KCONFIG_ENABLE_OPT,CONFIG_PPC_DISABLE_WERROR,$(@D)/.config))
     	$(if $(BR2_TARGET_ROOTFS_CPIO),
     		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
     	# As the kernel gets compiled before root filesystems are
Quoted 7 lines

This is the way we disable Werror in packages. We don;t do that in the defconfigs, we do it in the pacakge's .mk file (or we patch/sed it out).

Quoted 1 line

So, It's clearly intended for kernel developers.

All the more reasons to always disable it, and not limit it to the defconfigs.

Ok, I updated the patch with your suggestion.
Thanks!

Best regards,
Romain

Quoted 4 lines

Regards,
Yann E. MORIN.

#13 lore raw

RFC PATCH 3/15 package/uclibc: remove asm constraint

In reply to Romain Naour

uClibc-ng don't build with gcc 9.1 [1] due to a new check that "catch illegal asm constraint usage" [2].

gcc 9.1 print this error:
"invalid hard register usage between earlyclobber operand and input operand"

The asm constraint is present in uClibc since it support sparc (back in 2002)[3].

Note: There is no such constraint is Glibc counterpart code [4].

[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
[4] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876e55bc4be2d9f8a;hb=HEAD

Cc Waldemar Brodkorb <[email protected]>

---
I did not fully analyze the asm code to understand why the constraint is present. I lightly tested using qemu_sparc_ss10_defconfig.
Any help is welcome :)

---
 ...FC-sparc-syscalls.h-remove-asm-constraint.patch | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch new file +46 -0
new file mode 100644
index 0000000000..050dc573b0
@@ -0,0 +1,46 @@
+From 1854c332efa0ed5b9140d8df2a983625a1e2d9ef Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Sun, 5 May 2019 10:56:30 +0200
+Subject: [PATCH] [RFC] sparc: syscalls.h: remove asm constraint
+
+uClibc-ng don't build with gcc 9.1 [1] due to a new check that
+"catch illegal asm constraint usage" [2].
+
+gcc 9.1 print this error:
+"invalid hard register usage between earlyclobber operand and input operand"
+
+The asm constraint is present in uClibc since it support sparc (back in 2002)[3].
+
+Note: There is no such constraint is Glibc counterpart code [4].
+
+[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
+[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
+[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
+[4] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876e55bc4be2d9f8a;hb=HEAD
+
+Signed-off-by: Romain Naour <[email protected]>
+Cc: Waldemar Brodkorb <[email protected]>
+---
+I did not fully analyze the asm code to understand why the constraint is present.
+I lightly tested using qemu_sparc_ss10_defconfig.
+Any help is welcome :)
+---
+ libc/sysdeps/linux/sparc/bits/syscalls.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libc/sysdeps/linux/sparc/bits/syscalls.h b/libc/sysdeps/linux/sparc/bits/syscalls.h
+index 75af7a1573..e52ab98466 100644
+--- a/libc/sysdeps/linux/sparc/bits/syscalls.h
++++ b/libc/sysdeps/linux/sparc/bits/syscalls.h
+@@ -33,7 +33,7 @@
+             register long __g1 __asm__("g1") = sys_num;     \
+             LOAD_ARGS_##nr(args)                            \
+             __asm__ __volatile__( __SYSCALL_STRING          \
+-                : "=r" (__res), "=&r" (__o0)                \
++                : "=r" (__res), "=r" (__o0)                 \
+                 : "1" (__o0) ASM_ARGS_##nr, "r" (__g1)     \
+                 : __SYSCALL_CLOBBERS );                                   \
+         }                                                   \
+-- 
+2.14.5
+
Signature · 1 line
2.14.5
#14 lore raw

PATCH 4/15 arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9

In reply to Romain Naour

This new symbol will be used by architectures introduced with gcc 9 and by external toolchains based on gcc 9.

[1] https://gcc.gnu.org/gcc-9/changes.html

---
 arch/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
arch/Config.in +4 -0
index d82803c828..051d4cdab7 100644
@@ -302,6 +302,10 @@ config BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 	bool
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 
+config BR2_ARCH_NEEDS_GCC_AT_LEAST_9
+	bool
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+
 # The following string values are defined by the individual
 # Config.in.$ARCH files
 config BR2_ARCH
Signature · 1 line
2.14.5
#15 lore raw

PATCH 4/15 arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9

On 2019-05-06 20:30 +0200, Romain Naour spake thusly:

Quoted 6 lines

This new symbol will be used by architectures introduced with gcc 9 and by external toolchains based on gcc 9.

[1] https://gcc.gnu.org/gcc-9/changes.html

This must be added after you actually introduce gcc-9.

I.e.:

- add gcc-9
- add this new symbol
- add the ne archs or ocres that need gcc-9

If we apply just this patch, it does not make sense at all: we'd have a way to specify that we require something that we can't even provide...

Regards,
Yann E. MORIN.

Quoted 26 lines
---
 arch/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
arch/Config.in +4 -0
index d82803c828..051d4cdab7 100644
@@ -302,6 +302,10 @@ config BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 	bool
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 
+config BR2_ARCH_NEEDS_GCC_AT_LEAST_9
+	bool
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+
 # The following string values are defined by the individual
 # Config.in.$ARCH files
 config BR2_ARCH
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH 5/15 toolchain: add gcc 9 entry

In reply to Romain Naour

In order to add gcc 9 support for internal and external toolchain in follow-up commits, introduce BR2_TOOLCHAIN_GCC_AT_LEAST_9 symbol.

---
 toolchain/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
toolchain/Config.in +5 -0
index 8c5a4fb88e..467d6bd84f 100644
@@ -500,10 +500,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_8
 	bool
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
+config BR2_TOOLCHAIN_GCC_AT_LEAST_9
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
+
 # This order guarantees that the highest version is set, as kconfig
 # stops affecting a value on the first matching default.
 config BR2_TOOLCHAIN_GCC_AT_LEAST
 	string
+	default "9"	if BR2_TOOLCHAIN_GCC_AT_LEAST_9
 	default "8"	if BR2_TOOLCHAIN_GCC_AT_LEAST_8
 	default "7"	if BR2_TOOLCHAIN_GCC_AT_LEAST_7
 	default "6"	if BR2_TOOLCHAIN_GCC_AT_LEAST_6
Signature · 1 line
2.14.5
#17 lore raw

PATCH 6/15 package/gcc: add support for gcc 9.1

In reply to Romain Naour
---
 package/gcc/Config.in.host | 8 ++++++++
 package/gcc/gcc.hash       | 2 ++
 2 files changed, 10 insertions(+)
package/gcc/Config.in.host +8 -0
index 8e22a4c155..a9f8492399 100644
@@ -64,10 +64,17 @@ config BR2_GCC_VERSION_7_X
 
 config BR2_GCC_VERSION_8_X
 	bool "gcc 8.x"
+	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 	# Broken or unsupported architectures
 	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
+config BR2_GCC_VERSION_9_X
+	bool "gcc 9.x"
+	# Broken or unsupported architectures
+	depends on !BR2_or1k
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
+
 endchoice
 
 # libcilkrts was introduced in gcc 4.9 (oldest gcc version we
@@ -83,6 +90,7 @@ config BR2_GCC_VERSION
 	default "6.5.0"     if BR2_GCC_VERSION_6_X
 	default "7.4.0"     if BR2_GCC_VERSION_7_X
 	default "8.3.0"     if BR2_GCC_VERSION_8_X
+	default "9.1.0"     if BR2_GCC_VERSION_9_X
 	default "arc-2018.09-release" if BR2_GCC_VERSION_ARC
 	default "or1k-musl-5.4.0-20170218" if BR2_GCC_VERSION_OR1K
 
package/gcc/gcc.hash +2 -0
index 4f1e7f932f..f2702c4ba6 100644
@@ -8,6 +8,8 @@ sha512  ce046f9a50050fd54b870aab764f7db187fe7ea92eb4aaffb7c3689ca623755604e231f2
 sha512  8864d8e4b97c2e1a4f17422f6e68120172ebefeab97b1757734f7185ca68a6b9a89011c6833c03fa454c17b0ac35b15e1d284881e6971035948ac6100f3aa45e  gcc-7.4.0.tar.xz
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-8.3.0/sha512.sum
 sha512  1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802  gcc-8.3.0.tar.xz
+#  From ftp://gcc.gnu.org/pub/gcc/releases/gcc-9.1.0/sha512.sum
+sha512  b6134df027e734cee5395afd739fcfa4ea319a6017d662e54e89df927dea19d3fff7a6e35d676685383034e3db01c9d0b653f63574c274eeb15a2cb0bc7a1f28  gcc-9.1.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  4d12c3ac27b9de9c533be3b8964cf23d21bf6933b5073183e1affe714b0ff33f9d6169e3b55a5c505d7dae33c9bb4f8b0d110461e3a124182d8c8d51b66b8e45  gcc-arc-2018.09-release.tar.gz
Signature · 1 line
2.14.5
#18 lore raw

PATCH 6/15 package/gcc: add support for gcc 9.1

Romain, All,

On 2019-05-06 20:30 +0200, Romain Naour spake thusly:

Quoted 11 lines
---
 package/gcc/Config.in.host | 8 ++++++++
 package/gcc/gcc.hash       | 2 ++
 2 files changed, 10 insertions(+)
package/gcc/Config.in.host +0 -0
index 8e22a4c155..a9f8492399 100644

package/gcc/Config.in.host config BR2_GCC_VERSION_7_X · line 67

Quoted 4 lines
package/gcc/Config.in.host +1 -0
@@ -64,10 +64,17 @@ config BR2_GCC_VERSION_7_X
 
 config BR2_GCC_VERSION_8_X
 	bool "gcc 8.x"
+	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_9

This hunk should be postponed to the next patch (your current patch 4) that adds the BR2_ARCH_NEEDS_GCC_AT_LEAST_9 symbol.

Regards,
Yann E. MORIN.

Quoted 41 lines
package/gcc/Config.in.host +7 -0
 	# Broken or unsupported architectures
 	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
+config BR2_GCC_VERSION_9_X
+	bool "gcc 9.x"
+	# Broken or unsupported architectures
+	depends on !BR2_or1k
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
+
 endchoice
 
 # libcilkrts was introduced in gcc 4.9 (oldest gcc version we
@@ -83,6 +90,7 @@ config BR2_GCC_VERSION
 	default "6.5.0"     if BR2_GCC_VERSION_6_X
 	default "7.4.0"     if BR2_GCC_VERSION_7_X
 	default "8.3.0"     if BR2_GCC_VERSION_8_X
+	default "9.1.0"     if BR2_GCC_VERSION_9_X
 	default "arc-2018.09-release" if BR2_GCC_VERSION_ARC
 	default "or1k-musl-5.4.0-20170218" if BR2_GCC_VERSION_OR1K
 
package/gcc/gcc.hash +2 -0
index 4f1e7f932f..f2702c4ba6 100644
@@ -8,6 +8,8 @@ sha512  ce046f9a50050fd54b870aab764f7db187fe7ea92eb4aaffb7c3689ca623755604e231f2
 sha512  8864d8e4b97c2e1a4f17422f6e68120172ebefeab97b1757734f7185ca68a6b9a89011c6833c03fa454c17b0ac35b15e1d284881e6971035948ac6100f3aa45e  gcc-7.4.0.tar.xz
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-8.3.0/sha512.sum
 sha512  1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802  gcc-8.3.0.tar.xz
+#  From ftp://gcc.gnu.org/pub/gcc/releases/gcc-9.1.0/sha512.sum
+sha512  b6134df027e734cee5395afd739fcfa4ea319a6017d662e54e89df927dea19d3fff7a6e35d676685383034e3db01c9d0b653f63574c274eeb15a2cb0bc7a1f28  gcc-9.1.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  4d12c3ac27b9de9c533be3b8964cf23d21bf6933b5073183e1affe714b0ff33f9d6169e3b55a5c505d7dae33c9bb4f8b0d110461e3a124182d8c8d51b66b8e45  gcc-arc-2018.09-release.tar.gz
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#19 lore raw

PATCH 7/15 toolchain-external: add gcc 9 entry

In reply to Romain Naour

This patch allows to use an external toolchain based on gcc 9.

---
 .../toolchain-external/toolchain-external-custom/Config.in.options  | 6 ++++++
 1 file changed, 6 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +6 -0
index cb7095632f..a2cc97f936 100644
@@ -27,6 +27,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 
 choice
 	bool "External toolchain gcc version"
+	default BR2_TOOLCHAIN_EXTERNAL_GCC_9   if BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 	default BR2_TOOLCHAIN_EXTERNAL_GCC_8   if BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 	default BR2_TOOLCHAIN_EXTERNAL_GCC_7   if BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 	default BR2_TOOLCHAIN_EXTERNAL_GCC_6   if BR2_ARCH_NEEDS_GCC_AT_LEAST_6
@@ -38,8 +39,13 @@ choice
 	  Set to the gcc version that is used by your external
 	  toolchain.
 
+config BR2_TOOLCHAIN_EXTERNAL_GCC_9
+	bool "9.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
+
 config BR2_TOOLCHAIN_EXTERNAL_GCC_8
 	bool "8.x"
+	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
 
 config BR2_TOOLCHAIN_EXTERNAL_GCC_7
Signature · 1 line
2.14.5
#20 lore raw

PATCH 8/15 package/gcc: switch to gcc 8.x as the default

In reply to Romain Naour

Even if gcc 8 is still maintained for some time (gcc 7.5 is pending), switch to gcc 8.x since it has been released since 2018-05-02 and gcc 9.x is available since 2019-05-03.

We have been having toolchains in the autobuilders with gcc 8.x for a while, so the vast majority of the problems should have already been solved.

---
 package/gcc/Config.in.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/Config.in.host +1 -1
index a9f8492399..1d3af73e69 100644
@@ -4,7 +4,7 @@ choice
 	prompt "GCC compiler Version"
 	default BR2_GCC_VERSION_ARC if BR2_arc
 	default BR2_GCC_VERSION_OR1K if BR2_or1k
-	default BR2_GCC_VERSION_7_X
+	default BR2_GCC_VERSION_8_X
 	help
 	  Select the version of gcc you wish to use.
 
Signature · 1 line
2.14.5
#21 lore raw

PATCH 8/15 package/gcc: switch to gcc 8.x as the default

Romain, All,

On 2019-05-06 20:30 +0200, Romain Naour spake thusly:

Quoted 1 line

Even if gcc 8 is still maintained for some time (gcc 7.5 is pending),

             ^^^

I guess you meant '7' here, as in:
gcc 7 is still maintained (gcc 7.5 is pending)

Regards,
Yann E. MORIN.

Quoted 32 lines

switch to gcc 8.x since it has been released since 2018-05-02 and gcc 9.x is available since 2019-05-03.

We have been having toolchains in the autobuilders with gcc 8.x for a while, so the vast majority of the problems should have already been solved.

---
 package/gcc/Config.in.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/gcc/Config.in.host +1 -1
index a9f8492399..1d3af73e69 100644
@@ -4,7 +4,7 @@ choice
 	prompt "GCC compiler Version"
 	default BR2_GCC_VERSION_ARC if BR2_arc
 	default BR2_GCC_VERSION_OR1K if BR2_or1k
-	default BR2_GCC_VERSION_7_X
+	default BR2_GCC_VERSION_8_X
 	help
 	  Select the version of gcc you wish to use.
 
Signature · 6 lines
2.14.5

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#22 lore raw

PATCH 9/15 arch/arm: move dependency on 64-bit down to individual cores

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

It will make it easier to introduce new variants anywhere in the list, when those variants have different bitness requirements.

---
 arch/Config.in.arm | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)
arch/Config.in.arm +14 -8
index a9972978d4..71a148ad98 100644
@@ -376,50 +376,55 @@ config BR2_exynos_m1
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
-if BR2_ARCH_IS_64
 config BR2_falkor
 	bool "falkor"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_qdf24xx
 	bool "qdf24xx"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_thunderx
 	bool "thunderx"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_thunderxt81
 	bool "thunderxt81"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt83
 	bool "thunderxt83"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt88
 	bool "thunderxt88"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt88p1
 	bool "thunderxt88p1"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
-endif # BR2_ARCH_IS_64
 config BR2_xgene1
 	bool "xgene1"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -430,59 +435,60 @@ config BR2_xgene1
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 
-if BR2_ARCH_IS_64
 comment "armv8.1a cores"
 config BR2_thunderx2t99
 	bool "thunderx2t99"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderx2t99p1
 	bool "thunderx2t99p1"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_vulcan
 	bool "vulcan"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
-endif # BR2_ARCH_IS_64
 
-if BR2_ARCH_IS_64
 comment "armv8.2a cores"
 config BR2_cortex_a55
 	bool "cortex-A55"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 config BR2_cortex_a75
 	bool "cortex-A75"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 config BR2_cortex_a75_a55
 	bool "cortex-A75/A55 big.LITTLE"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
-endif # BR2_ARCH_IS_64
 
-if BR2_ARCH_IS_64
 comment "armv8.3a cores"
 config BR2_saphira
 	bool "saphira"
+	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
-endif # BR2_ARCH_IS_64
 endchoice
 
 config BR2_ARM_ENABLE_NEON
Signature · 1 line
2.14.5
#23 lore raw

PATCH 10/15 arch/arm: some cores have a different name with gcc-9

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

In gcc-9, some cores from the ThunderX familly have been renamed to their marketting names, i.e. OcteonTX. Subsequently, new core names have been added to gcc, with the old names still being around.

Update the prompts with the new names as alternative to the existing names. We still keep the kconfig options as-is, so that we do not need to add legacy handling.

However, since there is no guarantee for how long gcc will retain compatibility for the older names, we readily switch over to using the new names when using a gcc 9-or-later, but keep using the older names with gcc older than 9.

The ordering of the 'default' clauses in kconfig is important, with the first default which conditions is satisfied, to be used, so we just add the new core names under a more liberal condition than the older names.

---
 arch/Config.in.arm | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
arch/Config.in.arm +9 -6
index 71a148ad98..ee6ab875a3 100644
@@ -391,21 +391,21 @@ config BR2_qdf24xx
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_6
 config BR2_thunderx
-	bool "thunderx"
+	bool "thunderx (aka octeontx)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_5
 config BR2_thunderxt81
-	bool "thunderxt81"
+	bool "thunderxt81 (aka octeontx81)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 config BR2_thunderxt83
-	bool "thunderxt83"
+	bool "thunderxt83 (aka octeontx83)"
 	depends on BR2_ARCH_IS_64
 	select BR2_ARM_CPU_HAS_FP_ARMV8
 	select BR2_ARM_CPU_ARMV8A
@@ -824,9 +824,12 @@ config BR2_GCC_TARGET_CPU
 	default "exynos-m1"	if BR2_exynos_m1
 	default "falkor"	if BR2_falkor
 	default "qdf24xx"	if BR2_qdf24xx
-	default "thunderx"	if BR2_thunderx
-	default "thunderxt81"	if BR2_thunderxt81
-	default "thunderxt83"	if BR2_thunderxt83
+	default "thunderx"	if BR2_thunderx && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
+	default "octeontx"	if BR2_thunderx
+	default "thunderxt81"	if BR2_thunderxt81 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
+	default "octeontx81"	if BR2_thunderxt81
+	default "thunderxt83"	if BR2_thunderxt83 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
+	default "octeontx83"	if BR2_thunderxt83
 	default "thunderxt88"	if BR2_thunderxt88
 	default "thunderxt88p1"	if BR2_thunderxt88p1
 	default "xgene1"	if BR2_xgene1
Signature · 1 line
2.14.5
#24 lore raw

PATCH 11/15 arch/arm: saphira is in fact an armv8.4a

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

... and not an armv8.3a like previously supposed:

    https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=886d991373e4dc5a746d0a33de64f1b36e61eed9

So, change the correspoding labels and comments.

---
 arch/Config.in.arm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/Config.in.arm +2 -2
index ee6ab875a3..b46c1c5cd1 100644
@@ -481,7 +481,7 @@ config BR2_cortex_a75_a55
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 
-comment "armv8.3a cores"
+comment "armv8.4a cores"
 config BR2_saphira
 	bool "saphira"
 	depends on BR2_ARCH_IS_64
@@ -841,7 +841,7 @@ config BR2_GCC_TARGET_CPU
 	default "cortex-a55"	if BR2_cortex_a55
 	default "cortex-a75"	if BR2_cortex_a75
 	default "cortex-a75.cortex-a55"	if BR2_cortex_a75_a55
-	# armv8.3a
+	# armv8.4a
 	default "saphira"	if BR2_saphira
 
 config BR2_GCC_TARGET_ABI
Signature · 1 line
2.14.5
#25 lore raw

PATCH 12/15 arch/arm: add two new 64-bit-only armv8a cores

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

---
 arch/Config.in.arm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/Config.in.arm +16 -0
index b46c1c5cd1..d29b6edbc4 100644
@@ -367,6 +367,13 @@ config BR2_cortex_a73_a53
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
+config BR2_emag
+	bool "emag"
+	depends on BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_exynos_m1
 	bool "exynos-m1"
 	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
@@ -383,6 +390,13 @@ config BR2_falkor
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
+config BR2_phecda
+	bool "phecda"
+	depends on BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_qdf24xx
 	bool "qdf24xx"
 	depends on BR2_ARCH_IS_64
@@ -821,8 +835,10 @@ config BR2_GCC_TARGET_CPU
 	default "cortex-a73"	if BR2_cortex_a73
 	default "cortex-a73.cortex-a35"	if BR2_cortex_a73_a35
 	default "cortex-a73.cortex-a53"	if BR2_cortex_a73_a53
+	default "emag"		if BR2_emag
 	default "exynos-m1"	if BR2_exynos_m1
 	default "falkor"	if BR2_falkor
+	default "phecda"	if BR2_phecda
 	default "qdf24xx"	if BR2_qdf24xx
 	default "thunderx"	if BR2_thunderx && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
 	default "octeontx"	if BR2_thunderx
Signature · 1 line
2.14.5
#26 lore raw

PATCH 13/15 arch/arm: add two new cortex-based armv8.2a cores

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

The cortex-a76 implements the full amrv8.2a extensions, and some optional extensions from the armv8.3a, armv8.4a, and armv8.5a sets, but none of their mandatory extensions, which means that it does not qualify for better than an armv8.2a:

    https://developer.arm.com/products/processors/cortex-a/cortex-a76
    http://infocenter.arm.com/help/topic/com.arm.doc.100798_0301_00_en/giq1479805174793.html
    http://infocenter.arm.com/help/topic/com.arm.doc.100798_0301_00_en/fjv1477559794375.html

Also, gcc fits it in the armv8.2a category, too:

    https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/aarch64/aarch64-cores.def;h=67ce42fb8aacd4c246295f32151a03b1f318ae44;hb=HEAD#l97
---
 arch/Config.in.arm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
arch/Config.in.arm +20 -0
index d29b6edbc4..100a28e997 100644
@@ -494,6 +494,24 @@ config BR2_cortex_a75_a55
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_8
+config BR2_cortex_a76
+	bool "cortex-A76"
+	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
+config BR2_cortex_a76_a55
+	bool "cortex-A76/A55 big.LITTLE"
+	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 
 comment "armv8.4a cores"
 config BR2_saphira
@@ -857,6 +875,8 @@ config BR2_GCC_TARGET_CPU
 	default "cortex-a55"	if BR2_cortex_a55
 	default "cortex-a75"	if BR2_cortex_a75
 	default "cortex-a75.cortex-a55"	if BR2_cortex_a75_a55
+	default "cortex-a76"	if BR2_cortex_a76
+	default "cortex-a76.cortex-a55"	if BR2_cortex_a76_a55
 	# armv8.4a
 	default "saphira"	if BR2_saphira
 
Signature · 1 line
2.14.5
#27 lore raw

PATCH 14/15 arch/arm: add two new non-cortex-based armv8.2a cores

In reply to Romain Naour

From: "Yann E. MORIN" <[email protected]>

The Neoverse N1 CPU was supported in GCC earlier through the codename Ares [1].

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=37cf0ddecfd1eb5c6852a44135af5a92e5103931

[Romain: rename BR2_ares to BR2_neoverse_n1]
Cc Thomas Petazzoni <[email protected]>
---
 arch/Config.in.arm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/Config.in.arm +18 -0
index 100a28e997..3cc9358ea2 100644
@@ -473,6 +473,15 @@ config BR2_vulcan
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_7
 
 comment "armv8.2a cores"
+config BR2_neoverse_n1
+	bool "neoverse-N1 (alias ares)"
+	select BR2_ARM_CPU_HAS_ARM if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_NEON if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_THUMB2 if !BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 config BR2_cortex_a55
 	bool "cortex-A55"
 	depends on BR2_ARCH_IS_64
@@ -512,6 +521,13 @@ config BR2_cortex_a76_a55
 	select BR2_ARM_CPU_ARMV8A
 	select BR2_ARCH_HAS_MMU_OPTIONAL
 	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
+config BR2_tsv110
+	bool "tsv110"
+	depends on BR2_ARCH_IS_64
+	select BR2_ARM_CPU_HAS_FP_ARMV8
+	select BR2_ARM_CPU_ARMV8A
+	select BR2_ARCH_HAS_MMU_OPTIONAL
+	select BR2_ARCH_NEEDS_GCC_AT_LEAST_9
 
 comment "armv8.4a cores"
 config BR2_saphira
@@ -872,11 +888,13 @@ config BR2_GCC_TARGET_CPU
 	default "thunderx2t99p1"	if BR2_thunderx2t99p1
 	default "vulcan"	if BR2_vulcan
 	# armv8.2a
+	default "neoverse-n1"	if BR2_neoverse_n1
 	default "cortex-a55"	if BR2_cortex_a55
 	default "cortex-a75"	if BR2_cortex_a75
 	default "cortex-a75.cortex-a55"	if BR2_cortex_a75_a55
 	default "cortex-a76"	if BR2_cortex_a76
 	default "cortex-a76.cortex-a55"	if BR2_cortex_a76_a55
+	default "tsv110"	if BR2_tsv110
 	# armv8.4a
 	default "saphira"	if BR2_saphira
 
Signature · 1 line
2.14.5
#28 lore raw

PATCH 15/15 package/gcc: enable gcc 9.1 for ork1 (openrisc)

In reply to Romain Naour

openrisc support has been added with gcc 9.1.
Keep for now the old gcc 5 fork for ork1.

https://gcc.gnu.org/gcc-9/changes.html

Tested using qemu_or1k_defconfig.

---
 package/gcc/Config.in.host | 2 --
 package/gcc/gcc.mk         | 4 ++--
 2 files changed, 2 insertions(+), 4 deletions(-)
package/gcc/Config.in.host +0 -2
index 1d3af73e69..beea1f6cdb 100644
@@ -71,8 +71,6 @@ config BR2_GCC_VERSION_8_X
 
 config BR2_GCC_VERSION_9_X
 	bool "gcc 9.x"
-	# Broken or unsupported architectures
-	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 endchoice
package/gcc/gcc.mk +2 -2
index 5901624ea5..e07a453ecc 100644
@@ -13,7 +13,7 @@ GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION))
 ifeq ($(BR2_GCC_VERSION_ARC),y)
 GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
-else ifeq ($(BR2_or1k),y)
+else ifeq ($(BR2_GCC_VERSION_OR1K),y)
 GCC_SITE = $(call github,openrisc,or1k-gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
@@ -177,7 +177,7 @@ else
 HOST_GCC_COMMON_CONF_OPTS += --without-isl --without-cloog
 endif
 
-ifeq ($(BR2_arc)$(BR2_or1k),y)
+ifeq ($(BR2_arc)$(BR2_GCC_VERSION_OR1K),y)
 HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison
 endif
 
Signature · 1 line
2.14.5