&& test $ac_cv_prog_cc_w_no_variadic_macros = yes ; then
strict1_warn="-pedantic -Wno-long-long -Wno-variadic-macros"
fi
-AC_SUBST(strict1_warn)
# Add -Wold-style-definition if it's accepted
AC_CACHE_CHECK(
strict1_warn="${strict1_warn} -Wold-style-definition"
fi
+# Add -Wmissing-format-attribute if it's accepted
+AC_CACHE_CHECK(
+ [whether ${CC} accepts -Wmissing-format-attribute],
+ [ac_cv_prog_cc_w_missing_format_attribute],
+ [save_CFLAGS="$CFLAGS"
+ CFLAGS="-Wmissing-format-attribute"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[]])],
+ [ac_cv_prog_cc_w_missing_format_attribute=yes],
+ [ac_cv_prog_cc_w_missing_format_attribute=no])
+ CFLAGS="$save_CFLAGS"
+ ])
+if test $ac_cv_prog_cc_w_missing_format_attribute = yes ; then
+ strict1_warn="${strict1_warn} -Wmissing-format-attribute"
+fi
+
# Enable -Werror, period.
AC_ARG_ENABLE(werror_always,
[ --enable-werror-always enable -Werror always], [],
WERROR=-Werror
fi
+AC_SUBST(strict1_warn)
+
# If the native compiler is GCC, we can enable warnings even in stage1.
# That's useful for people building cross-compilers, or just running a
# quick `make'.
], [enable_shared=yes])
AC_SUBST(enable_shared)
+AC_ARG_WITH(build-sysroot,
+ [ --with-build-sysroot=sysroot
+ use sysroot as the system root during the build])
+
AC_ARG_WITH(sysroot,
[ --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.],
[
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
-
+
if test "x$exec_prefix" = xNONE; then
if test "x$prefix" = xNONE; then
test_prefix=/usr/local
fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked dnl
fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked dnl
putchar_unlocked putc_unlocked)
-AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
+AC_CHECK_FUNCS(times clock kill getrlimit setrlimit atoll atoq \
sysconf strsignal getrusage nl_langinfo scandir alphasort \
gettimeofday mbstowcs wcswidth mmap mincore setlocale \
gcc_UNLOCKED_FUNCS)
fi
AC_SUBST(TARGET_GETGROUPS_T)
-gcc_AC_FUNC_PRINTF_PTR
gcc_AC_FUNC_MMAP_BLACKLIST
case "${host}" in
CROSS= AC_SUBST(CROSS)
ALL=all.internal AC_SUBST(ALL)
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)' AC_SUBST(SYSTEM_HEADER_DIR)
+
+if test "x$with_build_sysroot" != x; then
+ build_system_header_dir=$with_build_sysroot'$(NATIVE_SYSTEM_HEADER_DIR)'
+else
+ # This value is used, even on a native system, because
+ # CROSS_SYSTEM_HEADER_DIR is just
+ # $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR).
+ build_system_header_dir='$(CROSS_SYSTEM_HEADER_DIR)'
+fi
+
if test x$host != x$target
then
CROSS="-DCROSS_COMPILE"
ALL=all.cross
- SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
+ SYSTEM_HEADER_DIR=$build_system_header_dir
case "$host","$target" in
# Darwin crosses can use the host system's libraries and headers,
# because of the fat library support. Of course, it must be the
CROSS="$CROSS -DNATIVE_CROSS" ;;
esac
elif test "x$TARGET_SYSTEM_ROOT" != x; then
- # This is just $(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)
- SYSTEM_HEADER_DIR='$(CROSS_SYSTEM_HEADER_DIR)'
+ SYSTEM_HEADER_DIR=$build_system_header_dir
fi
# If this is a cross-compiler that does not
# then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
-inhibit_libc=
+inhibit_libc=false
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
test x$with_newlib = xyes ; } &&
{ test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
- inhibit_libc=-Dinhibit_libc
+ inhibit_libc=true
fi
AC_SUBST(inhibit_libc)
[Define if your linker supports --as-needed and --no-as-needed options.])
fi
-case "$target" in
- powerpc64*-*-linux*)
+case "$target:$tm_file" in
+ powerpc64*-*-linux* | powerpc*-*-linux*rs6000/biarch64.h*)
AC_CACHE_CHECK(linker support for omitting dot symbols,
gcc_cv_ld_no_dot_syms,
[gcc_cv_ld_no_dot_syms=no