This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib 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: hidden symbol `__divdi3' is referenced by DSO


It really only needs to be done when we finally form the libraries in the top-level Makefile. Could you try the accompanying patch and verify it works for you? The problem doesn't show itself on Red Hat Linux.

-- Jeff J.

Shaun Jackman wrote:
I added -lgcc to LIBS and my problem is solved. It seems to me that
every Makefile.am that specifies -nostdlib should also specify -lgcc.
This affects some thirty odd files though.

Cheers,
Shaun



newlib's libc.so has undefined references to __divdi3 and __udivdi3.
It seems to me these should have been resolved at the link time of
libc.so, from libgcc.a. libm.so does not have this problem. I'll see
if I can find the cause.

Cheers,
Shaun
Index: Makefile.am
===================================================================
RCS file: /cvs/src/src/newlib/Makefile.am,v
retrieving revision 1.30
diff -u -p -r1.30 Makefile.am
--- Makefile.am	5 Oct 2004 19:34:25 -0000	1.30
+++ Makefile.am	3 Dec 2004 19:26:56 -0000
@@ -124,9 +124,9 @@ LIBM_OBJECTLISTS = \
 	libm/common/objectlist.awk.in \
 	$(LIBM_MACHINE_OBJECTLIST)
 
-libm_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libm-libtool-objectlist
+libm_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -lgcc -objectlist libm-libtool-objectlist
 
-libc_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libc-libtool-objectlist
+libc_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -lgcc -objectlist libc-libtool-objectlist
 
 if USE_LIBTOOL
 libm_la_SOURCES =
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/newlib/Makefile.in,v
retrieving revision 1.32
diff -u -p -r1.32 Makefile.in
--- Makefile.in	5 Oct 2004 19:34:25 -0000	1.32
+++ Makefile.in	3 Dec 2004 19:26:56 -0000
@@ -160,9 +160,9 @@ LIBC_OBJECTLISTS =  	$(POSIX_OBJECTLIST)
 LIBM_OBJECTLISTS =  	libm/$(MATHDIR)/objectlist.awk.in 	libm/common/objectlist.awk.in 	$(LIBM_MACHINE_OBJECTLIST)
 
 
-libm_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libm-libtool-objectlist
+libm_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -lgcc -objectlist libm-libtool-objectlist
 
-libc_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -objectlist libc-libtool-objectlist
+libc_la_LDFLAGS = -version-info $(LIBTOOL_VERSION_INFO) -release newlib -no-undefined -Xcompiler -nostdlib -Xlinker --version-script=$(srcdir)/libc/sys/linux/shared.ld -lgcc -objectlist libc-libtool-objectlist
 
 @USE_LIBTOOL_TRUE@libm_la_SOURCES = 
 @USE_LIBTOOL_TRUE@libm_la_DEPENDENCIES = libm-libtool-objectlist

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