# With pre-defined ld
AC_ARG_WITH(ld,
-[ --with-ld arrange to use the specified ld (full pathname).],
+[ --with-ld arrange to use the specified ld (full pathname)],
DEFAULT_LINKER="$with_ld")
if test x"${DEFAULT_LINKER+set}" = x"set"; then
if test ! -x "$DEFAULT_LINKER"; then
# With GNU as
AC_ARG_WITH(gnu-as,
-[ --with-gnu-as arrange to work with GNU as.],
+[ --with-gnu-as arrange to work with GNU as],
gas_flag="$with_gnu_as",
gas_flag=no)
AC_ARG_WITH(as,
-[ --with-as arrange to use the specified as (full pathname).],
+[ --with-as arrange to use the specified as (full pathname)],
DEFAULT_ASSEMBLER="$with_as")
if test x"${DEFAULT_ASSEMBLER+set}" = x"set"; then
if test ! -x "$DEFAULT_ASSEMBLER"; then
# With stabs
AC_ARG_WITH(stabs,
-[ --with-stabs arrange to use stabs instead of host debug format.],
+[ --with-stabs arrange to use stabs instead of host debug format],
stabs="$with_stabs",
stabs=no)
# With ELF
AC_ARG_WITH(elf,
-[ --with-elf arrange to use ELF instead of host debug format.],
+[ --with-elf arrange to use ELF instead of host debug format],
elf="$with_elf",
elf=no)
# Specify the local prefix
local_prefix=
AC_ARG_WITH(local-prefix,
-[ --with-local-prefix=DIR specifies directory to put local include.],
+[ --with-local-prefix=DIR specifies directory to put local include],
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} given for local include directory prefix) ;;
no) ;;
# Specify the g++ header file directory
AC_ARG_WITH(gxx-include-dir,
[ --with-gxx-include-dir=DIR
- specifies directory to put g++ header files.],
+ specifies directory to put g++ header files],
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
no) ;;
# Determine whether or not multilibs are enabled.
AC_ARG_ENABLE(multilib,
-[ --enable-multilib enable library support for multiple ABIs],
+[ --enable-multilib enable library support for multiple ABIs],
[], [enable_multilib=yes])
AC_SUBST(enable_multilib)
AC_ARG_ENABLE(cpp,
-[ --disable-cpp don't provide a user-visible C preprocessor.],
+[ --disable-cpp don't provide a user-visible C preprocessor],
[], [enable_cpp=yes])
AC_ARG_WITH(cpp_install_dir,
[ --with-cpp-install-dir=DIR
install the user visible C preprocessor in DIR
- (relative to PREFIX) as well as PREFIX/bin.],
+ (relative to PREFIX) as well as PREFIX/bin],
[if test x$withval = xyes; then
AC_MSG_ERROR([option --with-cpp-install-dir requires an argument])
elif test x$withval != xno; then
# Enable Multibyte Characters for C/C++
AC_ARG_ENABLE(c-mbchar,
-[ --enable-c-mbchar Enable multibyte characters for C and C++.],
+[ --enable-c-mbchar enable multibyte characters for C and C++],
if test x$enable_c_mbchar != xno; then
AC_DEFINE(MULTIBYTE_CHARS, 1,
[Define if you want the C and C++ compilers to support multibyte
# Pass with no value to take the default
# Pass with a value to specify a thread package
AC_ARG_ENABLE(threads,
-[ --enable-threads enable thread usage for target GCC.
- --enable-threads=LIB use LIB thread package for target GCC.],,
+[ --enable-threads enable thread usage for target GCC
+ --enable-threads=LIB use LIB thread package for target GCC],,
enable_threads='')
enable_threads_flag=$enable_threads
target_thread_file=''
;;
xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
- xsolaris | xwin32 | xdce | xvxworks | xaix)
+ xsolaris | xwin32 | xdce | xrtems| xvxworks | xaix)
target_thread_file=$enable_threads_flag
;;
*)
AC_ARG_ENABLE(objc-gc,
[ --enable-objc-gc enable the use of Boehm's garbage collector with
- the GNU Objective-C runtime.],
+ the GNU Objective-C runtime],
if test x$enable_objc_gc = xno; then
objc_boehm_gc=''
else
objc_boehm_gc='')
AC_ARG_WITH(dwarf2,
-[ --with-dwarf2 force the default debug format to be DWARF2.],
+[ --with-dwarf2 force the default debug format to be DWARF 2],
dwarf2="$with_dwarf2",
dwarf2=no)
AC_ARG_ENABLE(shared,
-[ --disable-shared don't provide a shared libgcc.],
+[ --disable-shared don't provide a shared libgcc],
[
case $enable_shared in
yes | no) ;;
gcc_AC_C_LONG_DOUBLE
gcc_AC_C_LONG_LONG
+gcc_AC_C__BOOL
# sizeof(char) is 1 by definition.
gcc_AC_COMPILE_CHECK_SIZEOF(short)
AC_HEADER_STDC
AC_HEADER_TIME
+gcc_AC_HEADER_STDBOOL
gcc_AC_HEADER_STRING
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
fcntl.h unistd.h sys/file.h sys/time.h \
sys/resource.h sys/param.h sys/times.h sys/stat.h \
- direct.h malloc.h langinfo.h iconv.h stdbool.h)
+ direct.h malloc.h langinfo.h)
# Check for thread headers.
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
AC_CHECK_FUNCS(strtoul bsearch popen times clock \
strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
- fputs_unlocked getrusage iconv nl_langinfo lstat)
+ fputs_unlocked getrusage nl_langinfo lstat)
AC_CHECK_TYPE(ssize_t, int)
AC_FUNC_MMAP_ANYWHERE
AC_FUNC_MMAP_FILE
+AM_ICONV
+
# We will need to find libiberty.h and ansidecl.h
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
# If any of the xm_file variables contain nonexistent files, warn
# about them and drop them.
-changequote(,)dnl
bx=
for x in $build_xm_file; do
if test -f $srcdir/config/$x
fi
done
xm_file="$tx"
-changequote([,])dnl
count=a
for f in $tm_file; do
/* | [A-Za-z]:[\\/]* ) realsrcdir=${srcdir};;
*) realsrcdir=../${srcdir};;
esac
- CC=${CC_FOR_BUILD} ${realsrcdir}/configure \
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+ ${realsrcdir}/configure \
--target=$target --host=$build --build=$build
+ CFLAGS="${saved_CFLAGS}"
# We just finished tests for the build machine, so rename
# the file auto-build.h in the gcc directory.
gcc_version_trigger=${srcdir}/version.c
fi
changequote(,)dnl
-gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
# Compile in configure arguments.
if test -f configargs.h ; then
# Being re-configured.
- gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+ gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
else
gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
# Windows32 Registry support for specifying GCC installation paths.
AC_ARG_ENABLE(win32-registry,
[ --disable-win32-registry
- Disable lookup of installation paths in the
- Registry on Windows hosts.
- --enable-win32-registry Enable registry lookup (default).
+ disable lookup of installation paths in the
+ Registry on Windows hosts
+ --enable-win32-registry enable registry lookup (default)
--enable-win32-registry=KEY
- Use KEY instead of GCC version as the last portion
- of the registry key.],,)
+ use KEY instead of GCC version as the last portion
+ of the registry key],,)
case $host_os in
win32 | pe | cygwin* | mingw32* | uwin*)
AC_MSG_CHECKING(whether windows registry support is requested)
-if test x$enable_win32_registry != xno; then
+if test "x$enable_win32_registry" != xno; then
AC_DEFINE(ENABLE_WIN32_REGISTRY, 1,
[Define to 1 if installation paths should be looked up in Windows32
Registry. Ignored on non windows32 hosts.])
fi
# Check if user specified a different registry key.
-case x${enable_win32_registry} in
+case "x${enable_win32_registry}" in
x | xyes)
# default.
gcc_cv_win32_registry_key="$VERSION"
;;
esac
-if test x$enable_win32_registry != xno; then
+if test "x$enable_win32_registry" != xno; then
AC_MSG_CHECKING(registry key on windows hosts)
AC_DEFINE_UNQUOTED(WIN32_REGISTRY_KEY, "$gcc_cv_win32_registry_key",
[Define to be the last portion of registry key on windows hosts.])
fi
AC_MSG_RESULT($gcc_cv_as_leb128)
+AC_MSG_CHECKING(assembler eh_frame optimization)
+gcc_cv_as_eh_frame=no
+if test x$gcc_cv_gas_major_version != x -a x$gcc_cv_gas_minor_version != x; then
+ if test "$gcc_cv_gas_major_version" -eq 2 -a "$gcc_cv_gas_minor_version" -ge 12 -o "$gcc_cv_gas_major_version" -gt 2 && grep 'obj_format = elf' ../gas/Makefile > /dev/null; then
+ gcc_cv_as_eh_frame="yes"
+ fi
+elif test x$gcc_cv_as != x; then
+ # Check if this is GAS.
+ as_ver=`$gcc_cv_as --version < /dev/null 2> /dev/null | head -1`
+ rm -f a.out 2> /dev/null
+ if echo "$as_ver" | grep GNU > /dev/null; then
+ # Versions up to and including 2.11.0 may mis-optimize
+ # .eh_frame data. Try something.
+ cat > conftest.s <<EOF
+ .text
+.LFB1:
+ .4byte 0
+.L1:
+ .4byte 0
+.LFE1:
+ .section .eh_frame,"aw",@progbits
+__FRAME_BEGIN__:
+ .4byte .LECIE1-.LSCIE1
+.LSCIE1:
+ .4byte 0x0
+ .byte 0x1
+ .ascii "z\0"
+ .byte 0x1
+ .byte 0x78
+ .byte 0x1a
+ .byte 0x0
+ .byte 0x4
+ .4byte 1
+ .p2align 1
+.LECIE1:
+.LSFDE1:
+ .4byte .LEFDE1-.LASFDE1
+.LASFDE1:
+ .4byte .LASFDE1-__FRAME_BEGIN__
+ .4byte .LFB1
+ .4byte .LFE1-.LFB1
+ .byte 0x4
+ .4byte .LFE1-.LFB1
+ .byte 0x4
+ .4byte .L1-.LFB1
+.LEFDE1:
+EOF
+ cat > conftest.lit <<EOF
+ 0000 10000000 00000000 017a0001 781a0004 .........z..x...
+ 0010 01000000 12000000 18000000 00000000 ................
+ 0020 08000000 04080000 0044 .........D
+EOF
+ cat > conftest.big <<EOF
+ 0000 00000010 00000000 017a0001 781a0004 .........z..x...
+ 0010 00000001 00000012 00000018 00000000 ................
+ 0020 00000008 04000000 0844 .........D
+EOF
+ # If the assembler didn't choke, and we can objdump,
+ # and we got the correct data, then succeed.
+ if $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+ && objdump -s -j .eh_frame conftest.o 2>/dev/null \
+ | tail -3 > conftest.got \
+ && { cmp conftest.lit conftest.got > /dev/null 2>&1 \
+ || cmp conftest.big conftest.got > /dev/null 2>&1; }
+ then
+ gcc_cv_as_eh_frame="yes"
+ else
+ gcc_cv_as_eh_frame="bad"
+ if $gcc_cv_as -o conftest.o --traditional-format /dev/null; then
+ AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1,
+ [Define if your assembler mis-optimizes .eh_frame data.])
+ fi
+ fi
+ fi
+ rm -f conftest.*
+fi
+AC_MSG_RESULT($gcc_cv_as_eh_frame)
+
case "$target" in
sparc*-*-*)
AC_CACHE_CHECK([assembler .register pseudo-op support],
[Define if your assembler supports offsetable %lo().])
fi
fi
+
;;
changequote(,)dnl
# ??? Once 2.11 is released, probably need to add first known working
# version to the per-target configury.
case "$target" in
- i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-*)
+ i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-*)
insn="nop"
;;
ia64*-*-*)
# Find out what GC implementation we want, or may, use.
AC_ARG_WITH(gc,
-[ --with-gc={simple,page} Choose the garbage collection mechanism to use
- with the compiler.],
+[ --with-gc={simple,page} choose the garbage collection mechanism to use
+ with the compiler],
[case "$withval" in
simple | page)
GGC=ggc-$withval
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode is disabled by default
AC_ARG_ENABLE(maintainer-mode,
-[ --enable-maintainer-mode enable make rules and dependencies not useful
+[ --enable-maintainer-mode
+ enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer],
maintainer_mode=$enableval,
maintainer_mode=no)
# With Setjmp/Longjmp based exception handling.
AC_ARG_ENABLE(sjlj-exceptions,
-[ --enable-sjlj-exceptions arrange to use setjmp/longjmp exception handling.],
+[ --enable-sjlj-exceptions
+ arrange to use setjmp/longjmp exception handling],
[sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
[Define 0/1 to force the choice for exception handling model.])])
# Find a directory in which to install a shared libgcc.
AC_ARG_ENABLE(version-specific-runtime-libs,
-[ --enable-version-specific-runtime-libs Specify that runtime libraries shou
-ld be installed in a compiler-specific directory ])
+[ --enable-version-specific-runtime-libs
+ specify that runtime libraries should be
+ installed in a compiler-specific directory])
AC_ARG_WITH(slibdir,
[ --with-slibdir=DIR shared libraries in DIR [LIBDIR]],