From: Ulf Samuelsson Date: Sun, 01 Feb 2009 11:34:39 +0100 Subject: [Buildroot] Binary toolchain fails Message-ID: <1233484479.4147.149.camel@elrond.atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net I am testing the binary toolchain, with a toolchain built by another buildroot project. Several packages does not build correctly. "-lintl" and "-liconv are" not found. Examples are "e2fsprogs" and "libgpg-error" by doing ifeq ($(BR2_PACKAGE_LIBICONV),y) LIBGPG_ERROR_CONF_OPT += --with-libiconv-prefix=$(STAGING_DIR)/usr endif ifeq ($(BR2_PACKAGE_LIBINTL),y) LIBGPG_ERROR_CONF_OPT += --with-libintl-prefix=$(STAGING_DIR)/usr endif ... $(LIBGPG_ERROR_DIR)/.configured: $(LIBGPG_ERROR_DIR)/.source (cd $(LIBGPG_ERROR_DIR); rm -f config.cache; \ ... ./configure \ ... $(LIBGPG_ERROR_CONF_OPT) \ ... ) and adding CFLAGS to the make, (moved from configure) $(LIBGPG_ERROR_DIR)/.configured CFLAGS="$(TARGET_CFLAGS)" \ $(MAKE) CC=$(TARGET_CC) -C $(LIBGPG_ERROR_DIR) Both packages builds with this fix, but since it is systematic the change should probably be made elsewhere. (package/Makefile.in?) Any drawbacks with this change? At least one of the following is screwed up when you use an binary toolchain generated by buildroot. $(TARGET_CONFIGURE_OPTS) $(TARGET_CONFIGURE_ARGS) ?CFLAGS="$(TARGET_CFLAGS)" KERNEL HEADERS -------------- If you build just the toolchain to, lets say, /usr/local/arm/gcc-4.3.2, and use this directory as GCCROOT in your external toolchain, you have no kernel-headers. Should the kernel headers really be installed in toolchain_build_ARCH/linux? Why not in "$(STAGING_DIR)/usr/include/linux" ? If you are not building a toolchain from source, then the kernel-headers target is not available. I moved them out from the if BUILDROOT_TOOLCHAIN_SOURCE clause so they build for me, but I think that is the wrong solution and generating the headers in ?"$(STAGING_DIR)/usr/include/linux" is better. Comments? BR Ulf Samuelsson