Modify the gcc configure script to allow override of the "target libc
has ssp functions built-in" test via the TARGET_LIBC_PROVIDES_SSP environment variable, to allow us to configure a cross-compiler appropriately without having to try to find out by looking in the target's source directory. Tweak our build to tell gcc that the ssp bits are now in libc. The native compiler appears to already think that the ssp bits live in libc, so no change appears to be needed there. The autoconf-generated configure script will be committed separately shortly.
This commit is contained in:
parent
7225d589de
commit
bd8f620dfb
6
gnu/dist/gcc4/gcc/configure.ac
vendored
6
gnu/dist/gcc4/gcc/configure.ac
vendored
@ -3124,12 +3124,16 @@ case "$target" in
|
||||
fi
|
||||
fi]) ;;
|
||||
*-*-netbsd*)
|
||||
if test x$TARGET_LIBC_PROVIDES_SSP != x; then
|
||||
gcc_cv_libc_provides_ssp=$TARGET_LIBC_PROVIDES_SSP
|
||||
else
|
||||
if $gcc_cv_nm $($CC -print-file-name=libc.a) | \
|
||||
grep 'B __stack_chk_guard' > /dev/null; then
|
||||
gcc_cv_libc_provides_ssp=yes
|
||||
else
|
||||
gcc_cv_libc_provides_ssp=no
|
||||
fi ;;
|
||||
fi
|
||||
fi ;;
|
||||
*) gcc_cv_libc_provides_ssp=no ;;
|
||||
esac
|
||||
if test x$gcc_cv_libc_provides_ssp = xyes; then
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.24 2007/03/31 05:55:43 matt Exp $
|
||||
# $NetBSD: Makefile,v 1.25 2007/06/07 08:58:58 he Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
@ -23,6 +23,8 @@ MAKE_ARGS= MACHINE= MAKEINFO=${TOOL_MAKEINFO:Q} \
|
||||
EXTRA_PARTS= CPPFLAGS=-DNETBSD_TOOLS \
|
||||
AR=${HOST_AR:Q} RANLIB=${HOST_RANLIB:Q}
|
||||
|
||||
CONFIGURE_ENV+= TARGET_LIBC_PROVIDES_SSP=yes
|
||||
|
||||
MKNATIVE_ENV= ${BINENV} ${CONFIGURE_ENV:NC*:NLD*} \
|
||||
CC_FOR_BUILD=${HOST_CC:Q} \
|
||||
CC=${CC:Q}' '${CCADDFLAGS:Q} \
|
||||
|
Loading…
Reference in New Issue
Block a user