From patchwork Thu Apr 25 03:02:21 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 239376 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 53F2E2C0104 for ; Thu, 25 Apr 2013 13:02:44 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 153028D357; Thu, 25 Apr 2013 03:02:41 +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 tG5to8y4k4ou; Thu, 25 Apr 2013 03:02:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 752598D365; Thu, 25 Apr 2013 03:02:37 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 1BA628F7A0 for ; Thu, 25 Apr 2013 03:02:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6EA998D357 for ; Thu, 25 Apr 2013 03:02:35 +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 gXaua1LHQHmi for ; Thu, 25 Apr 2013 03:02:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id F07C48D34C for ; Thu, 25 Apr 2013 03:02:33 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 10A83825; Thu, 25 Apr 2013 05:02:32 +0200 (CEST) Received: from skate (ns6.enix.org [193.19.211.1]) by mail.free-electrons.com (Postfix) with ESMTPSA id AA2D57D3; Thu, 25 Apr 2013 05:02:31 +0200 (CEST) Date: Thu, 25 Apr 2013 05:02:21 +0200 From: Thomas Petazzoni To: Mischa Jonker Message-ID: <20130425050221.4846d873@skate> In-Reply-To: <1366798403-6984-1-git-send-email-mjonker@synopsys.com> References: <1366798403-6984-1-git-send-email-mjonker@synopsys.com> Organization: Free Electrons X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Cc: buildroot@busybox.net Subject: Re: [Buildroot] [PATCH v2 00/12] RFC: ARC port 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Dear Mischa Jonker, On Wed, 24 Apr 2013 12:13:11 +0200, Mischa Jonker wrote: > Thanks for the prompt feedback that I have received on the patches. > Here's a new revision of the patchset to introduce ARC support in > BuildRoot; I think I have addressed all the comments received from > Thomas and Arnout. Thanks for the quick turnaround! This time, I actually applied and tested your patches in the autobuilders environment, and I had some issues. The first issue is that your version of binutils require flex and bison installed on the host, so we have to add these as dependencies of binutils. The binutils.patch attached does that, but it does that unconditionally, regardless of the binutils version being chosen. Since the recent binutils versions do not require building flex and bison, I'd prefer to make this dependency conditional on which version of binutils is being built. The second issue is that gcc 4.4.x also require flex (and maybe bison, but I haven't checked). So I've added host-flex and host-bison as gcc dependencies. Unfortunately, gcc doesn't use the package infrastructure, so it doesn't add host/usr/bin to the PATH, so I had to change the gcc makefile to use $(HOST_MAKE_ENV) and $(TARGET_MAKE_ENV) where appropriate. This is the second 'gcc.patch' attached does. Here as well, it makes the host-flex and host-bison dependency unconditional, even though the latest versions of gcc do not require this. A proper patch would have to make this dependency conditional on the version of gcc being used. (Note: both patches are quick and dirty, they don't have any description or signed-off-by. Feel free to re-use them and apply your signed-off-by on them, I don't care about authorship on those patches.) Note that those flex and bison issues are visible in the autobuilder environment because the build runs in a minimal chroot that has only the strict, minimal dependencies required by Buildroot. That probably explains why you haven't seen those problems until now. Then, once this was fixed, the build went on, but failed at the gcc intermediate step, with some pthread related issue: In file included from /home/test/outputs/arc/toolchain/uClibc_dev//usr/include/stdio.h:71, from /home/test/outputs/arc/toolchain/gcc-4.4.7-arc/libgcc/../gcc/tsystem.h:87, from /home/test/outputs/arc/toolchain/gcc-4.4.7-arc/libgcc/../gcc/libgcc2.c:29: /home/test/outputs/arc/toolchain/uClibc_dev//usr/include/bits/uClibc_stdio.h:207: error: expected specifier-qualifier-list before 'pthread_mutex_t' make[3]: *** [_negdi2.o] Error 1 make[3]: *** Waiting for unfinished jobs.... The defconfig I was trying to build is very simple: $ cat defconfig BR2_arcle=y Do you have an idea for this pthread_mutex_t issue? Maybe ARC doesn't support NPTL or something? Also, do you have a public repo to push your changes to? Since your patch series has become quite long, it would make it easier for us to test it as a whole. Thanks! Thomas diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk index f4dbcae..161f33e 100644 --- a/toolchain/gcc/gcc-uclibc-4.x.mk +++ b/toolchain/gcc/gcc-uclibc-4.x.mk @@ -175,6 +175,8 @@ endif GCC_HOST_PREREQ += host-mpc endif +GCC_HOST_PREREQ = host-flex host-bison + ifeq ($(BR2_GCC_SHARED_LIBGCC),y) GCC_SHARED_LIBGCC:=--enable-shared else @@ -294,16 +296,16 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched $(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured $(Q)$(call MESSAGE,"Building gcc pass-1") ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc + $(GCC_CONF_ENV) $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc else - $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc + $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc endif touch $@ gcc_initial=$(GCC_BUILD_DIR1)/.installed $(gcc_initial) $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc: $(GCC_BUILD_DIR1)/.compiled $(Q)$(call MESSAGE,"Installing gcc pass-1") - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc + $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) install-gcc touch $(gcc_initial) gcc_initial: $(GCC_HOST_PREREQ) host-binutils $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc @@ -365,9 +367,9 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured $(Q)$(call MESSAGE,"Building gcc pass-2") # gcc >= 4.3.0 have to also build all-target-libgcc ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc all-target-libgcc + $(GCC_CONF_ENV) $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc all-target-libgcc else - $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc + $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all-gcc endif touch $@ @@ -376,9 +378,9 @@ $(gcc_intermediate): $(GCC_BUILD_DIR2)/.compiled $(Q)$(call MESSAGE,"Installing gcc pass-2") # gcc >= 4.3.0 have to also install install-target-libgcc ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc install-target-libgcc + $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc install-target-libgcc else - PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc + $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) install-gcc endif touch $(gcc_intermediate) @@ -444,12 +446,12 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ) $(GCC_BUILD_DIR3)/.compiled: $(GCC_BUILD_DIR3)/.configured $(Q)$(call MESSAGE,"Building gcc final") - $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR3) all + $(GCC_CONF_ENV) $(HOST_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR3) all touch $@ $(GCC_BUILD_DIR3)/.installed: $(GCC_BUILD_DIR3)/.compiled $(Q)$(call MESSAGE,"Installing gcc final") - PATH=$(TARGET_PATH) $(MAKE) \ + $(HOST_MAKE_ENV) $(MAKE) \ -C $(GCC_BUILD_DIR3) install if [ -d "$(STAGING_DIR)/lib64" ]; then \ if [ ! -e "$(STAGING_DIR)/lib" ]; then \ @@ -577,8 +579,8 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared $(GCC_BUILD_DIR4)/.compiled: $(GCC_BUILD_DIR4)/.configured $(Q)$(call MESSAGE,"Building gcc on target") - PATH=$(TARGET_PATH) \ - $(MAKE) -C $(GCC_BUILD_DIR4) all + $(TARGET_MAKE_ENV) \ + $(TARGET_MAKE_ENV) $(MAKE) -C $(GCC_BUILD_DIR4) all touch $@ GCC_LIB_SUBDIR=lib/gcc/$(GNU_TARGET_NAME)/$(GCC_VERSION) @@ -590,7 +592,7 @@ endif $(TARGET_DIR)/usr/bin/gcc: $(GCC_BUILD_DIR4)/.compiled $(Q)$(call MESSAGE,"Installing gcc on target") - PATH=$(TARGET_PATH) DESTDIR=$(TARGET_DIR) \ + $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) \ $(MAKE1) -C $(GCC_BUILD_DIR4) install # Remove broken specs file (cross compile flag is set). rm -f $(TARGET_DIR)/usr/$(GCC_LIB_SUBDIR)/specs