aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac53
1 files changed, 42 insertions, 11 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index acc8427b06e..9741fc669a3 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -725,22 +725,18 @@ AC_ARG_ENABLE(shared,
], [enable_shared=yes])
AC_SUBST(enable_shared)
-# The use of native_system_header_dir here is for the value (optionally)
-# configured here. Uses of NATIVE_SYSTEM_HEADER_DIR in this file refer
-# to the make variable defined in Makefile or in target make fragments.
AC_ARG_WITH([native-system-header-dir],
[ --with-native-system-header-dir=dir
use dir as the directory to look for standard
system header files in. Defaults to /usr/include.],
[
case ${with_native_system_header_dir} in
- yes|no) AC_MSG_ERROR([bad value ${withval} given for native system include directory]) ;;
- /*) ;;
- *) AC_MSG_ERROR([${withval} should be an absolute directory]) ;;
+ yes|no) AC_MSG_ERROR([bad value ${withval} given for --with-native-system-header-dir]) ;;
+ /* | [[A-Za-z]]:[[\\/]]*) ;;
+ *) AC_MSG_ERROR([--with-native-system-header-dir argument ${withval} must be an absolute directory]) ;;
esac
- native_system_header_dir="${withval}"
-], [native_system_header_dir=/usr/include])
-AC_SUBST(NATIVE_SYSTEM_HEADER_DIR, $native_system_header_dir)
+ configured_native_system_header_dir="${withval}"
+], [configured_native_system_header_dir=])
AC_ARG_WITH(build-sysroot,
[AS_HELP_STRING([--with-build-sysroot=sysroot],
@@ -1068,7 +1064,7 @@ define(gcc_UNLOCKED_FUNCS, clearerr_unlocked feof_unlocked dnl
AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \
sysconf strsignal getrusage nl_langinfo \
gettimeofday mbstowcs wcswidth mmap setlocale \
- gcc_UNLOCKED_FUNCS)
+ gcc_UNLOCKED_FUNCS madvise)
if test x$ac_cv_func_mbstowcs = xyes; then
AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
@@ -1122,6 +1118,8 @@ AM_LANGINFO_CODESET
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
+saved_CXXFLAGS="$CXXFLAGS"
+CXXFLAGS="$CXXFLAGS -I${srcdir} -I${srcdir}/../include"
gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd \
strsignal strstr strverscmp \
errno snprintf vsnprintf vasprintf malloc realloc calloc \
@@ -1174,6 +1172,21 @@ gcc_AC_CHECK_DECLS(sigaltstack, , ,[
#include <signal.h>
])
+# g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which hides the madvise()
+# prototype.
+AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"],
+ [AC_LANG_PUSH([C++])
+ gcc_AC_CHECK_DECLS(madvise, , ,[
+ #include "ansidecl.h"
+ #include "system.h"
+ ])
+ AC_LANG_POP([C++])],
+ [gcc_AC_CHECK_DECLS(madvise, , ,[
+ #include "ansidecl.h"
+ #include "system.h"
+ ])
+])
+
# More time-related stuff.
AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -1200,8 +1213,9 @@ if test $gcc_cv_type_clock_t = yes; then
[Define if <time.h> defines clock_t.])
fi
-# Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
+# Restore CFLAGS, CXXFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
CFLAGS="$saved_CFLAGS"
+CXXFLAGS="$saved_CXXFLAGS"
gcc_AC_INITFINI_ARRAY
@@ -1372,6 +1386,12 @@ if test "$host_xm_file" != "$build_xm_file"; then
fi
fi
+if test -n "$configured_native_system_header_dir"; then
+ native_system_header_dir=$configured_native_system_header_dir
+fi
+NATIVE_SYSTEM_HEADER_DIR="$native_system_header_dir"
+AC_SUBST(NATIVE_SYSTEM_HEADER_DIR)
+
case ${host} in
powerpc*-*-darwin*)
AC_CACHE_CHECK([whether mcontext_t fields have underscores],
@@ -3289,6 +3309,14 @@ elif test x$gcc_cv_ld != x; then
gcc_cv_ld_static_option="-noso"
gcc_cv_ld_dynamic_option="-so_archive"
;;
+ # HP-UX ld uses -a flags to select between shared and archive.
+ *-*-hpux*)
+ if test x"$gnu_ld" = xno; then
+ gcc_cv_ld_static_dynamic=yes
+ gcc_cv_ld_static_option="-aarchive_shared"
+ gcc_cv_ld_dynamic_option="-adefault"
+ fi
+ ;;
# IRIX 6 ld supports -Bstatic/-Bdynamic.
mips-sgi-irix6*)
gcc_cv_ld_static_dynamic=yes
@@ -3524,6 +3552,8 @@ foo:
gcc_cv_as_sparc_fmaf,,
[-xarch=v9d],
[.text
+ .register %g2, #scratch
+ .register %g3, #scratch
.align 4
fmaddd %f0, %f2, %f4, %f6
addxccc %g1, %g2, %g3
@@ -4609,6 +4639,7 @@ GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H])
AC_MSG_CHECKING(sys/sdt.h in the target C library)
have_sys_sdt_h=no
if test -f $target_header_dir/sys/sdt.h; then
+ have_sys_sdt_h=yes
AC_DEFINE(HAVE_SYS_SDT_H, 1,
[Define if your target C library provides sys/sdt.h])
fi