Skip to contentSkip to conversation

package/gcc: help libbacktrace detection of sync builtins

PATCH New Romain Naour 3 participants 3 messages Sep 25, 2020 – Oct 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/gcc: help libbacktrace detection of sync builtins

From: Thomas Petazzoni <[email protected]>

The logic in libbacktrace/configure.ac to detect if __sync builtins are available assumes they are as soon as target_subdir is not empty, i.e when cross-compiling. However, some platforms do not have __sync builtins, so help the configure script a bit.

"libbacktrace_cv_sys_sync=no" is lost when it is added to HOST_GCC_COMMON_CONF_ENV because the environment is not exported when executing the libbacktrace configure script.

Use target_configargs to force "libbacktrace_cv_sys_sync=no" when executiong the libbacktrace configure script.

Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359681

[Romain: use target_configargs="libbacktrace_cv_sys_sync=no"]
---
 package/gcc/gcc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/gcc/gcc.mk +8 -0
index b834269adc..6e60ea9980 100644
@@ -141,6 +141,14 @@ ifeq ($(BR2_sparc)$(BR2_sparc64),y)
 HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer
 endif
 
+# The logic in libbacktrace/configure.ac to detect if __sync builtins
+# are available assumes they are as soon as target_subdir is not
+# empty, i.e when cross-compiling. However, some platforms do not have
+# __sync builtins, so help the configure script a bit.
+ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4),)
+HOST_GCC_COMMON_CONF_ENV += target_configargs="libbacktrace_cv_sys_sync=no"
+endif
+
 # TLS support is not needed on uClibc/no-thread and
 # uClibc/linux-threads, otherwise, for all other situations (glibc,
 # musl and uClibc/NPTL), we need it.
Signature · 1 line
2.25.4
#1 lore raw

PATCH 1/1 package/gcc: help libbacktrace detection of sync builtins

Quoted 17 lines · On Fri, 25 Sep 2020 11:04:51 +0200 Romain Naour <[email protected]> wrote:

From: Thomas Petazzoni <[email protected]>

The logic in libbacktrace/configure.ac to detect if __sync builtins are available assumes they are as soon as target_subdir is not empty, i.e when cross-compiling. However, some platforms do not have __sync builtins, so help the configure script a bit.

"libbacktrace_cv_sys_sync=no" is lost when it is added to HOST_GCC_COMMON_CONF_ENV because the environment is not exported when executing the libbacktrace configure script.

Use target_configargs to force "libbacktrace_cv_sys_sync=no" when executiong the libbacktrace configure script.

Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359681

Quoted 6 lines
[Romain: use target_configargs="libbacktrace_cv_sys_sync=no"]
---
 package/gcc/gcc.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

Applied to master, thanks.

Thomas

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

PATCH 1/1 package/gcc: help libbacktrace detection of sync builtins

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

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

From: Thomas Petazzoni <[email protected]>
The logic in libbacktrace/configure.ac to detect if __sync builtins are available assumes they are as soon as target_subdir is not empty, i.e when cross-compiling. However, some platforms do not have __sync builtins, so help the configure script a bit.

"libbacktrace_cv_sys_sync=no" is lost when it is added to HOST_GCC_COMMON_CONF_ENV because the environment is not exported when executing the libbacktrace configure script.

Use target_configargs to force "libbacktrace_cv_sys_sync=no" when executiong the libbacktrace configure script.

Quoted 6 lines

Fixes:
https://gitlab.com/bootlin/toolchains-builder/-/jobs/729359681

[Romain: use target_configargs="libbacktrace_cv_sys_sync=no"]

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard