Skip to contentSkip to conversation

package/gcc: add support for gcc 8.1

PATCH New Romain Naour 5 participants 17 messages May 5, 2018 – Jul 30, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++
 package/gcc/8.1.0/0003-remove-selftests.patch      | 149 +++++++++++++++++++++
 package/gcc/Config.in.host                         |   7 +
 package/gcc/gcc.hash                               |   2 +
 package/gcc/gcc.mk                                 |  10 +-
 toolchain/Config.in                                |   5 +
 .../toolchain-external-custom/Config.in.options    |   6 +
 8 files changed, 248 insertions(+), 5 deletions(-)
 create mode 100644 package/gcc/8.1.0/0001-uclibc-conf.patch
 create mode 100644 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch
 create mode 100644 package/gcc/8.1.0/0003-remove-selftests.patch
package/gcc/8.1.0/0001-uclibc-conf.patch new file +29 -0
new file mode 100644
index 0000000000..7d0f710945
@@ -0,0 +1,29 @@
+From 07475e62626e246df07f35c4427b207c480b1f95 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Tue, 2 May 2017 22:36:15 +0200
+Subject: [PATCH 1/3] uclibc-conf
+
+[Romain: convert to git patch]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ contrib/regression/objs-gcc.sh | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/contrib/regression/objs-gcc.sh b/contrib/regression/objs-gcc.sh
+index 60b0497fea2..6dc7eadff36 100755
+--- a/contrib/regression/objs-gcc.sh
++++ b/contrib/regression/objs-gcc.sh
+@@ -106,6 +106,10 @@ if [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-gnu ]
+  then
+   make all-gdb all-dejagnu all-ld || exit 1
+   make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++  make all-gdb all-dejagnu all-ld || exit 1
++  make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+   make bootstrap || exit 1
+   make install || exit 1
+-- 
+2.14.3
+
package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch new file +45 -0

45 lines not on this page · raw message

package/gcc/8.1.0/0003-remove-selftests.patch new file +149 -0

149 lines not on this page · raw message

package/gcc/Config.in.host +7 -0
index 7c08fb3596..ae91b5c0c4 100644
@@ -61,6 +61,12 @@ config BR2_GCC_VERSION_7_X
 	depends on !BR2_or1k
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
+config BR2_GCC_VERSION_8_X
+	bool "gcc 8.x"
+	# Broken or unsupported architectures
+	depends on !BR2_or1k
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
+
 endchoice
 
 config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE
@@ -73,6 +79,7 @@ config BR2_GCC_VERSION
 	default "5.5.0"     if BR2_GCC_VERSION_5_X
 	default "6.4.0"     if BR2_GCC_VERSION_6_X
 	default "7.3.0"     if BR2_GCC_VERSION_7_X
+	default "8.1.0"     if BR2_GCC_VERSION_8_X
 	default "arc-2018.03-rc1" if BR2_GCC_VERSION_ARC
 	default "or1k-musl-5.4.0-20170218" if BR2_GCC_VERSION_OR1K
 
package/gcc/gcc.hash +2 -0
index d9a651b547..a2efe551ac 100644
@@ -6,6 +6,8 @@ sha512  670ff52c2ae12c7852c12987e91798c5aa8bd6daf21f0d6e0cd57a4aa59cc4f06a837fe7
 sha512  02c60e54527c7adf584798d5251f8a0b80c93d5deafce82501b2c28e6692e0bd783927bbfc4bc527a863c0cccc025150a34740a9e29badb02d4b48e56a8aba90  gcc-6.4.0.tar.xz
 # From ftp://gcc.gnu.org/pub/gcc/releases/gcc-7.3.0/sha512.sum
 sha512  ad41a7e4584e40e92cdf860bc0288500fbaf5dfb7e8c3fcabe9eba809c87bcfa85b46c19c19921b0cdf6d05483faede8287bb9ea120c0d1559449a70e602c8d4  gcc-7.3.0.tar.xz
+# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-8.1.0/sha512.sum
+sha512  c96246f34a7aeb404c4525b754dc7f7708a18e06271aadb2b32fef00e6e0940f584e52430bfe2ab01e699c93e3cb418adc113d2622fa826facbec0ec8ce3eb2c  gcc-8.1.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  16e5f9d1637be9a099a996074dc43803803497965c1eab6c0057f10d193d30dcc405ad852df82c4f8c61b195195ee797b788ba0b235d7b03e4410806ac5f94bc  gcc-arc-2018.03-rc1.tar.gz
package/gcc/gcc.mk +5 -5
index 0afb06a57e..1ae9b7edd9 100644
@@ -18,13 +18,13 @@ GCC_SITE = $(call github,openrisc,or1k-gcc,$(GCC_VERSION))
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz
 else
 GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION)
-# From version 5.5.0, 6.4.0 and 7.2.0 a bz2 release tarball is not
+# From version 5.5.0, 6.4.0, 7.2.0 and 8.1.0 a bz2 release tarball is not
 # provided anymore. Use the xz tarball instead.
-ifeq ($(BR2_GCC_VERSION_5_X)$(BR2_GCC_VERSION_6_X)$(BR2_GCC_VERSION_7_X),y)
-GCC_SOURCE = gcc-$(GCC_VERSION).tar.xz
-else
+ifeq ($(BR2_GCC_VERSION_4_9_X),y)
 GCC_SOURCE = gcc-$(GCC_VERSION).tar.bz2
-endif # BR2_GCC_VERSION_6_X
+else
+GCC_SOURCE = gcc-$(GCC_VERSION).tar.xz
+endif
 endif
 
 #
toolchain/Config.in +5 -0
index 121ddb4fa4..f33e359c04 100644
@@ -409,10 +409,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_7
 	bool
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_6
 
+config BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_7
+
 # 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 "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
 	default "5"	if BR2_TOOLCHAIN_GCC_AT_LEAST_5
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +6 -0
index 65d94d0adf..5261165a90 100644
@@ -27,6 +27,7 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX
 
 choice
 	bool "External toolchain gcc version"
+	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
 	default BR2_TOOLCHAIN_EXTERNAL_GCC_5   if BR2_ARCH_NEEDS_GCC_AT_LEAST_5
@@ -37,8 +38,13 @@ choice
 	  Set to the gcc version that is used by your external
 	  toolchain.
 
+config BR2_TOOLCHAIN_EXTERNAL_GCC_8
+	bool "8.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_8
+
 config BR2_TOOLCHAIN_EXTERNAL_GCC_7
 	bool "7.x"
+	depends on !BR2_ARCH_NEEDS_GCC_AT_LEAST_8
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
 config BR2_TOOLCHAIN_EXTERNAL_GCC_6
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Hello Romain,

Thanks for working on this!

Quoted 20 lines · Romain Naour

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
Quoted 9 lines
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++
 package/gcc/8.1.0/0003-remove-selftests.patch      | 149 +++++++++++++++++++++
 package/gcc/Config.in.host                         |   7 +
 package/gcc/gcc.hash                               |   2 +
 package/gcc/gcc.mk                                 |  10 +-
 toolchain/Config.in                                |   5 +
 .../toolchain-external-custom/Config.in.options    |   6 +

Could you split up this patch in several patches:

- One adding the toolchain/Config.in contents for gcc 8.x

- One adding support for gcc 8.x in package/gcc

- One adding support for gcc 8.x in toolchain/toolchain-external

It would be good if you could also add a patch to update our default gcc version to 7.x.

Maybe it's also time to remove gcc 4.9 and gcc 5.x ? I know when gcc 7.x was added and we changed to gcc 6.x as the default, we should have removed gcc 4.9, but there was some opposition to this. Hopefully we can do this removal now ?

package/gcc/8.1.0/0001-uclibc-conf.patch line 4

Quoted 10 lines
package/gcc/8.1.0/0001-uclibc-conf.patch new file +4 -0
new file mode 100644
index 0000000000..7d0f710945
@@ -0,0 +1,29 @@
+From 07475e62626e246df07f35c4427b207c480b1f95 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Tue, 2 May 2017 22:36:15 +0200
+Subject: [PATCH 1/3] uclibc-conf

Use "git format-patch -N" when generating patches to not have numbering inside the patches.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Hi Thomas,

