PATCH: Fix elf/Makefile

H. J. Lu hjl@lucon.org
Mon Aug 19 23:11:00 GMT 2002


On Tue, Aug 20, 2002 at 12:48:56AM -0400, Jack Howarth wrote:
> Franz and HJ,
>     I tested the glibc-libgcc-compat-ppc-9.patch on entropy.
> A build of Franz's glibc-2.2.90-24a srpm with the flag
> --enable-oldest-abi=2.3 added to configure in the specfile.
> causes a build failure which doesn't occur to the stock
> srpm...
> 
> make[2]: Entering directory `/home/howarth/rhdev/BUILD/glibc-2.2.90/elf'
> gcc   -nostdlib -nostartfiles -shared                   \
>   -Wl,-z,combreloc -Wl,--verbose 2>&1 |                 \
>           sed -e '/^=========/,/^=========/!d;/^=========/d'    \
>               -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
>           > /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so.lds;                                               \
> gcc   -nostdlib -nostartfiles -shared -o /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so -Wl,-z,combreloc      \
>           /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/librtld.os -Wl,--version-script=/home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/ld.map              \
>           -Wl,-soname=ld.so.1 -T /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so.lds;          \
> rm -f /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so.lds
> /usr/bin/ld: /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so: undefined versioned symbol name __udivdi3@GLIBC_2.0
> /usr/bin/ld: failed to set dynamic section sizes: Bad value
> collect2: ld returned 1 exit status
> rm -f /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so.1
> ln -s ld.so /home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so.1
> make[2]: Leaving directory `/home/howarth/rhdev/BUILD/glibc-2.2.90/elf'
> make[1]: *** No rule to make target `/home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/elf/ld.so', needed by `/home/howarth/rhdev/BUILD/glibc-2.2.90/build-ppc-linux/libc.so'.  Stop.
> make[1]: Leaving directory `/home/howarth/rhdev/BUILD/glibc-2.2.90'
> 

The elf/Makefile doesn't make much sense. We get the strange message
above, instead of

/usr/bin/ld: /home/hjl/build/glibc/build-ppc-redhat-linux/elf/ld.so: undefined
versioned symbol name __udivdi3@GLIBC_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
make[2]: *** [/home/hjl/build/glibc/build-ppc-redhat-linux/elf/ld.so] Error 1
make[2]: Leaving directory `/home/hjl/src/glibc/libc/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/hjl/src/glibc/libc'
make: *** [all] Error 2

Here is a patch.


H.J.
-------------- next part --------------
2002-08-19  H.J. Lu  <hjl@gnu.org>

	* elf/Makefile ($(objpfx)ld.so): Fix rule.

--- elf/Makefile.error	Mon Aug 19 23:07:12 2002
+++ elf/Makefile	Mon Aug 19 23:08:31 2002
@@ -172,10 +172,10 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld
 		  $(LDFLAGS-rtld) -Wl,--verbose 2>&1 |			\
 		  sed -e '/^=========/,/^=========/!d;/^=========/d'	\
 		      -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
-		  > $@.lds;						\
+		  > $@.lds
 	$(LINK.o) -nostdlib -nostartfiles -shared -o $@ $(LDFLAGS-rtld)	\
 		  $(filter-out $(map-file),$^) $(load-map-file)		\
-		  -Wl,-soname=$(rtld-installed-name) -T $@.lds;		\
+		  -Wl,-soname=$(rtld-installed-name) -T $@.lds
 	rm -f $@.lds
 
 # interp.c exists just to get this string into the libraries.


More information about the Libc-alpha mailing list