From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29594 invoked by alias); 4 Sep 2013 10:05:57 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 29577 invoked by uid 89); 4 Sep 2013 10:05:57 -0000 Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 04 Sep 2013 10:05:57 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,NO_DNS_FOR_FROM autolearn=no version=3.3.2 X-HELO: einhorn.in-berlin.de X-Envelope-From: doko@ubuntu.com X-Envelope-To: Received: from [192.168.42.222] (dslb-088-073-107-047.pools.arcor-ip.net [88.73.107.47]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id r84A5q8P031258 for ; Wed, 4 Sep 2013 12:05:53 +0200 Message-ID: <52270600.8010008@ubuntu.com> Date: Wed, 04 Sep 2013 10:05:00 -0000 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCJ-patches Subject: [patch] Link the dummy libgcj_bc shared library with --no-as-needed Content-Type: multipart/mixed; boundary="------------020003000805040805010704" X-IsSubscribed: yes X-SW-Source: 2013-q3/txt/msg00017.txt.bz2 This is a multi-part message in MIME format. --------------020003000805040805010704 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Content-length: 385 When building a compiler which passes --no-as-needed by default to the linker, libgcj_bc.so ends up without a DTNEEDED entry for libgcj, because no symbols in libgcj are required to resolve symbols in libgcj_bc. This causes about 500 test cases to fail. Solved by explicitly passing -Wl,--no-as-needed. Is this ok for upstream? It's not needed, but doesn't hurt either. Matthias --------------020003000805040805010704 Content-Type: text/plain; charset=UTF-8; name="gcc-as-needed.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gcc-as-needed.diff" Content-length: 513 * Makefile.am (libgcj_bc.la): Link using -Wl,--no-as-needed. * Makefile.in: Regenerate. --- a/src/libjava/Makefile.am +++ b/src/libjava/Makefile.am @@ -625,7 +625,7 @@ rm .libs/libgcj_bc.so; \ mv .libs/libgcj_bc.so.1.0.0 .libs/libgcj_bc.so; \ $(libgcj_bc_dummy_LINK) -xc /dev/null -Wl,-soname,libgcj_bc.so.1 \ - -o .libs/libgcj_bc.so.1.0.0 -lgcj || exit; \ + -o .libs/libgcj_bc.so.1.0.0 -Wl,--no-as-needed -lgcj || exit; \ rm .libs/libgcj_bc.so.1; \ $(LN_S) libgcj_bc.so.1.0.0 .libs/libgcj_bc.so.1 --------------020003000805040805010704--