Le 20/05/2018 ? 12:45, Thomas Petazzoni a ?crit?:

Quoted 35 lines

Hello Romain,

Thanks for working on this!

Quoted 20 lines · Romain Naour

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
Quoted 9 lines
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++
 package/gcc/8.1.0/0003-remove-selftests.patch      | 149 +++++++++++++++++++++
 package/gcc/Config.in.host                         |   7 +
 package/gcc/gcc.hash                               |   2 +
 package/gcc/gcc.mk                                 |  10 +-
 toolchain/Config.in                                |   5 +
 .../toolchain-external-custom/Config.in.options    |   6 +
Quoted 7 lines

Could you split up this patch in several patches:

- One adding the toolchain/Config.in contents for gcc 8.x

- One adding support for gcc 8.x in package/gcc

- One adding support for gcc 8.x in toolchain/toolchain-external

Previous gcc bump was done in one patch:

(gcc 7)
https://git.buildroot.net/buildroot/commit/?id=4314161159ce1556e8c14d1d2e22aaf2a8618b82
(gcc 6)
https://git.buildroot.net/buildroot/commit/?id=519d83bfa0442439026db4e71e605a5c1347e566

I wanted to use the same method but ok I'll split this patch if you want.

Quoted 3 lines

It would be good if you could also add a patch to update our default gcc version to 7.x.

Ok, this can be done in a followup patch.

Quoted 5 lines

Maybe it's also time to remove gcc 4.9 and gcc 5.x ? I know when gcc 7.x was added and we changed to gcc 6.x as the default, we should have removed gcc 4.9, but there was some opposition to this. Hopefully we can do this removal now ?

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

Quoted 14 lines

package/gcc/8.1.0/0001-uclibc-conf.patch line 4

Quoted 11 lines
package/gcc/8.1.0/0001-uclibc-conf.patch new file +4 -0
new file mode 100644
index 0000000000..7d0f710945
@@ -0,0 +1,29 @@
+From 07475e62626e246df07f35c4427b207c480b1f95 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Tue, 2 May 2017 22:36:15 +0200
+Subject: [PATCH 1/3] uclibc-conf

Use "git format-patch -N" when generating patches to not have numbering inside the patches.

Ok, sometime I forgot to add -N when generating a patch series for a package... I'll fix.

Best regards,
Romain

Quoted 5 lines

Thanks!

Thomas

#3 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Thomas,

Le 21/05/2018 ? 17:45, Romain Naour a ?crit?:

Quoted 31 lines

Hi Thomas,

Le 20/05/2018 ? 12:45, Thomas Petazzoni a ?crit?:

Quoted 28 lines

Hello Romain,

Thanks for working on this!

Quoted 23 lines · Romain Naour

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++

Btw, why we still need these two patches?
It seems that they are in the gcc package since gcc 4.2.4 (i.e ten years)

For 0001-uclibc-conf.patch, why we need to add a new case for i686-pc-linux-uclibc? what's about other target and libc (musl)? I believe this can be removed.

0002-arm-softfloat-libgcc.patch was added in 2007 [1] for gcc 4.1.2. I believe arm soft-float should work out of the box now.

Best regards,
Romain

[1]
https://git.buildroot.net/buildroot/commit/?id=b2683e4d2c59cb3e8a5fe0e2500ac6625e8f60bf

#4 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Quoted 35 lines · Romain Naour

Thomas,

Le 21/05/2018 ? 17:45, Romain Naour a ?crit?:

Quoted 31 lines

Hi Thomas,

Le 20/05/2018 ? 12:45, Thomas Petazzoni a ?crit?:

Quoted 28 lines

Hello Romain,

Thanks for working on this!

Quoted 23 lines · Romain Naour

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++
Quoted 6 lines

Btw, why we still need these two patches?
It seems that they are in the gcc package since gcc 4.2.4 (i.e ten years)

For 0001-uclibc-conf.patch, why we need to add a new case for i686-pc-linux-uclibc? what's about other target and libc (musl)? I believe this can be removed.

Especially since it's patching contrib/regression, which is not used at all
during the build...

