dwarf2 unwind info check broken
Andreas Jaeger
aj@suse.de
Tue Mar 19 12:19:00 GMT 2002
Jakub Jelinek <jakub@redhat.com> writes:
> On Sun, Mar 17, 2002 at 01:25:16PM +0100, Andreas Jaeger wrote:
>> Andreas Jaeger <aj@suse.de> writes:
>>
>> > Andreas Jaeger <aj@suse.de> writes:
>> >
>> >> With current binutils and both gcc 2.95.3 and GCC 3.2 CVS on
>> >> i686-linux-gnu I now get:
>> >>
>> >> checking for DWARF2 unwind info support... (cached) no
>> >>
>> >> The test program from configure:
>> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> >> static char __EH_FRAME_BEGIN__[];
>> >
>> > I figured out the problem: the []; gets removed by autoconf - but my
>> > autoconf version didn't remove it. :-(
>>
>> But that's not the whole story, something is still broken for me:
>
> There are 2 different cases if the register_frame_info &
> register_frame check both fail.
> Either you have gcc 3.1+ configured with old binutils, or new binutils.
> In the former case, we should define HAVE_DWARF2_UNWIND_INFO and
> HAVE_DWARF2_UNWIND_INFO_STATIC, in the latter case nothing (as in that
> case no registry should happen).
>
> So the unwind info check should be extended to something like
> (untested):
>
> if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame_info
> -nostdlib -nostartfiles
> -o conftest conftest.c -lgcc >&AC_FD_CC]); then
> libc_cv_gcc_dwarf2_unwind_info=static
> else
> libc_cv_gcc_dwarf2_unwind_info=no
> fi
> +if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame_info
> + -nostdlib -nostartfiles
> + -o conftest conftest.c -lgcc -lgcc_eh >&AC_FD_CC]); then
> + if ${CC-cc} $CFLAGS -DCHECK__register_frame_info -nostdlib -nostartfiles \
> + -o conftest conftest.c -lgcc -lgcc_eh 2>&1 >/dev/null \
> + | grep -q -- --eh-frame-hdr; then
This does not look right. I suppose you want to grep through ld
--help? In that case let's use ${LD-ld} or gcc -Wl,--help,
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list