eh_frame configure test for cross compiler

Andreas Schwab schwab@suse.de
Tue Nov 13 15:03:00 GMT 2001


For testing the eh_frame optimization we must use the target objdump.

2001-11-14  Andreas Schwab  <schwab@suse.de>

	* configure.in: Check for target objdump and use that in eh_frame
	optimization test.
	* configure: Regenerated.

--- configure.in.~1.555.~	Tue Nov 13 11:06:44 2001
+++ configure.in	Wed Nov 14 23:19:21 2001
@@ -1133,9 +1133,10 @@
 	rm -f as; $symbolic_link ../gas/as-new$host_exeext as$host_exeext 2>/dev/null
 fi
 
-# If we have nm in the build tree, make a link to it.
+# If we have nm and objdump in the build tree, make a link to them.
 if test -f ../binutils/Makefile; then
 	rm -f nm; $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
+	rm -f objdump; $symbolic_link ../binutils/objdump$host_exeext objdump$host_exeext 2>/dev/null
 fi
 
 # If we have ld in the build tree, make a link to it.
@@ -1242,6 +1243,16 @@
 fi
 AC_MSG_RESULT($gcc_cv_nm)
 
+# Figure out what objdump we will be using.
+AC_MSG_CHECKING(what objdump to use)
+if test -x objdump$host_exeext; then
+	gcc_cv_objdump=./objdump$host_exeext
+elif test x$host = x$target; then
+	# Native build.
+	gcc_cv_objdump=objdump$host_exeext
+fi
+AC_MSG_RESULT($gcc_cv_objdump)
+
 # Figure out what assembler alignment features are present.
 AC_MSG_CHECKING(assembler alignment features)
 gcc_cv_as_alignment_features=none
@@ -1460,7 +1471,7 @@
 		# 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 \
+		   && $gcc_cv_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; }

-- 
Andreas Schwab                                  "And now for something
Andreas.Schwab@suse.de				completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5



More information about the Gcc-patches mailing list