I'd say, remove the patch, build for i686-uclibc, and see if things still work
(preferably with a qemu-user runtime test).

Quoted 2 lines

0002-arm-softfloat-libgcc.patch was added in 2007 [1] for gcc 4.1.2. I believe arm soft-float should work out of the box now.

The patch refers to https://sourceware.org/ml/crossgcc/2008-05/msg00009.html
which says "Unfortuantely, arm-gcc defaults to generating code for armv5t." Since we always explicitly pass the target CPU for ARM, the default CPU shouldn't matter. So, again, a runtime qemu-user test for arm920t would confirm that the patch isn't needed.

If both patches are indeed unneeded, I'd only remove them for GCC 8, not the
earlier ones. They're not really hurting the earlier versions at the moment.

By the way, I think patch 0003 can also be removed. We only need it because we
exclude the testsuite in the extraction, to save 252MB of disk space (reducing the build directory size from 850 to 600MB). I don't think it's worthwhile carrying a patch just for that. Also, since GCC 7, the libjava directory no longer exists. So I'd just eliminate that HOST_GCC_EXCLUDES. Thomas, you added this feature back in 00e9b1e4f7, what do you think?

Regards,
Arnout

Quoted 7 lines

Best regards,
Romain

[1]
https://git.buildroot.net/buildroot/commit/?id=b2683e4d2c59cb3e8a5fe0e2500ac6625e8f60bf

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Hello,

Quoted 13 lines · Arnout Vandecappelle
Quoted 2 lines

0002-arm-softfloat-libgcc.patch was added in 2007 [1] for gcc 4.1.2. I believe arm soft-float should work out of the box now.

The patch refers to https://sourceware.org/ml/crossgcc/2008-05/msg00009.html
which says "Unfortuantely, arm-gcc defaults to generating code for armv5t." Since we always explicitly pass the target CPU for ARM, the default CPU shouldn't matter. So, again, a runtime qemu-user test for arm920t would confirm that the patch isn't needed.

If both patches are indeed unneeded, I'd only remove them for GCC 8, not the
earlier ones. They're not really hurting the earlier versions at the moment.

Quoted 6 lines

By the way, I think patch 0003 can also be removed. We only need it because we
exclude the testsuite in the extraction, to save 252MB of disk space (reducing the build directory size from 850 to 600MB). I don't think it's worthwhile carrying a patch just for that. Also, since GCC 7, the libjava directory no longer exists. So I'd just eliminate that HOST_GCC_EXCLUDES. Thomas, you added this feature back in 00e9b1e4f7, what do you think?

No strong feeling about it. It's still 250 MB of saved disk space, and also the time of extraction (doubled, once for gcc-initial, once for gcc-final). Back then, I was on a quest trying to reduce the build time, and this was part of it. There is obviously a trade off between efficiency and ease of maintenance here, and whether those tweaks are useful enough to warrant the additional maintenance burden, I don't know.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to Romain Naour
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 6 lines

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Hello,

Quoted 2 lines · Peter Korsgaard

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

I agree. We can't keep gcc 4.9 just for the sake of one board.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to Peter Korsgaard

Greetings Peter,

Quoted 13 lines

Sent: Tuesday, May 22, 2018 at 12:52 AM
From: "Peter Korsgaard" <[email protected]>
To: "Romain Naour" <[email protected]>
Cc: "Dagg Stompler" <[email protected]>, "Thomas Petazzoni" <[email protected]>, buildroot at buildroot.org
Subject: Re: [Buildroot] [PATCH] package/gcc: add support for gcc 8.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 2 lines

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

Quoted 7 lines
Quoted 3 lines

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

afaik, the mainline support for this board lacks proper vpu support.
in addition, due to the patchwork issue, my last bunch of patches of mainline support were lost and got ignored so I've decided to stop pursuing this matter.

as said in another mail here, I'm unable to boot the board as I've misplaced the ac adapter, I can try looking for it again but it won't be until the weekend.
you said a while ago you have access to such board, if you have time to bump the vendor kernel and uboot revs to latest and test if it works, maybe this issue can be resolved without dropping support for this board.

Dagg.

#9 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"daggs" == daggs <[email protected]> writes:

Hi,

