summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-21 07:16:06 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-03-21 07:16:06 +0000
commitee055341d8d291a33c4a5cf541d9f34c33a9cdfa (patch)
treef22ab5788ac690e1b78ba761111b64b7fae3b523 /configure.ac
parentcb2f60938a7b54e332449979afd83b4008a0495f (diff)
downloadgcc-ee055341d8d291a33c4a5cf541d9f34c33a9cdfa.tar.gz
* configure.ac: Move BUILD_CONFIG set up earlier. Add
--enable-vtable-verify option parsing. Don't add target-libsanitizer to bootstrap_target_libs unless --with-build-config=bootstrap-asan or --with-build-config=bootstrap-ubsan. Don't add target-libvtv to bootstrap_target_libs unless --enable-vtable-verify. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac116
1 files changed, 67 insertions, 49 deletions
diff --git a/configure.ac b/configure.ac
index aaeb96667cd..b65bdeecf6d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2472,6 +2472,62 @@ else
GCC_SHLIB_SUBDIR=
fi
+# Adjust the toplevel makefile according to whether bootstrap was selected.
+case $enable_bootstrap in
+ yes)
+ bootstrap_suffix=bootstrap
+ BUILD_CONFIG=bootstrap-debug
+ ;;
+ no)
+ bootstrap_suffix=no-bootstrap
+ BUILD_CONFIG=
+ ;;
+esac
+
+AC_MSG_CHECKING(for default BUILD_CONFIG)
+
+AC_ARG_WITH([build-config],
+ [AS_HELP_STRING([--with-build-config='NAME NAME2...'],
+ [use config/NAME.mk build configuration])],
+ [case $with_build_config in
+ yes) with_build_config= ;;
+ no) with_build_config= BUILD_CONFIG= ;;
+ esac])
+
+if test "x${with_build_config}" != x; then
+ BUILD_CONFIG=$with_build_config
+else
+ case $BUILD_CONFIG in
+ bootstrap-debug)
+ if echo "int f (void) { return 0; }" > conftest.c &&
+ ${CC} -c conftest.c &&
+ mv conftest.o conftest.o.g0 &&
+ ${CC} -c -g conftest.c &&
+ mv conftest.o conftest.o.g &&
+ ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
+ :
+ else
+ BUILD_CONFIG=
+ fi
+ rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
+ ;;
+ esac
+fi
+AC_MSG_RESULT($BUILD_CONFIG)
+AC_SUBST(BUILD_CONFIG)
+
+# Use same top-level configure hooks in libgcc/libstdc++/libvtv.
+AC_MSG_CHECKING([for --enable-vtable-verify])
+AC_ARG_ENABLE(vtable-verify,
+[ --enable-vtable-verify Enable vtable verification feature ],
+[case "$enableval" in
+ yes) enable_vtable_verify=yes ;;
+ no) enable_vtable_verify=no ;;
+ *) enable_vtable_verify=no;;
+ esac],
+[enable_vtable_verify=no])
+AC_MSG_RESULT($enable_vtable_verify)
+
# Record target_configdirs and the configure arguments for target and
# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
@@ -2482,13 +2538,19 @@ if echo " ${target_configdirs} " | grep " libgomp " > /dev/null 2>&1 ; then
bootstrap_target_libs=${bootstrap_target_libs}target-libgomp,
fi
-# If we are building libsanitizer, bootstrap it.
-if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1 ; then
- bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+# If we are building libsanitizer and $BUILD_CONFIG contains bootstrap-asan
+# or bootstrap-ubsan, bootstrap it.
+if echo " ${target_configdirs} " | grep " libsanitizer " > /dev/null 2>&1; then
+ case "$BUILD_CONFIG" in
+ *bootstrap-asan* | *bootstrap-ubsan* )
+ bootstrap_target_libs=${bootstrap_target_libs}target-libsanitizer,
+ ;;
+ esac
fi
-# If we are building libvtv, bootstrap it.
-if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 ; then
+# If we are building libvtv and --enable-vtable-verify, bootstrap it.
+if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 &&
+ test "$enable_vtable_verify" != no; then
bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
fi
@@ -2541,50 +2603,6 @@ case "$enable_bootstrap:$ENABLE_GOLD: $configdirs :,$stage1_languages," in
;;
esac
-# Adjust the toplevel makefile according to whether bootstrap was selected.
-case $enable_bootstrap in
- yes)
- bootstrap_suffix=bootstrap
- BUILD_CONFIG=bootstrap-debug
- ;;
- no)
- bootstrap_suffix=no-bootstrap
- BUILD_CONFIG=
- ;;
-esac
-
-AC_MSG_CHECKING(for default BUILD_CONFIG)
-
-AC_ARG_WITH([build-config],
- [AS_HELP_STRING([--with-build-config='NAME NAME2...'],
- [use config/NAME.mk build configuration])],
- [case $with_build_config in
- yes) with_build_config= ;;
- no) with_build_config= BUILD_CONFIG= ;;
- esac])
-
-if test "x${with_build_config}" != x; then
- BUILD_CONFIG=$with_build_config
-else
- case $BUILD_CONFIG in
- bootstrap-debug)
- if echo "int f (void) { return 0; }" > conftest.c &&
- ${CC} -c conftest.c &&
- mv conftest.o conftest.o.g0 &&
- ${CC} -c -g conftest.c &&
- mv conftest.o conftest.o.g &&
- ${srcdir}/contrib/compare-debug conftest.o.g0 conftest.o.g > /dev/null 2>&1; then
- :
- else
- BUILD_CONFIG=
- fi
- rm -f conftest.c conftest.o conftest.o.g0 conftest.o.g
- ;;
- esac
-fi
-AC_MSG_RESULT($BUILD_CONFIG)
-AC_SUBST(BUILD_CONFIG)
-
extrasub_build=
for module in ${build_configdirs} ; do
if test -z "${no_recursion}" \