summaryrefslogtreecommitdiff
path: root/gcc/configure
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-08-18 13:01:36 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-08-18 13:01:36 -0400
commite31bcd1b96a5d6236da6cb4965b112773878e35d (patch)
treed10cd641fb7ee2242f80c381c47d98011ca1467f /gcc/configure
parent8fd962e39c8bf6a2506c684f48a19a41c4c5aa5f (diff)
downloadgcc-e31bcd1b96a5d6236da6cb4965b112773878e35d.tar.gz
elfos.h (ASM_DECLARE_OBJECT_NAME): Use gnu_unique_object type if available.
* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Use gnu_unique_object type if available. * configure.ac: Test for it. * configure, config.in: Regenerate. * doc/install.texi: Document --enable-gnu-unique-object. From-SVN: r150882
Diffstat (limited to 'gcc/configure')
-rwxr-xr-xgcc/configure105
1 files changed, 85 insertions, 20 deletions
diff --git a/gcc/configure b/gcc/configure
index 52c5cc7ae1e..61789a84d22 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -1091,6 +1091,8 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-gnu-unique-object enable the use of the @gnu_unique_object ELF extension on
+ glibc systems
--enable-linker-build-id
compiler will always pass --build-id to linker
--enable-maintainer-mode
@@ -14903,13 +14905,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:14906: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:14908: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:14909: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:14911: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:14912: output\"" >&5)
+ (eval echo "\"\$as_me:14914: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -16066,7 +16068,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 16069 "configure"' > conftest.$ac_ext
+ echo '#line 16071 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -17959,11 +17961,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:17962: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:17964: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:17966: \$? = $ac_status" >&5
+ echo "$as_me:17968: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18298,11 +18300,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18301: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18303: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:18305: \$? = $ac_status" >&5
+ echo "$as_me:18307: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -18403,11 +18405,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18406: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18408: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18410: \$? = $ac_status" >&5
+ echo "$as_me:18412: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -18458,11 +18460,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:18461: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:18463: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:18465: \$? = $ac_status" >&5
+ echo "$as_me:18467: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -21270,7 +21272,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21273 "configure"
+#line 21275 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21366,7 +21368,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 21369 "configure"
+#line 21371 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -23382,11 +23384,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:23385: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:23387: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:23389: \$? = $ac_status" >&5
+ echo "$as_me:23391: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -23481,11 +23483,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:23484: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:23486: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:23488: \$? = $ac_status" >&5
+ echo "$as_me:23490: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -23533,11 +23535,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:23536: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:23538: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:23540: \$? = $ac_status" >&5
+ echo "$as_me:23542: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -28096,6 +28098,69 @@ _ACEOF
fi
+# Check whether --enable-gnu-unique-object or --disable-gnu-unique-object was given.
+if test "${enable_gnu_unique_object+set}" = set; then
+ enableval="$enable_gnu_unique_object"
+ case $enable_gnu_unique_object in
+ yes | no) ;;
+ *) { { echo "$as_me:$LINENO: error: '$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
+Valid choices are 'yes' and 'no'." >&5
+echo "$as_me: error: '$enable_gnu_unique_object' is an invalid value for --enable-gnu-unique-object.
+Valid choices are 'yes' and 'no'." >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+else
+ echo "$as_me:$LINENO: checking assembler for gnu_unique_object" >&5
+echo $ECHO_N "checking assembler for gnu_unique_object... $ECHO_C" >&6
+if test "${gcc_cv_as_gnu_unique_object+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ gcc_cv_as_gnu_unique_object=no
+ if test $in_tree_gas = yes; then
+ if test $in_tree_gas_is_elf = yes \
+ && test $gcc_cv_gas_vers -ge `expr \( \( 2 \* 1000 \) + 19 \) \* 1000 + 52`
+ then gcc_cv_as_gnu_unique_object=yes
+fi
+ elif test x$gcc_cv_as != x; then
+ echo '.type foo, @gnu_unique_object' > conftest.s
+ if { ac_try='$gcc_cv_as -o conftest.o conftest.s >&5'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }
+ then
+ # Also check for ld.so support, i.e. glibc 2.11 or higher.
+ if test x$host = x$build -a x$host = x$target &&
+ glibcver=`ldd --version 2>/dev/null`; then
+ glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([0-9]*\)"`
+ glibcminor=`expr "$glibcver" : "ldd (GNU libc) [0-9]*\.\([0-9]*\)"`
+ glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
+ if test "$glibcnum" -ge 2011 ; then
+ gcc_cv_as_gnu_unique_object=yes
+ fi
+ fi
+ else
+ echo "configure: failed program was" >&5
+ cat conftest.s >&5
+ fi
+ rm -f conftest.o conftest.s
+ fi
+fi
+echo "$as_me:$LINENO: result: $gcc_cv_as_gnu_unique_object" >&5
+echo "${ECHO_T}$gcc_cv_as_gnu_unique_object" >&6
+if test $gcc_cv_as_gnu_unique_object = yes; then
+ enable_gnu_unique_object=yes
+fi
+fi;
+if test x$enable_gnu_unique_object = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GAS_GNU_UNIQUE_OBJECT 1
+_ACEOF
+
+fi
+
echo "$as_me:$LINENO: checking assembler for tolerance to line number 0" >&5
echo $ECHO_N "checking assembler for tolerance to line number 0... $ECHO_C" >&6
if test "${gcc_cv_as_line_zero+set}" = set; then