Quoted 1 line

afaik, the mainline support for this board lacks proper vpu support.

Correct, but that shouldn't be a blocker for a Buildroot defconfig?

Quoted 3 lines

in addition, due to the patchwork issue, my last bunch of patches of mainline support were lost and got ignored so I've decided to stop pursuing this matter.

:/

Quoted 7 lines

as said in another mail here, I'm unable to boot the board as I've misplaced the ac adapter, I can try looking for it again but it won't be until the weekend.
you said a while ago you have access to such board, if you have time to bump the vendor kernel and uboot revs to latest and test if it works, maybe this issue can be resolved without dropping support for this board.

I don't have an odroidc2, but I know some colleagues of mine do. If needed, I can try to temporarily borrow one.

Signature · 1 line
Bye, Peter Korsgaard
#10 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to daggs

Hello,

Quoted 2 lines · daggs

afaik, the mainline support for this board lacks proper vpu support.
in addition, due to the patchwork issue, my last bunch of patches of mainline support were lost and got ignored so I've decided to stop pursuing this matter.

The patchwork issues are fixed now, so you can resend any patch that got "lost".

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#11 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to Peter Korsgaard
Quoted 7 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 2 lines

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

Quoted 6 lines
Quoted 3 lines

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

I voted for keeping 4.9 because quite a few chips are stuck with ancient vendor
kernels and U-Boot. For the kernel I'd accept it, but for U-Boot it's generally more difficult to go to an upstream version, there is not much of a security reason to bump U-Boot, and backporting the compiler.h changes is not entirely trivial. I think keeping the 4.9 option makes the out-of-the-box experience for people who are stuck in this situation easier.

Also, "maintaining" the 4.9 version really doesn't pose much of an overhead. At
least as long as we support multiple gcc versions, and there are no issues building gcc 4.9 on recent distros.

So I'm still voting for keeping 4.9, at least until it starts breaking on
recent distros. If we remove something, remove 5.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#12 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Arnout, All,

Le 23/05/2018 ? 00:08, Arnout Vandecappelle a ?crit?:

Quoted 24 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 2 lines

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

Quoted 6 lines
Quoted 3 lines

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

I voted for keeping 4.9 because quite a few chips are stuck with ancient vendor
kernels and U-Boot. For the kernel I'd accept it, but for U-Boot it's generally more difficult to go to an upstream version, there is not much of a security reason to bump U-Boot, and backporting the compiler.h changes is not entirely trivial. I think keeping the 4.9 option makes the out-of-the-box experience for people who are stuck in this situation easier.

Quoted 3 lines

Also, "maintaining" the 4.9 version really doesn't pose much of an overhead. At
least as long as we support multiple gcc versions, and there are no issues building gcc 4.9 on recent distros.

gcc 4.9 still build with gcc 8 as host compiler but with a lot of warning.

Note that we don't keep any specific version of Binutils for gcc 4.9.x. It's not sure that recent Binutils version will be compatible with gcc 4.9.x.

Quoted 3 lines

So I'm still voting for keeping 4.9, at least until it starts breaking on
recent distros. If we remove something, remove 5.

Ok

Best regards,
Romain

Quoted 4 lines

Regards,
Arnout

#13 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Quoted 27 lines · Romain Naour

Arnout, All,

Le 23/05/2018 ? 00:08, Arnout Vandecappelle a ?crit?:

Quoted 24 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 2 lines

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

Quoted 6 lines
Quoted 3 lines

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

I believe that mainline support for this board is fairly far, so if that is the only thing keeping 4.9 around I think we can drop it.

I voted for keeping 4.9 because quite a few chips are stuck with ancient vendor
kernels and U-Boot. For the kernel I'd accept it, but for U-Boot it's generally more difficult to go to an upstream version, there is not much of a security reason to bump U-Boot, and backporting the compiler.h changes is not entirely trivial. I think keeping the 4.9 option makes the out-of-the-box experience for people who are stuck in this situation easier.

Quoted 8 lines
Quoted 3 lines

Also, "maintaining" the 4.9 version really doesn't pose much of an overhead. At
least as long as we support multiple gcc versions, and there are no issues building gcc 4.9 on recent distros.

