From patchwork Tue Apr 10 13:54:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 10333227 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EDC1A601A0 for ; Tue, 10 Apr 2018 14:01:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D914628E27 for ; Tue, 10 Apr 2018 14:01:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D712228F21; Tue, 10 Apr 2018 14:01:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Greylist: delayed 393 seconds by postgrey-1.34 at pdx-wl-mail.web.codeaurora.org; Tue, 10 Apr 2018 14:00:58 UTC Received: from bastion.fedoraproject.org (bastion01.fedoraproject.org [209.132.181.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 269D028F46 for ; Tue, 10 Apr 2018 14:00:57 +0000 (UTC) Received: from mailman01.phx2.fedoraproject.org (mailman01.phx2.fedoraproject.org [10.5.126.36]) by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id EEAE46042802; Tue, 10 Apr 2018 13:54:24 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 bastion01.phx2.fedoraproject.org EEAE46042802 Received: from mailman01.phx2.fedoraproject.org (localhost [IPv6:::1]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id D790825412565; Tue, 10 Apr 2018 13:54:24 +0000 (UTC) Received: by mailman01.phx2.fedoraproject.org (Postfix, from userid 991) id 066A62541154E; Tue, 10 Apr 2018 13:54:15 +0000 (UTC) Received: from smtp-mm-ib01.fedoraproject.org (smtp-mm-ib01.vpn.fedoraproject.org [192.168.1.83]) by mailman01.phx2.fedoraproject.org (Postfix) with ESMTP id E688025412564 for ; Tue, 10 Apr 2018 13:54:11 +0000 (UTC) Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by smtp-mm-ib01.fedoraproject.org (Postfix) with ESMTPS id 936F2605D244 for ; Tue, 10 Apr 2018 13:54:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35672406802D; Tue, 10 Apr 2018 13:54:11 +0000 (UTC) Received: from graphite.mxp.redhat.com (unknown [10.32.181.174]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72ABD2024CA4; Tue, 10 Apr 2018 13:54:10 +0000 (UTC) From: Timothy Redaelli To: libteam@lists.fedorahosted.org Subject: [PATCH] configure.ac: Empty LDFLAGS before checking for libnl3 Date: Tue, 10 Apr 2018 15:54:02 +0200 Message-Id: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 10 Apr 2018 13:54:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 10 Apr 2018 13:54:11 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'tredaelli@redhat.com' RCPT:'' Message-ID-Hash: 4X2GRGIPD4M3TKE4UYPLGSFI2LWAWI7H X-Message-ID-Hash: 4X2GRGIPD4M3TKE4UYPLGSFI2LWAWI7H X-MailFrom: tredaelli@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: jiri@resnulli.us X-Mailman-Version: 3.1.1 Precedence: list List-Id: Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Currently since CFLAGS are dropped if you have LDFLAGS=-pie (default on RHEL) the rtnl_link_get_phys_port_id, rtnl_link_set_carrier and rtnl_link_get_carrier tests always fails: /usr/bin/ld: /tmp/ccv5GdFD.o: relocation R_X86_64_PC32 against undefined symbol `rtnl_link_get_carrier@@libnl_3' can not be used when making a shared object; recompile with -fPIC This commits empty LDFLAGS before launching the 3 tests and restores it after the tests. Signed-off-by: Timothy Redaelli --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) -- 2.14.3 diff --git a/configure.ac b/configure.ac index 60657bb..f27c15c 100644 --- a/configure.ac +++ b/configure.ac @@ -39,8 +39,10 @@ LT_INIT PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-cli-3.0]) TMP_CFLAGS="$CFLAGS" + TMP_LDFLAGS="$LDFLAGS" TMP_LIBS="$LIBS" CFLAGS="$CPPFLAGS $LIBNL_CFLAGS" + LDFLAGS="" LIBS="$LIBS $LIBNL_LIBS" AC_CHECK_LIB([nl-route-3], [rtnl_link_get_phys_port_id], AC_DEFINE(HAVE_RTNL_LINK_GET_PHYS_ID, [1], [Define to 1 if you have rtnl_link_get_phys_port_id function.])) @@ -49,6 +51,7 @@ PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0 libnl-route-3.0 libnl-cli-3 AC_CHECK_LIB([nl-route-3], [rtnl_link_get_carrier], AC_DEFINE(HAVE_RTNL_LINK_GET_CARRIER, [1], [Define to 1 if you have rtnl_link_get_carrier.])) CFLAGS="$TMP_CFLAGS" + LDFLAGS="$TMP_LDFLAGS" LIBS="$TMP_LIBS" PKG_CHECK_MODULES([LIBDAEMON], [libdaemon])