From patchwork Tue Jul 29 12:54:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Kolesov X-Patchwork-Id: 374457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 5DCA6140199 for ; Tue, 29 Jul 2014 22:54:52 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E7A6F89606; Tue, 29 Jul 2014 12:54:51 +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 sAsXKP4LDaAI; Tue, 29 Jul 2014 12:54:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 40C018809A; Tue, 29 Jul 2014 12:54:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id DED791BF9A7 for ; Tue, 29 Jul 2014 12:54:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id DAA6A88159 for ; Tue, 29 Jul 2014 12:54:49 +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 BtPeNHfSNTPV for ; Tue, 29 Jul 2014 12:54:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.44.111]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 21ED68809A for ; Tue, 29 Jul 2014 12:54:49 +0000 (UTC) Received: from us02secmta1.synopsys.com (us02secmta1.synopsys.com [10.12.235.96]) by smtprelay.synopsys.com (Postfix) with ESMTP id 794F624E0F98; Tue, 29 Jul 2014 05:54:46 -0700 (PDT) Received: from us02secmta1.internal.synopsys.com (us02secmta1.internal.synopsys.com [127.0.0.1]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 5A8FD4E213; Tue, 29 Jul 2014 05:54:46 -0700 (PDT) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 1F9204E202; Tue, 29 Jul 2014 05:54:46 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 10C3577A; Tue, 29 Jul 2014 05:54:46 -0700 (PDT) Received: from akolesov-lab.internal.synopsys.com (akolesov-lab.internal.synopsys.com [10.121.8.134]) by mailhost.synopsys.com (Postfix) with ESMTP id 836F2779; Tue, 29 Jul 2014 05:54:44 -0700 (PDT) From: Anton Kolesov To: patrickdepinguin@gmail.com, thomas.petazzoni@free-electrons.com, buildroot@uclibc.org Date: Tue, 29 Jul 2014 16:54:37 +0400 Message-Id: <1406638477-30555-1-git-send-email-Anton.Kolesov@synopsys.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: References: Cc: Alexey Brodkin Subject: [Buildroot] [PATCH v2] binutils: gdb: Support unified binutils-gdb git repository X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net If Binutils and/or GDB are fetched from the unified bintuils-gdb repository, then tarball will contain both Binutils and GDB sources, unlike the "normal" tarballs that contain only the titular package. To keep packages separated in Buildroot we need to disable undesired components when configuring. Binutils and GDB migrated to a common Git repository in the October 2013 [1]. Previous Git repositories were incomplete copies of CVS repository which copied only the relevant files (no binutils files in GDB, and vice versa). In the new binutils-gdb repository there is no such separation and a result all files exist in directory after checkout. So if "configure" and "make" are used without explicit targets, all projects will be built: binutils, ld, gas, bfd, opcodes, gdb, etc. In case of Buildroot this would mean that selecting Binutils only, still will build both Binutils and GDB. And if GDB is selected as well, then both packages will be built two times, and Binutils from GDB directory will overwrite initial build of Binutils (or vice versa if Binutils will be built after the GDB). This is a serious problem, because binutils and GDB use separate branches in this common repository. In case of Buildroot this means that separate Git commits (or tags) should be used when downloading source from Git. This affects only Git repositories, because GNU release tarballs still contain only relevant packages. This change is backward compatible, because if "normal" tarball is used (without extra directories), than --disable-* configure options are just ignored by configure. [1] https://sourceware.org/ml/gdb/2013-10/msg00071.html Signed-off-by: Anton Kolesov Cc: Alexey Brodkin --- package/binutils/binutils.mk | 2 ++ package/gdb/gdb.mk | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index 77d0751..2beb5e0 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -47,6 +47,7 @@ BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ --host=$(GNU_TARGET_NAME) \ --target=$(GNU_TARGET_NAME) \ --enable-install-libiberty \ + --disable-sim --disable-gdb \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) # Don't build documentation. It takes up extra space / build time, @@ -65,6 +66,7 @@ HOST_BINUTILS_CONF_OPT = --disable-multilib --disable-werror \ --target=$(GNU_TARGET_NAME) \ --disable-shared --enable-static \ --with-sysroot=$(STAGING_DIR) \ + --disable-sim --disable-gdb \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) # We just want libbfd and libiberty, not the full-blown binutils in staging diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 6640d2c..c58ad21 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -67,6 +67,9 @@ GDB_CONF_OPT = \ --disable-gdbtk \ --without-x \ --disable-sim \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \ --with-curses \ --without-included-gettext \ @@ -111,6 +114,9 @@ HOST_GDB_CONF_OPT = \ --enable-threads \ --disable-werror \ --without-included-gettext \ + --disable-binutils \ + --disable-ld \ + --disable-gas \ --disable-sim ifeq ($(GDB_FROM_GIT),y)