gcc 4.9 still build with gcc 8 as host compiler but with a lot of warning.

Note that we don't keep any specific version of Binutils for gcc 4.9.x. It's not sure that recent Binutils version will be compatible with gcc 4.9.x.

I don't see a reason why recent binutils shouldn't be compatible with old gcc.
People are still successfully building gcc 2.95...

Regards,
Arnout

Quoted 15 lines
Quoted 4 lines

So I'm still voting for keeping 4.9, at least until it starts breaking on
recent distros. If we remove something, remove 5.

Ok

Best regards,
Romain

Quoted 4 lines

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#14 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to Romain Naour

Greetings Romain,

Quoted 95 lines

Sent: Monday, May 21, 2018 at 6:45 PM
From: "Romain Naour" <[email protected]>
To: "Thomas Petazzoni" <[email protected]>
Cc: buildroot at buildroot.org, "Dagg Stompler" <[email protected]>, "Arnout Vandecappelle" <[email protected]>
Subject: Re: [Buildroot] [PATCH] package/gcc: add support for gcc 8.1

Hi Thomas,

Le 20/05/2018 ? 12:45, Thomas Petazzoni a ?crit?:

Quoted 35 lines

Hello Romain,

Thanks for working on this!

Quoted 20 lines · Romain Naour

Remove 0860-cilk-fix-build-without-wchar.patch since cilk has been removed from gcc.

Rebase 0900-remove-selftests.patch on gcc 8.1.0

Remove upstream patches 0001-m68k-coldfire-pr68467.patch and 0892-microblaze-Revert.patch.

Use bz2 release tarball only for gcc 4.9 since all other version now use xz tarball.

Runtime tested on x86_64 with binutils 2.30, gcc 8.1.0, kernel headers 4.14 and glibc 2.27.

Buildtime tested with glibc with all supported architectures.

Buildtime tested on x86_64 with musl and uClibc-ng

Cc Thomas Petazzoni <[email protected]>
Quoted 9 lines
---
 package/gcc/8.1.0/0001-uclibc-conf.patch           |  29 ++++
 package/gcc/8.1.0/0002-arm-softfloat-libgcc.patch  |  45 +++++++
 package/gcc/8.1.0/0003-remove-selftests.patch      | 149 +++++++++++++++++++++
 package/gcc/Config.in.host                         |   7 +
 package/gcc/gcc.hash                               |   2 +
 package/gcc/gcc.mk                                 |  10 +-
 toolchain/Config.in                                |   5 +
 .../toolchain-external-custom/Config.in.options    |   6 +
Quoted 7 lines

Could you split up this patch in several patches:

- One adding the toolchain/Config.in contents for gcc 8.x

- One adding support for gcc 8.x in package/gcc

- One adding support for gcc 8.x in toolchain/toolchain-external

Previous gcc bump was done in one patch:

(gcc 7)
https://git.buildroot.net/buildroot/commit/?id=4314161159ce1556e8c14d1d2e22aaf2a8618b82
(gcc 6)
https://git.buildroot.net/buildroot/commit/?id=519d83bfa0442439026db4e71e605a5c1347e566

I wanted to use the same method but ok I'll split this patch if you want.

Quoted 3 lines

It would be good if you could also add a patch to update our default gcc version to 7.x.

Ok, this can be done in a followup patch.

Quoted 5 lines

Maybe it's also time to remove gcc 4.9 and gcc 5.x ? I know when gcc 7.x was added and we changed to gcc 6.x as the default, we should have removed gcc 4.9, but there was some opposition to this. Hopefully we can do this removal now ?

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

Quoted 14 lines

package/gcc/8.1.0/0001-uclibc-conf.patch line 4

Quoted 11 lines
package/gcc/8.1.0/0001-uclibc-conf.patch new file +4 -0
new file mode 100644
index 0000000000..7d0f710945
@@ -0,0 +1,29 @@
+From 07475e62626e246df07f35c4427b207c480b1f95 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Tue, 2 May 2017 22:36:15 +0200
+Subject: [PATCH 1/3] uclibc-conf

Use "git format-patch -N" when generating patches to not have numbering inside the patches.

