From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26517 invoked by alias); 7 May 2013 14:22:13 -0000 Mailing-List: contact prelink-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: prelink-owner@sourceware.org Received: (qmail 26486 invoked by uid 89); 7 May 2013 14:22:07 -0000 X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 07 May 2013 14:22:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UZimK-0004sC-Tm from Tom_deVries@mentor.com ; Tue, 07 May 2013 07:22:04 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 7 May 2013 07:22:05 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Tue, 7 May 2013 15:22:02 +0100 Message-ID: <51890E03.2000009@mentor.com> Date: Tue, 07 May 2013 14:22:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jakub Jelinek CC: Subject: Re: [PATCH] Add LINKOPTS to CCLINK and CXXLINK in testsuite/Makefile.am References: <5188F4B0.7050309@mentor.com> <20130507124043.GD28963@tucnak.redhat.com> In-Reply-To: <20130507124043.GD28963@tucnak.redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-q2/txt/msg00002.txt.bz2 On 07/05/13 14:40, Jakub Jelinek wrote: > On Tue, May 07, 2013 at 02:33:52PM +0200, Tom de Vries wrote: >> this patch allows me to run all the tests successfully on x86_64 with >> LINKOPTS="-Wl,--no-as-needed" set in the environment. > > That shouldn't be needed anymore, are you using latest SVN prelink? Jakub, I'm using r205, dated 2013-05-03. The failures I see with that version are: ... FAIL: layout1.sh FAIL: layout2.sh FAIL: tls5.sh FAIL: tls6.sh FAIL: cxx1.sh FAIL: cxx2.sh FAIL: cxx3.sh FAIL: quick1.sh FAIL: quick2.sh FAIL: cycle1.sh FAIL: cycle2.sh ... Running tls5 by hand gives: ... $ ../../src/testsuite/tls5.sh ; echo $? ../src/prelink: tls5lib3.so does not have .gnu.prelink_undo section 4 ... Without --no-as-needed, tls5lib1.so is not dependent on tls5lib3.so, so the prelink command ignores it: ... ../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=./ld-linux-x86-64.so.2 -vm ./tls5 Laying out 2 libraries in virtual address space 0000003000000000-0000004000000000 Assigned virtual address space slots for libraries: ./ld-linux-x86-64.so.2 0000003000000000-00000030002242c8 ./tls5lib1.so 0000003000400000-0000003000602088 ./tls5lib2.so 0000003000800000-0000003000a01030 ./libc.so.6 0000003000c00000-0000003000fbe4d8 Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5lib2.so Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5lib1.so Prelinking /home/vries/upstream/prelink/builds/prelink/build/testsuite/tls5 ... and the undo of the prelink of tls5lib3.so fails. Setting LINKOPTS with --no-as-needed allows the test to pass: ... $ LINKOPTS="-Wl,--no-as-needed" ../../src/testsuite/tls5.sh ; echo $? 0 ... > Before those testsuite changes, one could just do > make check CC='gcc -Wl,--no-as-needed' CXX='g++ -Wl,--no-as-needed' That works also for me. I used LINKOPTS because I read functions.sh and saw how it's used there (CC includes LINKOPTS, CCLINK includes CC which includes LINKOPTS). It made sense to me to use LINKOPTS because --no-as-needed it is a link opt, and we need to pass it only once (instead of in both CC and CXX). Thanks, - Tom