package/gcc: help libbacktrace detection of sync builtins
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 25 Sep 2020 09:04:51 +0000 (11:04 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 1 Oct 2020 08:48:03 +0000 (10:48 +0200)
commit0bec4c8a4a90cde57ccd46dcad4b9a860c71ffde
treebe7c2c513760d02d65d86802ddd748bcf7d8fb5d
parent1c2b4070026bac40beb610504348dd3cc2af337b
package/gcc: help libbacktrace detection of sync builtins

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

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Romain: use target_configargs="libbacktrace_cv_sys_sync=no"]
Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/gcc/gcc.mk