From patchwork Tue Feb 11 16:34:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Duskett X-Patchwork-Id: 1236368 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Cl0I2REV; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48H7f80F71z9s29 for ; Wed, 12 Feb 2020 03:34:40 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1812B84160; Tue, 11 Feb 2020 16:34:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h6D8vBS_46wI; Tue, 11 Feb 2020 16:34:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6D363841D4; Tue, 11 Feb 2020 16:34:32 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0F4F01BF370 for ; Tue, 11 Feb 2020 16:34:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 0CE3B84718 for ; Tue, 11 Feb 2020 16:34:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8vhmVJ1wTkh1 for ; Tue, 11 Feb 2020 16:34:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1018B840FF for ; Tue, 11 Feb 2020 16:34:27 +0000 (UTC) Received: by mail-pf1-f195.google.com with SMTP id q8so5735311pfh.7 for ; Tue, 11 Feb 2020 08:34:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LNJZWL+zjDSZvai43wYqP6EhZzvMbgUeRM+Io4X6B6M=; b=Cl0I2REVy+JN/Q588ygmd+PkSy2VtJGWUJ+73xFhMK8aJU3KDZeSWyTYDeJdQCMPJ6 oIc438pE4sgNjCfYwenI/JkH6qwvv0P5Q5tOcwJ6hAwQtmvycv1EUo2gabzlaVYntxZQ N6KGAKrIXyMfixhzKLOysEmEo7PbdcmFhSXtns30Nr/8LsIj96bk3aA/BB9g/plxxJ2v GPrDnRhCRhpVy+nJX6qQcDqU4xG/vOqC6MoGKDXaSIxnFn97pNWgGTTCt/ROd2p4/FYW WbwGgW5RcxyCEjg6nCPn87k1CBfayR/08500Xv2FNfcM06oGCYRva3B3C3v5hgzAfosG SFjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LNJZWL+zjDSZvai43wYqP6EhZzvMbgUeRM+Io4X6B6M=; b=oN4luMlFFGhNp3Q7O3K9dexupBjbmsqi17Y0OzastrQkEGlAuVLu1Zdm9Txapdv8xk ujPiun/ECZcuKuytdWhroe9/6fLZ8NFI6SOIJ6nJ80mpB2UzoGS+VcfS/8lico484WI+ k9RmSriKExWVL8E4yYEFpl6TJ/pKm4HQKtWHwdWjFwvi3RdrqyYKWgXdR8xgSveI/Fi3 aBsrzppqovjDaLUcsFFXCwE+1ipUGYwEFXfC46yzaSSVpUS7xBvU8nx1s1sTM7HU2En8 0isJJ5DKdOaoevpH0G+KhZNfhC9qxLN7mo6Ap83JDsZxzVZjm6QAT/CafvIdfELmIlHB SBvg== X-Gm-Message-State: APjAAAXLLIdPYrkEZRaW72jb7Sm2/oj7OIp4fHXXRZtV3YAuUg4hjiqj 9yPQ8nFKYf1gOD89L2uf3XstF4Ndzzs= X-Google-Smtp-Source: APXvYqyXU7sS2UtvpaLLu64RDkUazKns3hFEufYa8u//5q37tu/+CAUeCN9vVI+7+YkGkZuF6DJ9dA== X-Received: by 2002:aa7:9567:: with SMTP id x7mr3990693pfq.133.1581438866281; Tue, 11 Feb 2020 08:34:26 -0800 (PST) Received: from localhost.localdomain ([12.220.142.98]) by smtp.gmail.com with ESMTPSA id w8sm4682505pfn.186.2020.02.11.08.34.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Feb 2020 08:34:25 -0800 (PST) From: aduskett@gmail.com To: buildroot@buildroot.org Date: Tue, 11 Feb 2020 08:34:00 -0800 Message-Id: <20200211163404.87262-2-aduskett@gmail.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200211163404.87262-1-aduskett@gmail.com> References: <20200211163404.87262-1-aduskett@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v17 1/5] package/libiberty: new package X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" , Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Adam Duskett Some packages, like prelink-cross, want to use libiberty but do not bundle their own instance (which is good!). However, libiberty is made for being bundled in packages: all GNU packages that use libiberty (gcc, Binutils, gdb, et al...) all have their own bundled variant. This common practice means that there is no official upstream for libiberty, the closest being as part of the combined Binutils-gdb tree. So we introduce a new host-only package, that installs just libiberty from a Binutils released tarball. Again, as packages usually bundle libiberty, it usually only installs a static version. Furthermore, it does not obey the usual --enable-shared and --disable-static flags; it only ever builds a static version. Furthermore, -fPIC is not used with this library, but some packages may pick it to build shared objects. This behavior is the case for host-gdb, for example, which accidentally picks that library instead of its internal one. So, rather than fix the various gdb versions and variants we can use, we ensure that the libiberty we install is usable in shared objects, and we always build before host-gdb. Signed-off-by: Adam Duskett --- Changes v15 -> v16: - Cleaned up the grammar in the commit message. Changes v1 -> v15: - Add this patch to the series DEVELOPERS | 1 + package/libiberty/libiberty.hash | 2 ++ package/libiberty/libiberty.mk | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 package/libiberty/libiberty.hash create mode 100644 package/libiberty/libiberty.mk diff --git a/DEVELOPERS b/DEVELOPERS index cb13035bc4..63f00ef748 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -2551,6 +2551,7 @@ F: package/keyutils/ F: package/libbsd/ F: package/libedit/ F: package/libgsm/ +F: package/libiberty/ F: package/libinput/ F: package/libiscsi/ F: package/libpri/ diff --git a/package/libiberty/libiberty.hash b/package/libiberty/libiberty.hash new file mode 100644 index 0000000000..270f38dfa7 --- /dev/null +++ b/package/libiberty/libiberty.hash @@ -0,0 +1,2 @@ +# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum +sha512 d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a binutils-2.32.tar.xz diff --git a/package/libiberty/libiberty.mk b/package/libiberty/libiberty.mk new file mode 100644 index 0000000000..17976fdd4f --- /dev/null +++ b/package/libiberty/libiberty.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libiberty +# +################################################################################ + +LIBIBERTY_VERSION = 2.32 +LIBIBERTY_SOURCE = binutils-$(LIBIBERTY_VERSION).tar.xz +LIBIBERTY_SITE = $(BR2_GNU_MIRROR)/binutils +LIBIBERTY_DL_SUBDIR = binutils +LIBIBERTY_SUBDIR = libiberty + +# We explicitly disable multilib, as we do in binutils. +# By default, libiberty installs nothing, so we must force it. +HOST_LIBIBERTY_CONF_OPTS = \ + --disable-multilib \ + --enable-install-libiberty + +# Some packages (e.g. host-gdb) will pick this library and build shared +# objects with it. But libiberty does not honour the --enable-shared and +# --disable-static flags; it only ever builds a static library no matter +# what. So we must force -fPIC in build flags. +HOST_LIBIBERTY_CONF_ENV = \ + CFLAGS="$(HOST_CFLAGS) -fPIC" \ + LDFLAGS="$(HOST_LDFLAGS) -fPIC" + +$(eval $(host-autotools-package))