This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Tidy up configure output (was Re: Weird seg fault at configure time (in linker eh_frame optimizations))


On Mon, May 06, 2002 at 01:13:48AM +0200, Paolo Carlini wrote:
> Hi,
> 
> recently the following message started appearing for 3.1 on my 
> i686-pc-linux-gnu (binutils2.12) box:
> 
> checking whether linker eh_frame optimizations work properly... 
> ../../gcc-3_1-branch/gcc/gcc/configure: line 7813: 10798 Segmentation 
> fault      $gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o 
> 1>&5 2>&1
> no

Yes, it is expected if you're using broken binutils.
Here is a repost of the trivial patch to make this Segfault litter go in
config.log only and not on configure stdout.
Note the patch checking for working .eh_frame support has not been installed
on trunk, since I think trunk should either:
a) require binutils >= 2.12.1 if binutils are used
b) ban use of 2.11.9*, 2.12 and 2.12.90.0.[14]*
2.12.1 will be definitely out at the time of 3.2 release, so this is not
as problematic as for 3.1 release where 2.12.1 will not be ready.

Mark, would you like this to be installed on the branch?
(tested on i386-redhat-linux and ia64-redhat-linux).

2002-05-06  Jakub Jelinek  <jakub@redhat.com>

	* configure.in: If as or ld segfaults, don't clutter with it stdout.
	* configure: Rebuilt.

--- gcc/configure.in.jj	Mon Apr 29 12:40:28 2002
+++ gcc/configure.in	Tue Apr 30 10:13:40 2002
@@ -2131,8 +2131,8 @@ if test x"$gcc_cv_ld_eh_frame_hdr" = xye
 .LEFDE3:
 	.4byte	0
 EOF
-      if $gcc_cv_as -o conftest.o conftest.s 1>&AC_FD_CC 2>&1; then
-        if $gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o 1>&AC_FD_CC 2>&1; then
+      if ($gcc_cv_as -o conftest.o conftest.s; exit $?) 1>&AC_FD_CC 2>&1; then
+        if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&AC_FD_CC 2>&1; then
 changequote(,)dnl
 	  if $gcc_cv_objdump -h conftest.so 2>&AC_FD_CC \
 	     | grep 'eh_frame_hdr[ 	]*0*[01][048cC][ 	]' 1>&AC_FD_CC 2>&1; then
--- gcc/configure.jj	Thu May  2 12:12:03 2002
+++ gcc/configure	Fri May  3 19:29:17 2002
@@ -7798,8 +7798,8 @@ echo "configure:7738: checking whether l
 .LEFDE3:
 	.4byte	0
 EOF
-      if $gcc_cv_as -o conftest.o conftest.s 1>&5 2>&1; then
-        if $gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o 1>&5 2>&1; then
+      if ($gcc_cv_as -o conftest.o conftest.s; exit $?) 1>&5 2>&1; then
+        if ($gcc_cv_ld --eh-frame-hdr -shared -o conftest.so conftest.o; exit $?) 1>&5 2>&1; then
 	  if $gcc_cv_objdump -h conftest.so 2>&5 \
 	     | grep 'eh_frame_hdr[ 	]*0*[01][048cC][ 	]' 1>&5 2>&1; then
 	    gcc_cv_ld_eh_frame_hdr_works=yes; break


	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]