Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/gcc: disable libsanitizer with gcc 7.5 and glibc 2.31 toolchain
@ 2020-07-27  9:29 Romain Naour
  2020-07-27  9:29 ` [Buildroot] [PATCH 2/2] package/{glibc, localedef}: bump to version 2.31 Romain Naour
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-07-27  9:29 UTC (permalink / raw)
  To: buildroot

From: Romain Naour <romain.naour@smile.fr>

libsanitizer in gcc 7.x fails to build with glibc 2.31. Fixing it would
require backporting an upstream commit:

    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4abc46b51af5751d657764d0c44b8a4aeed06302

However, the backport is not trivial, as there are a lot of conflicts.

Disable libsanitizer since the gcc 7.5 branch is now closed
(unmaintained) and it's not a trivial merge.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
v4: improve commit log (From Yann)
---
 package/gcc/gcc.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index d8260bc87b..b834269adc 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -119,6 +119,16 @@ else
 HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
 endif
 
+# Disable libsanitizer due to a build issue with gcc 7.5 and glibc 2.31.
+# It would require to backport the following upstream commit
+# https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4abc46b51af5751d657764d0c44b8a4aeed06302
+# but it conflict with gcc 7.5 libsanitizer code.
+# Disable libsanitizer since the gcc 7.5 branch is now closed
+# (unmaintained) and it's not a trivial merge.
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_GLIBC)$(BR2_GCC_VERSION_7_X),yy)
+HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
+endif
+
 # libsanitizer requires wordexp, not in default uClibc config. Also
 # doesn't build properly with musl.
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_TOOLCHAIN_BUILDROOT_MUSL),y)
-- 
2.25.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] package/gcc: disable libsanitizer with gcc 7.5 and glibc toolchain
@ 2020-04-24 16:48 Romain Naour
  2020-04-24 16:48 ` [Buildroot] [PATCH 2/2] package/{glibc, localedef}: bump to version 2.31 Romain Naour
  0 siblings, 1 reply; 4+ messages in thread
From: Romain Naour @ 2020-04-24 16:48 UTC (permalink / raw)
  To: buildroot

Disable libsanitizer due to a build issue with gcc 7.5 and glibc 2.31.
It would require to backport the following upstream commit
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4abc46b51af5751d657764d0c44b8a4aeed06302
but it conflict with gcc 7.5 libsanitizer code.
Disable libsanitizer since the gcc 7.5 branch is now closed
(unmaintained) and it's not a trivial merge.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Otherwise we have to disable gcc 7.5 entirely for glibc toolchain.
---
 package/gcc/gcc.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk
index 50f2a3fcb7..2fb1d29199 100644
--- a/package/gcc/gcc.mk
+++ b/package/gcc/gcc.mk
@@ -126,6 +126,16 @@ else
 HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath
 endif
 
+# Disable libsanitizer due to a build issue with gcc 7.5 and glibc 2.31.
+# It would require to backport the following upstream commit
+# https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4abc46b51af5751d657764d0c44b8a4aeed06302
+# but it conflict with gcc 7.5 libsanitizer code.
+# Disable libsanitizer since the gcc 7.5 branch is now closed
+# (unmaintained) and it's not a trivial merge.
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC)$(BR2_GCC_VERSION_7_X),yy)
+HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
+endif
+
 # libsanitizer requires wordexp, not in default uClibc config. Also
 # doesn't build properly with musl.
 ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_TOOLCHAIN_BUILDROOT_MUSL),y)
-- 
2.21.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-27 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-27  9:29 [Buildroot] [PATCH 1/2] package/gcc: disable libsanitizer with gcc 7.5 and glibc 2.31 toolchain Romain Naour
2020-07-27  9:29 ` [Buildroot] [PATCH 2/2] package/{glibc, localedef}: bump to version 2.31 Romain Naour
2020-07-27 13:29   ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2020-04-24 16:48 [Buildroot] [PATCH 1/2] package/gcc: disable libsanitizer with gcc 7.5 and glibc toolchain Romain Naour
2020-04-24 16:48 ` [Buildroot] [PATCH 2/2] package/{glibc, localedef}: bump to version 2.31 Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox