From patchwork Sun Feb 26 11:15:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 9592257 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 2C3B860459 for ; Sun, 26 Feb 2017 11:15:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E0B028478 for ; Sun, 26 Feb 2017 11:15:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02D362847B; Sun, 26 Feb 2017 11:15:51 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 466E028478 for ; Sun, 26 Feb 2017 11:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751997AbdBZLPu (ORCPT ); Sun, 26 Feb 2017 06:15:50 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33949 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752031AbdBZLPs (ORCPT ); Sun, 26 Feb 2017 06:15:48 -0500 Received: by mail-wr0-f193.google.com with SMTP id m5so1200701wrm.1 for ; Sun, 26 Feb 2017 03:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=VQA9Bg2ItASIk+tuoiZdwj7W+ONaRy/MUsH2qkm+6Es=; b=JloQoMS5CgeOaEmgKA+0AZIzzBMSkRv9GZVKlQNOvzLJy/7UZk+hhv2Y+kQj3jKLSt ijfflIOAYa+V0ZfE5XS+0shS6lRTeegNyNMI2cTJdqNuxhPr7NkUmkJypwLTo8gtogDZ +veBrOC/C5whgQzDGRe+IyRkbsFIHA/oSTsPVuRtX1m/wmem8+Xtd0NzprJVQQxu/Jbr 8bCqNiVVvX3IndjFYQWITCGj0hfCV0WH58ubvDdP6Viy/CukqxCUEh57YEC1aA4Lj592 UQ7rIYD6FB6ucaqU58mgAwAAzaBcL1K8iSCdeh2Wxa8il7SnggRdOtZXkDF85q2d95QT Rleg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=VQA9Bg2ItASIk+tuoiZdwj7W+ONaRy/MUsH2qkm+6Es=; b=iDZx4pGq5zbqAFZ4igo+ePYcPTP1rYvMccqgFFyFRCNt3wN8m+if1DTqKoLzQsNi0a dNkxqUL1kImBmAgePneXLl7QRxdtSy+R7nhuq4LV3Kr70ExwBTu0Ym2mZKEYDQo3Pq28 ij1EmGNr7wdM9RZU5Z5J5mEitz0DUAfJKJAsfo+smH33vJchEMqSXoXFHVjGHfcn9MvA CqgL6YVIzZGKNzpB2M6L3JvOonC90MnNjsTeE7IIOTfERzx8Mi7T6RjReFWOIV5SbJgQ 81fFVEkiAq7chI5e23hdniVZfflY0gMXZxD7jR36DywjZRRAoQR23/Yh17x1gDcv3u8s 6exw== X-Gm-Message-State: AMke39lwyKHPMjrIZJCdsOW8PDtkUxvcZo5gZ6RyquJWYalq3nnjoNW181LxEeByTjSoGQ== X-Received: by 10.223.171.15 with SMTP id q15mr1273682wrc.38.1488107728023; Sun, 26 Feb 2017 03:15:28 -0800 (PST) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id w30sm17867828wrb.5.2017.02.26.03.15.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Feb 2017 03:15:26 -0800 (PST) From: "Yann E. MORIN" To: linux-xfs@vger.kernel.org Cc: "Yann E. MORIN" , Waldemar Brodkorb Subject: [PATCH] build: add EXTRALIBS to link with Date: Sun, 26 Feb 2017 12:15:22 +0100 Message-Id: <1488107722-15022-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When doing a uClibc static build, the build fails to link: http://autobuild.buildroot.org/results/503/50314716a9f72e8bb238e52e9dc342c68f7e0b8b/build-end.log The cause is due to: - xfsprogs links dome programs with util-linux' libblkid - util-linux' libblkid is linked to util-linux' libuuid - util-linux' libuuid uses i18n functions when locales are enabled - uClibc does not provide i18n functions - i18n functions are provided by libintl from libintl from gettext util-linux installs pkg-config files for thos two libs. However, xfsprogs does not use pkg-config to find libblkid or libuuid, thus it misses the Libs.private field from libuid. In this case, it is necessary to pass LIBS=-lintl at configure time, so that configure correctly finds libblkid. Still, this is not enough, because the build will not use LIBS during the link phase. We fix that last bit by adding EXTRALIBS to the libraries to link with, so that it is possible to pass EXTRALIBS=-lintl at build time: $ ./configure [...] LIBS=-lintl $ make EXTRALIBS=-lintl Signed-off-by: "Yann E. MORIN" Cc: Waldemar Brodkorb --- include/buildmacros | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/buildmacros b/include/buildmacros index a7c5d8a..dd62d80 100644 --- a/include/buildmacros +++ b/include/buildmacros @@ -11,7 +11,7 @@ BUILDRULES = $(TOPDIR)/include/buildrules LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS) LTLDFLAGS += $(LOADERFLAGS) -LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) +LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB) $(EXTRALIBS) MAKEOPTS = --no-print-directory Q=$(Q) SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)