This is the mail archive of the gcc-patches@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]

Re: [Bug bootstrap/3867] [djgpp] eh_frame optimization check in configure is broken


> DJ, any chance you might be able to have a look at this soon? Thanks.

The code in configure.in (er, configure.ac) changed so I adapted the
patch by simply adding a second whole test.  Tested with a
linux-x-djgpp cross and a linux native.  Alex, this look OK to you?

2004-01-19  DJ Delorie  <dj@redhat.com>

	* configure.ac (gcc_cv_as_eh_frame2): New, check non-elf
	systems also and override gcc_cv_as_eh_frame.
	* configure: Regenerate.

Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.8
diff -p -2 -r2.8 configure.ac
*** configure.ac	19 Jan 2004 16:57:04 -0000	2.8
--- configure.ac	20 Jan 2004 01:38:34 -0000
*************** EOF
*** 2021,2024 ****
--- 2021,2091 ----
    fi])
  
+ if test $gcc_cv_as_eh_frame != yes; then
+ # Also check for non-ELF syntax
+ gcc_GAS_CHECK_FEATURE(non-elf eh_frame optimization, gcc_cv_as_eh_frame2,
+   [2,12,0],,
+ [	.text
+ .LFB1:
+ 	.long	0
+ .L1:
+ 	.long	0
+ .LFE1:
+ 	.section	.eh_frame
+ __FRAME_BEGIN__:
+ 	.long	.LECIE1-.LSCIE1
+ .LSCIE1:
+ 	.long	0x0
+ 	.byte	0x1
+ 	.ascii "z\0"
+ 	.byte	0x1
+ 	.byte	0x78
+ 	.byte	0x1a
+ 	.byte	0x0
+ 	.byte	0x4
+ 	.long	1
+ 	.p2align 1
+ .LECIE1:
+ .LSFDE1:
+ 	.long	.LEFDE1-.LASFDE1
+ .LASFDE1:
+ 	.long	.LASFDE1-__FRAME_BEGIN__
+ 	.long	.LFB1
+ 	.long	.LFE1-.LFB1
+ 	.byte	0x4
+ 	.long	.LFE1-.LFB1
+ 	.byte	0x4
+ 	.long	.L1-.LFB1
+ .LEFDE1:],
+ [  dnl # For autoconf 2.5x, must protect trailing spaces with @&t@.
+ cat > conftest.lit <<EOF
+  0000 10000000 00000000 017a0001 781a0004  .........z..x...
+  0010 01000000 12000000 18000000 00000000  ................
+  0020 08000000 04080000 00440000           .........D..    @&t@
+ EOF
+ cat > conftest.big <<EOF
+  0000 00000010 00000000 017a0001 781a0004  .........z..x...
+  0010 00000001 00000012 00000018 00000000  ................
+  0020 00000008 04000000 08440000           .........D..    @&t@
+ EOF
+   # If the assembler didn't choke, and we can objdump,
+   # and we got the correct data, then succeed.
+   if test x$gcc_cv_objdump != x \
+   && $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; }
+   then
+     gcc_cv_as_eh_frame=yes
+     gcc_cv_as_eh_frame2=yes
+   elif AC_TRY_COMMAND($gcc_cv_as -o conftest.o --traditional-format /dev/null); then
+     gcc_cv_as_eh_frame=buggy
+     gcc_cv_as_eh_frame2=buggy
+   else
+     # Uh oh, what do we do now?
+     gcc_cv_as_eh_frame=no
+     gcc_cv_as_eh_frame2=no
+   fi])
+ fi
+ 
  if test $gcc_cv_as_eh_frame = buggy; then
    AC_DEFINE(USE_AS_TRADITIONAL_FORMAT, 1,


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