* [Buildroot] [PATCH v2 01/15] package/glibc/arc: fix build issue with gcc-9.1
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels Romain Naour
` (13 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
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.
The upstream patch [1] modify mostly x86_64 files, but also two generic headers
where 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...
[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 <romain.naour@gmail.com>
Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
Cc: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
---
v2: remove x86_64 part of the backported patch (Yann).
commit log (Yann)
---
...0001-Add-support-for-GCC-9-attribute-copy.patch | 160 +++++++++++++++++++++
1 file changed, 160 insertions(+)
create mode 100644 package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
diff --git a/package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch b/package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
new file mode 100644
index 0000000000..0c0a8a9337
--- /dev/null
+++ b/package/glibc/arc-2018.09-release/0001-Add-support-for-GCC-9-attribute-copy.patch
@@ -0,0 +1,160 @@
+From 3e0c7985c9535304d87af3ad728f5f6d34557f0d Mon Sep 17 00:00:00 2001
+From: Martin Sebor <msebor@redhat.com>
+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.
+
+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 <romain.naour@gmail.com>
+[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.
+]
+Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>
+Cc: Evgeniy Didin <Evgeniy.Didin@synopsys.com>
+Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
+---
+ include/libc-symbols.h | 20 +++++++++++++++-----
+ misc/sys/cdefs.h | 10 ++++++++++
+ 2 files changed, 25 insertions(+), 5 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__))
+--
+2.14.5
+
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 01/15] package/glibc/arc: fix build issue with gcc-9.1 Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-26 14:51 ` Arnout Vandecappelle
2019-05-08 15:07 ` [Buildroot] [PATCH v2 03/15] [RFC] package/uclibc: remove asm constraint Romain Naour
` (12 subsequent siblings)
14 siblings, 1 reply; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
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).
For 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 a
similar/more generic option.
So, It's clearly intended for kernel developers.
Instead of backporting this patch [1] to kernel 4.19, select
unconditionally the Kconfig option CONFIG_PPC_DISABLE_WERROR
that allow to disable Werror.
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
Fix-suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: add a shared fragment in board/fragments/linux and update
qemu ppc* defconfigs. (Arnout)
v3: commit log (Yann)
enable the option from linux.mk instead of the defconfig.
---
linux/linux.mk | 2 ++
1 file changed, 2 insertions(+)
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)$(BR2_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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels
2019-05-08 15:07 ` [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels Romain Naour
@ 2019-05-26 14:51 ` Arnout Vandecappelle
2019-05-26 15:04 ` Yann E. MORIN
0 siblings, 1 reply; 18+ messages in thread
From: Arnout Vandecappelle @ 2019-05-26 14:51 UTC (permalink / raw)
To: buildroot
On 08/05/2019 17:07, Romain Naour wrote:
> 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).
>
> For 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 a
> similar/more generic option.
>
> So, It's clearly intended for kernel developers.
Since buildroot is *also* intended for kernel developers, I don't think this is
a good idea.
In fact, I don't like us forcing any options on the user. All this overriding
of .config options in linux.mk (and busybox.mk as well) is IMO confusing and
limiting user's freedom. So I don't like it if .config overrides get added.
Therefore, I prefer your v1 solution of just fixing the affected defconfigs.
Regards,
Arnout
>
> Instead of backporting this patch [1] to kernel 4.19, select
> unconditionally the Kconfig option CONFIG_PPC_DISABLE_WERROR
> that allow to disable Werror.
>
> 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
>
> Fix-suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> v2: add a shared fragment in board/fragments/linux and update
> qemu ppc* defconfigs. (Arnout)
>
> v3: commit log (Yann)
> enable the option from linux.mk instead of the defconfig.
> ---
> linux/linux.mk | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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)$(BR2_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
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels
2019-05-26 14:51 ` Arnout Vandecappelle
@ 2019-05-26 15:04 ` Yann E. MORIN
0 siblings, 0 replies; 18+ messages in thread
From: Yann E. MORIN @ 2019-05-26 15:04 UTC (permalink / raw)
To: buildroot
Arnout, All,
On 2019-05-26 16:51 +0200, Arnout Vandecappelle spake thusly:
> On 08/05/2019 17:07, Romain Naour wrote:
[--SNIP--]
> > 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).
> >
> > For 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.
> Since buildroot is *also* intended for kernel developers, I don't think this is
> a good idea.
As I said on IRC, I disagree with this reasonning. Buildroot may *also*
be used by package developpers, so by your reasoning, we should never
remove -Werror from packages.
Yes, yes, I get it that the kernel is special, but still, see below...
> In fact, I don't like us forcing any options on the user. All this overriding
> of .config options in linux.mk (and busybox.mk as well) is IMO confusing and
> limiting user's freedom. So I don't like it if .config overrides get added.
How is that different, for *this* case of -Werror, from passing
--disable-werror (or simmilar) like we do in a bunch of packages?
Do you suggest that instead of setting a .config option, we introduce a
post-patch hook that removes -Werror from the kernel's Makefile instead?
Also, do you argue that we should remove all our $(call KCONFIG_SET_OPT,...)
that we have "to make things just work and not puzzle the user"?
Regards,
Yann E. MORIN.
> Therefore, I prefer your v1 solution of just fixing the affected defconfigs.
>
> Regards,
> Arnout
>
> >
> > Instead of backporting this patch [1] to kernel 4.19, select
> > unconditionally the Kconfig option CONFIG_PPC_DISABLE_WERROR
> > that allow to disable Werror.
> >
> > 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
> >
> > Fix-suggested-by: Yann E. MORIN <yann.morin.1998@free.fr>
> > Signed-off-by: Romain Naour <romain.naour@gmail.com>
> > ---
> > v2: add a shared fragment in board/fragments/linux and update
> > qemu ppc* defconfigs. (Arnout)
> >
> > v3: commit log (Yann)
> > enable the option from linux.mk instead of the defconfig.
> > ---
> > linux/linux.mk | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > 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)$(BR2_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
> >
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Buildroot] [PATCH v2 03/15] [RFC] package/uclibc: remove asm constraint
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 01/15] package/glibc/arc: fix build issue with gcc-9.1 Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 02/15] linux: disable Werror for powerpc kernels Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 04/15] toolchain: add gcc 9 entry Romain Naour
` (11 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
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 <romain.naour@gmail.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
---
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
diff --git a/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch b/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
new file mode 100644
index 0000000000..050dc573b0
--- /dev/null
+++ b/package/uclibc/0003-RFC-sparc-syscalls.h-remove-asm-constraint.patch
@@ -0,0 +1,46 @@
+From 1854c332efa0ed5b9140d8df2a983625a1e2d9ef Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+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 <romain.naour@gmail.com>
+Cc: Waldemar Brodkorb <wbx@openadk.org>
+---
+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
+
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 04/15] toolchain: add gcc 9 entry
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (2 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 03/15] [RFC] package/uclibc: remove asm constraint Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 05/15] package/gcc: add support for gcc 9.1 Romain Naour
` (10 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
In order to add gcc 9 support for internal and external toolchain in
follow-up commits, introduce BR2_TOOLCHAIN_GCC_AT_LEAST_9 symbol.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
toolchain/Config.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 8c5a4fb88e..467d6bd84f 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 05/15] package/gcc: add support for gcc 9.1
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (3 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 04/15] toolchain: add gcc 9 entry Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 06/15] arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9 Romain Naour
` (9 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
v2: remove !BR2_ARCH_NEEDS_GCC_AT_LEAST_9 from gcc 8.x
This symbol will be introduced by the next patch (Yann)
---
package/gcc/Config.in.host | 7 +++++++
package/gcc/gcc.hash | 2 ++
2 files changed, 9 insertions(+)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 8e22a4c155..760225f7d9 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -68,6 +68,12 @@ config BR2_GCC_VERSION_8_X
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 +89,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
diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash
index 4f1e7f932f..f2702c4ba6 100644
--- a/package/gcc/gcc.hash
+++ b/package/gcc/gcc.hash
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 06/15] arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (4 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 05/15] package/gcc: add support for gcc 9.1 Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 07/15] toolchain-external: add gcc 9 entry Romain Naour
` (8 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
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
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in | 4 ++++
package/gcc/Config.in.host | 1 +
2 files changed, 5 insertions(+)
diff --git a/arch/Config.in b/arch/Config.in
index d82803c828..051d4cdab7 100644
--- a/arch/Config.in
+++ b/arch/Config.in
@@ -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
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 760225f7d9..a9f8492399 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -64,6 +64,7 @@ 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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 07/15] toolchain-external: add gcc 9 entry
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (5 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 06/15] arch: add BR2_ARCH_NEEDS_GCC_AT_LEAST_9 Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 08/15] package/gcc: switch to gcc 8.x as the default Romain Naour
` (7 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
This patch allows to use an external toolchain based on gcc 9.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
.../toolchain-external/toolchain-external-custom/Config.in.options | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
index cb7095632f..a2cc97f936 100644
--- a/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
+++ b/toolchain/toolchain-external/toolchain-external-custom/Config.in.options
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 08/15] package/gcc: switch to gcc 8.x as the default
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (6 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 07/15] toolchain-external: add gcc 9 entry Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 09/15] arch/arm: move dependency on 64-bit down to individual cores Romain Naour
` (6 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
Even if gcc 7 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.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/gcc/Config.in.host | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index a9f8492399..1d3af73e69 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -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.
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 09/15] arch/arm: move dependency on 64-bit down to individual cores
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (7 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 08/15] package/gcc: switch to gcc 8.x as the default Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 10/15] arch/arm: some cores have a different name with gcc-9 Romain Naour
` (5 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
It will make it easier to introduce new variants anywhere in the
list, when those variants have different bitness requirements.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in.arm | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index a9972978d4..71a148ad98 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 10/15] arch/arm: some cores have a different name with gcc-9
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (8 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 09/15] arch/arm: move dependency on 64-bit down to individual cores Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 11/15] arch/arm: saphira is in fact an armv8.4a Romain Naour
` (4 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in.arm | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 71a148ad98..ee6ab875a3 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 11/15] arch/arm: saphira is in fact an armv8.4a
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (9 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 10/15] arch/arm: some cores have a different name with gcc-9 Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 12/15] arch/arm: add two new 64-bit-only armv8a cores Romain Naour
` (3 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
... 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.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in.arm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index ee6ab875a3..b46c1c5cd1 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 12/15] arch/arm: add two new 64-bit-only armv8a cores
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (10 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 11/15] arch/arm: saphira is in fact an armv8.4a Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 13/15] arch/arm: add two new cortex-based armv8.2a cores Romain Naour
` (2 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Build tested:
https://gitlab.com/kubu93/buildroot/pipelines/60318953
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in.arm | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index b46c1c5cd1..d29b6edbc4 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 13/15] arch/arm: add two new cortex-based armv8.2a cores
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (11 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 12/15] arch/arm: add two new 64-bit-only armv8a cores Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 14/15] arch/arm: add two new non-cortex-based " Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 15/15] package/gcc: enable gcc 9.1 for ork1 (openrisc) Romain Naour
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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
Build tested:
https://gitlab.com/kubu93/buildroot/pipelines/60318953
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
arch/Config.in.arm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index d29b6edbc4..100a28e997 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 14/15] arch/arm: add two new non-cortex-based armv8.2a cores
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (12 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 13/15] arch/arm: add two new cortex-based armv8.2a cores Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
2019-05-08 15:07 ` [Buildroot] [PATCH v2 15/15] package/gcc: enable gcc 9.1 for ork1 (openrisc) Romain Naour
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
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
Build tested:
https://gitlab.com/kubu93/buildroot/pipelines/60318953
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Romain: rename BR2_ares to BR2_neoverse_n1]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
v2: add neoverse-e1 (Yann)
reorder alphabetically after renaming ares to neoverse-n1.
Note: The Neoverse E1 CPU needs at least binutils 2.32 to support Speculative Store
Bypass Safe instruction (SSBS) which is part of ARMv8.5-A architecture extensions.
Postpone the support for this new ARM core.
See: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=104fefeebb544b7745bb353b63110afa46119647
---
arch/Config.in.arm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index 100a28e997..b1d9173b84 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -512,6 +512,22 @@ 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_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_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
@@ -877,6 +893,8 @@ config BR2_GCC_TARGET_CPU
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 "neoverse-n1" if BR2_neoverse_n1
+ default "tsv110" if BR2_tsv110
# armv8.4a
default "saphira" if BR2_saphira
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread* [Buildroot] [PATCH v2 15/15] package/gcc: enable gcc 9.1 for ork1 (openrisc)
2019-05-08 15:07 [Buildroot] [PATCH v2 00/15] Add gcc 9.1 Romain Naour
` (13 preceding siblings ...)
2019-05-08 15:07 ` [Buildroot] [PATCH v2 14/15] arch/arm: add two new non-cortex-based " Romain Naour
@ 2019-05-08 15:07 ` Romain Naour
14 siblings, 0 replies; 18+ messages in thread
From: Romain Naour @ 2019-05-08 15:07 UTC (permalink / raw)
To: buildroot
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.
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
package/gcc/Config.in.host | 2 --
package/gcc/gcc.mk | 4 ++--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 1d3af73e69..beea1f6cdb 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -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
diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 5901624ea5..e07a453ecc 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -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
--
2.14.5
^ permalink raw reply related [flat|nested] 18+ messages in thread