From 5e8c1cf25beccac1d22d10dc866912394f42771b Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Tue, 9 Dec 2014 17:57:18 +0800 Subject: [2.25] sync to a30720e3e633f275250e26f85ccae5dbdddfb6c6 local patches will be re-applied later commit a30720e3e633f275250e26f85ccae5dbdddfb6c6 Author: Alan Modra Date: Wed Nov 19 10:30:16 2014 +1030 daily update Change-Id: Ieb2a3f4dd2ecb289ac5305ff08d428b2847494ab --- binutils-2.25/gold/configure.ac | 50 ++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 18 deletions(-) (limited to 'binutils-2.25/gold/configure.ac') diff --git a/binutils-2.25/gold/configure.ac b/binutils-2.25/gold/configure.ac index c23117b6..04780117 100644 --- a/binutils-2.25/gold/configure.ac +++ b/binutils-2.25/gold/configure.ac @@ -1,7 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 -dnl Free Software Foundation, Inc. +dnl Copyright (C) 2006-2014 Free Software Foundation, Inc. dnl dnl This file is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -200,12 +199,14 @@ for targ in $target $canon_targets; do default_big_endian=$targ_big_endian default_osabi=$targ_osabi + AM_CONDITIONAL(DEFAULT_TARGET_AARCH64, test "$targ_obj" = "aarch64") AM_CONDITIONAL(DEFAULT_TARGET_ARM, test "$targ_obj" = "arm") AM_CONDITIONAL(DEFAULT_TARGET_I386, test "$targ_obj" = "i386") AM_CONDITIONAL(DEFAULT_TARGET_POWERPC, test "$targ_obj" = "powerpc") AM_CONDITIONAL(DEFAULT_TARGET_SPARC, test "$targ_obj" = "sparc") AM_CONDITIONAL(DEFAULT_TARGET_X86_64, test "$targ_obj" = "x86_64") AM_CONDITIONAL(DEFAULT_TARGET_TILEGX, test "$targ_obj" = "tilegx") + AM_CONDITIONAL(DEFAULT_TARGET_MIPS, test "$targ_obj" = "mips") DEFAULT_TARGET=${targ_obj} AC_SUBST(DEFAULT_TARGET) fi @@ -343,8 +344,8 @@ AC_CACHE_CHECK([whether $CC supports -fmerge-constants], save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fmerge-constants" AC_COMPILE_IFELSE([const char *s = "foo";], - [have_merge_constants=yes], - [have_merge_constants=no]) + [gold_cv_merge_constants=yes], + [gold_cv_merge_constants=no]) CFLAGS="$save_CFLAGS"]) AC_SUBST([MERGE_CONSTANTS_FLAG]) AS_IF([test "$gold_cv_merge_constants" = yes], @@ -521,16 +522,41 @@ dnl multiple declarations of functions like basename when compiling dnl with C++. AC_CHECK_DECLS([basename, ffs, asprintf, vasprintf, snprintf, vsnprintf, strverscmp]) +dnl Check if gcc supports the -gpubnames option. +dnl Use -Werror in case of compilers that make unknown -g options warnings. +dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS +dnl gets set later by default Autoconf magic to include -Werror. (We are +dnl assuming here that there is no compiler that groks -gpubnames +dnl but does not grok -Werror.) +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -gpubnames" +AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no]) +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes") + +dnl Check if gcc supports the -fno-use-linker-plugin option. +save_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -Werror -fno-use-linker-plugin" +AC_COMPILE_IFELSE([int i;], [have_no_use_linker_plugin=yes], [have_no_use_linker_plugin=no]) +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(HAVE_NO_USE_LINKER_PLUGIN, test "$have_no_use_linker_plugin" = "yes") + AC_LANG_PUSH(C++) +AC_CHECK_HEADERS(unordered_set unordered_map) AC_CHECK_HEADERS(tr1/unordered_set tr1/unordered_map) AC_CHECK_HEADERS(ext/hash_map ext/hash_set) AC_CHECK_HEADERS(byteswap.h) dnl When plugins enabled dynamic loader interface is required. Check headers -dnl which may provide this interface. In case of dlfcn.h add libdl to link. +dnl which may provide this interface. Add the necessary library to link. AC_CHECK_HEADERS(windows.h) -AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""]) +AC_CHECK_HEADERS(dlfcn.h) +AC_SEARCH_LIBS(dlopen, [dl dld]) +case "$ac_cv_search_dlopen" in + no*) DLOPEN_LIBS="";; + *) DLOPEN_LIBS="$ac_cv_search_dlopen";; +esac AC_SUBST(DLOPEN_LIBS) AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times) @@ -596,18 +622,6 @@ if test "$gold_cv_stat_st_mtim" = "yes"; then [Define if struct stat has a field st_mtim with timespec for mtime]) fi -dnl Check if gcc supports the -gpubnames option. -dnl Use -Werror in case of compilers that make unknown -g options warnings. -dnl They would pass the test here, but fail in actual use when $WARN_CFLAGS -dnl gets set later by default Autoconf magic to include -Werror. (We are -dnl assuming here that there is no compiler that groks -gpubnames -dnl but does not grok -Werror.) -save_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="$CXXFLAGS -Werror -gpubnames" -AC_COMPILE_IFELSE([int i;], [have_pubnames=yes], [have_pubnames=no]) -CXXFLAGS="$save_CXXFLAGS" -AM_CONDITIONAL(HAVE_PUBNAMES, test "$have_pubnames" = "yes") - AC_LANG_POP(C++) AC_CHECK_HEADERS(locale.h) -- cgit v1.2.3