[Buildroot] Binary toolchain fails
Ulf Samuelsson
ulf.samuelsson at atmel.com
Sun Feb 1 11:50:31 UTC 2009
sön 2009-02-01 klockan 11:34 +0100 skrev Ulf Samuelsson:
> 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?
There are multiple changes needed for this to work.
Most compile switches are not set if you use a binary toolchain.
This includes sysroot.
You have a setting, BR2_TARGET_OPTIMIZATION, but this
seems to be ignored for two reasons,
1) TARGET_OPTIMIZATION is set in gcc-*.mk which is ignored
2) package/Makefile.in is again setting TARGET_OPTIMIZATION
I.E TARGET_OPTIMIZATION= instead of TARGET_OPTIMIZATION+=
Once that is fixed, sysroot is still not enabled
since the configuration variables for sysroot are disabled
when you use a binary toolchain.
BR2_TARGET_OPTIMIZATION="-Os -pipe --sysroot=$(STAGING_DIR)/ -isysroot
$(STAGING_DIR)"
Would let me build packages with problems.
Since there are so many changes needed to get binary toolchains
to work, I propose we simply disable them in the distribution
and fix the problem afterwards.
BR
Ulf Samuelsson
>
>
>
> BR
> Ulf Samuelsson
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
More information about the buildroot
mailing list