From patchwork Tue Jun 25 17:11:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Disseldorp X-Patchwork-Id: 254252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "userp1040.oracle.com", Issuer "VeriSign Class 3 International Server CA - G3" (not verified)) by ozlabs.org (Postfix) with ESMTPS id E014A2C007E for ; Wed, 26 Jun 2013 03:10:51 +1000 (EST) Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5PH4Rko016138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Jun 2013 17:04:28 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5PHAjY2016504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 25 Jun 2013 17:10:45 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UrWlR-00049b-2Z; Tue, 25 Jun 2013 10:10:45 -0700 Received: from acsinet22.oracle.com ([141.146.126.238]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1UrWlA-00048r-Gm for fedfs-utils-devel@oss.oracle.com; Tue, 25 Jun 2013 10:10:28 -0700 Received: from userp1030.oracle.com (userp1030.oracle.com [156.151.31.80]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r5PHARFJ015836 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Jun 2013 17:10:28 GMT Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by userp1030.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r5PH7tQO007391 for ; Tue, 25 Jun 2013 17:07:56 GMT Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 128EEA52D7 for ; Tue, 25 Jun 2013 19:10:26 +0200 (CEST) From: David Disseldorp To: fedfs-utils-devel@oss.oracle.com Date: Tue, 25 Jun 2013 19:11:45 +0200 Message-Id: <1372180305-24852-2-git-send-email-ddiss@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372180305-24852-1-git-send-email-ddiss@suse.de> References: <1372180305-24852-1-git-send-email-ddiss@suse.de> X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=195.135.220.15 ct-class=T2 ct-vol1=0 ct-vol2=4 ct-vol3=4 ct-risk=65 ct-spam1=75 ct-spam2=45 ct-bulk=34 rcpts=1 size=6647 X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=TK98FTVa c=1 sm=1 tr=0 a=uEuDQZVrWKuLCe7byFjfVg==:117 a=uEuDQZVrWKuLCe7byFjfVg==:17 a=nfVsX_IRNI0A:10 a=7SFtLa4N3QQA:10 a=yPCof4ZbAAAA:8 a=a8wM_x19Y6MA:10 a=7mOBRU54AAAA:8 a=16i8BVe1b2E-jD-WQUUA:9 a=0kPLrQdw3YYA:10 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090204.51C9CF03.00C3:SCFSTAT13898897, ss=1, re=-4.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 Subject: [fedfs-utils] [PATCH 2/2] build: fix gcc linker library argument placement X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet22.oracle.com [141.146.126.238] The build currently fails on gcc 4.7.3 based openSUSE systems due to the placement of library arguments while linking, and the use of the --as-needed binutils feature. As described by http://www.gentoo.org/proj/en/qa/asneeded.xml: For symbols missing in a given file (either an object file, a static archive or a library), the linker checks only in the files coming after it. Without --as-needed, files are linked together without considering ordering. But with the flag, the libraries that aren't used for resolving symbols are discarded and thus not linked. Signed-off-by: David Disseldorp --- src/fedfsc/Makefile.am | 10 +++++----- src/fedfsd/Makefile.am | 10 +++++----- src/mount/Makefile.am | 8 ++++---- src/nfsref/Makefile.am | 10 +++++----- src/nsdbc/Makefile.am | 10 +++++----- src/nsdbparams/Makefile.am | 10 +++++----- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/fedfsc/Makefile.am b/src/fedfsc/Makefile.am index a12cf19..716472e 100644 --- a/src/fedfsc/Makefile.am +++ b/src/fedfsc/Makefile.am @@ -30,13 +30,13 @@ sbin_PROGRAMS = fedfs-null \ fedfs-lookup-junction \ fedfs-create-replication fedfs-delete-replication \ fedfs-lookup-replication -LDADD = $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ - $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ - $(LIBCRYPTO) $(LIBSSL) \ - $(top_builddir)/src/libadmin/libadmin.la \ +LDADD = $(top_builddir)/src/libadmin/libadmin.la \ $(top_builddir)/src/libjunction/libjunction.la \ $(top_builddir)/src/libnsdb/libnsdb.la \ - $(top_builddir)/src/libxlog/libxlog.la + $(top_builddir)/src/libxlog/libxlog.la \ + $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ + $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ + $(LIBCRYPTO) $(LIBSSL) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/src/fedfsd/Makefile.am b/src/fedfsd/Makefile.am index 0705a3b..f3b3ca6 100644 --- a/src/fedfsd/Makefile.am +++ b/src/fedfsd/Makefile.am @@ -27,13 +27,13 @@ noinst_HEADERS = fedfsd.h RPCPREFIX = rpc. sbin_PROGRAMS = fedfsd fedfsd_SOURCES = listen.c main.c privilege.c svc.c -fedfsd_LDADD = $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ - $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \ - $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) \ - $(top_builddir)/src/libadmin/libadmin.la \ +fedfsd_LDADD = $(top_builddir)/src/libadmin/libadmin.la \ $(top_builddir)/src/libnsdb/libnsdb.la \ $(top_builddir)/src/libjunction/libjunction.la \ - $(top_builddir)/src/libxlog/libxlog.la + $(top_builddir)/src/libxlog/libxlog.la \ + $(LIBTIRPC) $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ + $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \ + $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/src/mount/Makefile.am b/src/mount/Makefile.am index 7b00b4a..e09c06d 100644 --- a/src/mount/Makefile.am +++ b/src/mount/Makefile.am @@ -27,12 +27,12 @@ noinst_HEADERS = nls.h root_sbin_PROGRAMS = mount.fedfs sbin_PROGRAMS = fedfs-map-nfs4 fedfs_map_nfs4_SOURCES = fedfs-map-nfs4.c -fedfs_map_nfs4_LDADD = $(LIBRESOLV) \ - $(top_builddir)/src/libsi/libsi.la +fedfs_map_nfs4_LDADD = $(top_builddir)/src/libsi/libsi.la \ + $(LIBRESOLV) mount_fedfs_SOURCES = main.c # mount.fedfs must never link against libraries in /usr -mount_fedfs_LDADD = $(LIBRESOLV) \ - $(top_builddir)/src/libsi/libsi.la +mount_fedfs_LDADD = $(top_builddir)/src/libsi/libsi.la \ + $(LIBRESOLV) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/src/nfsref/Makefile.am b/src/nfsref/Makefile.am index 411ad15..995768d 100644 --- a/src/nfsref/Makefile.am +++ b/src/nfsref/Makefile.am @@ -26,12 +26,12 @@ noinst_HEADERS = nfsref.h sbin_PROGRAMS = nfsref nfsref_SOURCES = add.c lookup.c nfsref.c remove.c -LDADD = $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ - $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ - $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) \ - $(top_builddir)/src/libnsdb/libnsdb.la \ +LDADD = $(top_builddir)/src/libnsdb/libnsdb.la \ $(top_builddir)/src/libxlog/libxlog.la \ - $(top_builddir)/src/libjunction/libjunction.la + $(top_builddir)/src/libjunction/libjunction.la \ + $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ + $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ + $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/src/nsdbc/Makefile.am b/src/nsdbc/Makefile.am index b5fd5a9..f8499b5 100644 --- a/src/nsdbc/Makefile.am +++ b/src/nsdbc/Makefile.am @@ -28,12 +28,12 @@ sbin_PROGRAMS = nsdb-annotate nsdb-describe nsdb-list \ nsdb-delete-nsdb nsdb-simple-nce \ nsdb-create-fsn nsdb-delete-fsn nsdb-resolve-fsn \ nsdb-create-fsl nsdb-delete-fsl nsdb-update-fsl -LDADD = $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ - $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ - $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) \ - $(top_builddir)/src/libnsdb/libnsdb.la \ +LDADD = $(top_builddir)/src/libnsdb/libnsdb.la \ $(top_builddir)/src/libxlog/libxlog.la \ - $(top_builddir)/src/libjunction/libjunction.la + $(top_builddir)/src/libjunction/libjunction.la \ + $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ + $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) \ + $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in diff --git a/src/nsdbparams/Makefile.am b/src/nsdbparams/Makefile.am index 14c8be3..73c7348 100644 --- a/src/nsdbparams/Makefile.am +++ b/src/nsdbparams/Makefile.am @@ -26,12 +26,12 @@ noinst_HEADERS = nsdbparams.h sbin_PROGRAMS = nsdbparams nsdbparams_SOURCES = delete.c list.c main.c show.c update.c -LDADD = $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ - $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \ - $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) \ - $(top_builddir)/src/libnsdb/libnsdb.la \ +LDADD = $(top_builddir)/src/libnsdb/libnsdb.la \ $(top_builddir)/src/libjunction/libjunction.la \ - $(top_builddir)/src/libxlog/libxlog.la + $(top_builddir)/src/libxlog/libxlog.la \ + $(LIBLDAP) $(LIBLBER) $(LIBXML2) \ + $(LIBSQLITE3) $(LIBIDN) $(LIBUUID) $(LIBCAP) \ + $(LIBURIPARSER) $(LIBCRYPTO) $(LIBSSL) CLEANFILES = cscope.in.out cscope.out cscope.po.out *~ DISTCLEANFILES = Makefile.in