Quoted 13 lines

Ok, sometime I forgot to add -N when generating a patch series for a package... I'll fix.

Best regards,
Romain

Quoted 5 lines

Thanks!

Thomas

the main issue with gcc for this board's vendor's support is uboot, the vendor's uboot supports gcc 5.x for sometime now but I was never been able to make it boot. latest vendor's uboot supports gcc 7.x but I'm unable to test is as I've misplaced both my ac adapter and serial when I've had to clear out my work room.

if it blocks, you can what ever you feel is right.

Dagg.

#15 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

In reply to Romain Naour

Hello,

Quoted 8 lines · Romain Naour
Quoted 7 lines

Could you split up this patch in several patches:

- One adding the toolchain/Config.in contents for gcc 8.x

- One adding support for gcc 8.x in package/gcc

- One adding support for gcc 8.x in toolchain/toolchain-external

Quoted 8 lines

Previous gcc bump was done in one patch:

(gcc 7)
https://git.buildroot.net/buildroot/commit/?id=4314161159ce1556e8c14d1d2e22aaf2a8618b82
(gcc 6)
https://git.buildroot.net/buildroot/commit/?id=519d83bfa0442439026db4e71e605a5c1347e566

I wanted to use the same method but ok I'll split this patch if you want.

I think it makes sense to split it up.

Quoted 4 lines
Quoted 2 lines

It would be good if you could also add a patch to update our default gcc version to 7.x.

Ok, this can be done in a followup patch.

Yes it _should_ be done in a separate patch.

Quoted 11 lines
Quoted 4 lines

Maybe it's also time to remove gcc 4.9 and gcc 5.x ? I know when gcc 7.x was added and we changed to gcc 6.x as the default, we should have removed gcc 4.9, but there was some opposition to this. Hopefully we can do this removal now ?

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

So the conclusion from Arnout is to keep 4.9, but to remove gcc 5. I'm fine with this, so let's do this.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#16 lore raw

PATCH 1/1 package/gcc: add support for gcc 8.1

Hi Thomas,

Le 23/05/2018 ? 10:29, Thomas Petazzoni a ?crit?:

Quoted 14 lines

Hello,

Quoted 10 lines · Romain Naour
Quoted 7 lines

Could you split up this patch in several patches:

- One adding the toolchain/Config.in contents for gcc 8.x

- One adding support for gcc 8.x in package/gcc

- One adding support for gcc 8.x in toolchain/toolchain-external

Previous gcc bump was done in one patch:

Quoted 8 lines
Quoted 6 lines

(gcc 7)
https://git.buildroot.net/buildroot/commit/?id=4314161159ce1556e8c14d1d2e22aaf2a8618b82
(gcc 6)
https://git.buildroot.net/buildroot/commit/?id=519d83bfa0442439026db4e71e605a5c1347e566

I wanted to use the same method but ok I'll split this patch if you want.

I think it makes sense to split it up.

OK

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It would be good if you could also add a patch to update our default gcc version to 7.x.

Ok, this can be done in a followup patch.

Yes it _should_ be done in a separate patch.

OK, I'll add this patch in v2.

Quoted 9 lines
Quoted 9 lines
Quoted 5 lines

Maybe it's also time to remove gcc 4.9 and gcc 5.x ? I know when gcc 7.x was added and we changed to gcc 6.x as the default, we should have removed gcc 4.9, but there was some opposition to this. Hopefully we can do this removal now ?

See the reply from Arnout and Dagg for gcc 4.9:
http://patchwork.ozlabs.org/patch/767087

Quoted 6 lines
Quoted 3 lines

I'm not sure that the odroidc2 defconfig is able to build with gcc >= 4.9 since it's stuck at kernel odroidc2-3.14.y and uboot odroidc2-v2015.01. Dagg, what do we do for this board?

So the conclusion from Arnout is to keep 4.9, but to remove gcc 5. I'm fine with this, so let's do this.

OK.

Also, what do we do for gcc patches we have since a long time ? see http://lists.busybox.net/pipermail/buildroot/2018-May/221966.html

Best regards,
Romain

Quoted 5 lines

Thanks!

Thomas