libatomic: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR109951]
Similar to commitfb5d27be27
"libgomp: Consider '--with-build-sysroot=[...]' for target libraries' build-tree testing (instead of build-time 'CC' etc.) [PR91884, PR109951]", this is commit5ff06d762a
"libatomic/test: Fix compilation for build sysroot" done differently, avoiding build-tree testing use of any random gunk that may appear in build-time 'CC'. PR testsuite/109951 libatomic/ * configure.ac: 'AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)'. * Makefile.in: Regenerate. * configure: Likewise. * testsuite/Makefile.in: Likewise. * testsuite/lib/libatomic.exp (libatomic_init): If '--with-build-sysroot=[...]' was specified, use it for build-tree testing. * testsuite/libatomic-site-extra.exp.in (GCC_UNDER_TEST): Don't set. (SYSROOT_CFLAGS_FOR_TARGET): Set.
This commit is contained in:
parent
967d4171b2
commit
d8ff4b96b4
6 changed files with 15 additions and 3 deletions
|
@ -328,6 +328,7 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
SIZES = @SIZES@
|
||||
STRIP = @STRIP@
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
VERSION = @VERSION@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@
|
||||
|
|
7
libatomic/configure
vendored
7
libatomic/configure
vendored
|
@ -656,6 +656,7 @@ LIBAT_BUILD_VERSIONED_SHLIB_FALSE
|
|||
LIBAT_BUILD_VERSIONED_SHLIB_TRUE
|
||||
OPT_LDFLAGS
|
||||
SECTION_LDFLAGS
|
||||
SYSROOT_CFLAGS_FOR_TARGET
|
||||
enable_aarch64_lse
|
||||
libtool_VERSION
|
||||
ENABLE_DARWIN_AT_RPATH_FALSE
|
||||
|
@ -11455,7 +11456,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11458 "configure"
|
||||
#line 11459 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11561,7 +11562,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11564 "configure"
|
||||
#line 11565 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -11928,6 +11929,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
|||
;;
|
||||
esac
|
||||
|
||||
|
||||
|
||||
# Get target configury.
|
||||
. ${srcdir}/configure.tgt
|
||||
if test -n "$UNSUPPORTED"; then
|
||||
|
|
|
@ -172,6 +172,8 @@ case "$target" in
|
|||
;;
|
||||
esac
|
||||
|
||||
AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
|
||||
# Get target configury.
|
||||
. ${srcdir}/configure.tgt
|
||||
if test -n "$UNSUPPORTED"; then
|
||||
|
|
|
@ -198,6 +198,7 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
SIZES = @SIZES@
|
||||
STRIP = @STRIP@
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
VERSION = @VERSION@
|
||||
XCFLAGS = @XCFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@
|
||||
|
|
|
@ -146,6 +146,11 @@ proc libatomic_init { args } {
|
|||
|
||||
set ALWAYS_CFLAGS ""
|
||||
if { $blddir != "" } {
|
||||
# If '--with-build-sysroot=[...]' was specified, use it for build-tree
|
||||
# testing.
|
||||
global SYSROOT_CFLAGS_FOR_TARGET
|
||||
lappend ALWAYS_CFLAGS "additional_flags=${SYSROOT_CFLAGS_FOR_TARGET}"
|
||||
|
||||
lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/"
|
||||
lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}"
|
||||
if [istarget *-*-darwin*] {
|
||||
|
|
|
@ -1 +1 @@
|
|||
set GCC_UNDER_TEST {@CC@}
|
||||
set SYSROOT_CFLAGS_FOR_TARGET {@SYSROOT_CFLAGS_FOR_TARGET@}
|
||||
|
|
Loading…
Add table
Reference in a new issue