From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32108 invoked by alias); 1 Aug 2006 22:24:08 -0000 Received: (qmail 32089 invoked by uid 22791); 1 Aug 2006 22:24:08 -0000 X-Spam-Check-By: sourceware.org Received: from e34.co.us.ibm.com (HELO e34.co.us.ibm.com) (32.97.110.152) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Aug 2006 22:24:03 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k71MO27p019418 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 1 Aug 2006 18:24:02 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.6/NCO/VER7.0) with ESMTP id k71MO15e205632 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 1 Aug 2006 16:24:01 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k71MO1KX001245 for ; Tue, 1 Aug 2006 16:24:01 -0600 Received: from [9.10.86.122] (spokane1.rchland.ibm.com [9.10.86.122]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k71MO0v1001188; Tue, 1 Aug 2006 16:24:00 -0600 Message-ID: <44CFD565.8020701@us.ibm.com> Date: Tue, 01 Aug 2006 22:24:00 -0000 From: Steven Munroe User-Agent: Mozilla/5.0 (X11; U; Linux ppc64; en-US; rv:1.7.8) Gecko/20060411 MIME-Version: 1.0 To: GNU libc hacker , Alan Modra Subject: Including libgcc_eh in bug-atexit3-lib.so build breaks powerpc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-08/txt/msg00003.txt.bz2 With the recent change: 2006-07-28 Ulrich Drepper * dlfcn/Makefile (LDLIBS-bug-atexit3-lib.so): Use this instead of LDFLAGS. Add -lgcc_eh and libc_nonshared (again) to make sure we get the __stack_chk_fail_local definition when it's needed. we see the powerpc[32|64] make check fail when compiling with gcc-4.1.1: /opt/biarch/gcc411-p6-test/bin/gcc -m32 -mlong-double-128 -shared -static-libgcc -Wl,-dynamic-linker=/lib/ld.so.1 -Wl,-z,defs -B/home/sjmunroe/work/build32-24x/csu/ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -L/home/sjmunroe/work/build32-24x -L/home/sjmunroe/work/build32-24x/math -L/home/sjmunroe/work/build32-24x/elf -L/home/sjmunroe/work/build32-24x/dlfcn -L/home/sjmunroe/work/build32-24x/nss -L/home/sjmunroe/work/build32-24x/nis -L/home/sjmunroe/work/build32-24x/rt -L/home/sjmunroe/work/build32-24x/resolv -L/home/sjmunroe/work/build32-24x/crypt -L/home/sjmunroe/work/build32-24x/nptl -Wl,-rpath-link=/home/sjmunroe/work/build32-24x:/home/sjmunroe/work/build32-24x/math:/home/sjmunroe/work/build32-24x/elf:/home/sjmunroe/work/build32-24x/dlfcn:/home/sjmunroe/work/build32-24x/nss:/home/sjmunroe/work/build32-24x/nis:/home/sjmunroe/work/build32-24x/rt:/home/sjmunroe/work/build32-24x/resolv:/home/sjmunroe/work/build32-24x/crypt:/home/sjmunroe/work/build32-24x/nptl -o /home/sjmunroe/work/build32-24x/dlfcn/bug-atexit3-lib.so -T /home/sjmunroe/work/build32-24x/shlib.lds /home/sjmunroe/work/build32-24x/csu/abi-note.o /home/sjmunroe/work/build32-24x/dlfcn/bug-atexit3-lib.os /home/sjmunroe/work/build32-24x/libc.so /home/sjmunroe/work/build32-24x/libc_nonshared.a -lstdc++ -lgcc_eh /home/sjmunroe/work/build32-24x/libc_nonshared.a /opt/biarch/gcc411-p6-test/lib/gcc/powerpc64-linux/4.1.1/libgcc_eh.a(unwind-dw2.o):(.got2+0x10): undefined reference to `__libc_stack_end' collect2: ld returned 1 exit status make[2]: *** [/home/sjmunroe/work/build32-24x/dlfcn/bug-atexit3-lib.so] Error 1 The problem is that unwind-dw2 needs __libc_stack_end to find the AUX Vector AT_HWCAP. The HWCAP is required to check for the presence of FPU or Altivec registers. But `__libc_stack_end' is only exported by ld.so and ld.so is not included in this link. The simple solution is to add "$(common-objpfx)/elf/ld.so" to the link. However some might find a patch like the following objectionable: diff -urN libc24-cvstip-20060731/dlfcn/Makefile libc24/dlfcn/Makefile --- libc24-cvstip-20060731/dlfcn/Makefile 2006-07-28 12:37:26.000000000 -0500 +++ libc24/dlfcn/Makefile 2006-08-01 16:37:06.199679600 -0500 @@ -140,6 +140,7 @@ $(objpfx)bug-atexit3: $(libdl) $(objpfx)bug-atexit3.out: $(objpfx)bug-atexit3-lib.so $(objpfx)bug-atexit3-lib.so: $(common-objpfx)libc.so \ + $(common-objpfx)/elf/ld.so \ $(common-objpfx)libc_nonshared.a As it is fixing an arch specific problem in a generic part of the tree. Unfortunately my other attempts to resolve this from powerpc specific Makefiles have failed. For example: diff -urN libc24-cvstip-20060731/sysdeps/powerpc/Makefile libc24/sysdeps/powerpc/Makefile --- libc24-cvstip-20060731/sysdeps/powerpc/Makefile 2004-02-13 21:24:52.000000000 -0600 +++ libc24/sysdeps/powerpc/Makefile 2006-08-01 15:51:50.835642272 -0500 @@ -28,3 +28,7 @@ # get offset to rtld_global._dl_hwcap gen-as-const-headers += rtld-global-offsets.sym endif + +ifeq ($(subdir),dlfcn) +LDLIBS-bug-atexit3-lib.so += $(common-objpfx)/elf/ld.so +endif Has no effect. Some guidence on the best way to resolve this would be appreciated