Bug generating libc.so.lds
Daniel Jacobowitz
drow@mvista.com
Wed Apr 2 15:26:00 GMT 2003
On Tue, Apr 01, 2003 at 04:54:46PM -0800, Roland McGrath wrote:
> > No, look a little higher up in the file. There's actually
>
> ?
>
> > I've been forcing the test, but here's the situation as I understand
> > it:
> >
> > - The correct outcome for the targets I'm working with is
> > no_registry_needed.
> > - __register_frame and __register_frame_info are in -lgcc_eh if
> > --enable-shared, and -lgcc if --disable-shared.
>
> Ok.
>
> > I have a patch to let the test report no_registry_needed even if the
> > routines are in libgcc.a. I'm not enough of an EH guru to know if that
> > would have unwelcome consequences, though.
>
> I can't see how it would be a problem. Nothing in how glibc is built
> notices or cares where the routines came from. The only reason -lgcc and
> -lgcc_eh appear in the link in the configure check is because it uses
> -nostdlib to avoid -lc and so needs to supply what %{libgcc} normally would.
In that case, here's the patch. Only lightly tested.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2003-04-02 Daniel Jacobowitz <drow@mvista.com>
* configure.in: Check for __register_frame_info in both
-lgcc and -lgcc_eh.
* configure: Regenerated.
--- configure.in 2003-03-31 17:42:00.000000000 -0500
+++ configure.in 2003-04-01 09:56:09.000000000 -0500
@@ -1604,18 +1604,15 @@
dl_iterate_phdr () {}
EOF
dnl No \ in command here because it ends up inside ''.
-if AC_TRY_COMMAND([${CC-cc} $CFLAGS -DCHECK__register_frame_info
- -nostdlib -nostartfiles
- -o conftest conftest.c -lgcc >&AS_MESSAGE_LOG_FD]); then
- libc_cv_gcc_dwarf2_unwind_info=static
-else
- libc_cv_gcc_dwarf2_unwind_info=no
-fi
+libc_unwind_check_1="${CC-cc} $CFLAGS -DCHECK__register_frame_info
+ -nostdlib -nostartfiles -o conftest conftest.c \
+ -lgcc"
# Some platforms' specs put -lgcc first. The second one doesn't hurt.
-libc_unwind_check="${CC-cc} $CFLAGS -DCHECK__register_frame_info \
+libc_unwind_check_2="${CC-cc} $CFLAGS -DCHECK__register_frame_info \
-nostdlib -nostartfiles -o conftest conftest.c \
-lgcc -lgcc_eh -lgcc"
-if AC_TRY_COMMAND([$libc_unwind_check >&AS_MESSAGE_LOG_FD]); then
+if AC_TRY_COMMAND([$libc_unwind_check_1 >&AS_MESSAGE_LOG_FD]) \
+ || AC_TRY_COMMAND([$libc_unwind_check_2 >&AS_MESSAGE_LOG_FD]); then
if $libc_unwind_check -v 2>&1 >/dev/null \
| grep -q -- --eh-frame-hdr; then
libc_cv_gcc_dwarf2_unwind_info=no_registry_needed
More information about the Libc-alpha
mailing list