[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Another problem building gcc-4.4_4.4.4-6 related to the recent binutils 2.20.51.20100710-1 patch to set sysroot for cross builds



Hi Jim,

This bug is introduced by latest changes done by Linaro folks.

Previously, you were able to build regular tools, only by setting
WITH_SYSROOT=$some_path enviroment variable before the build, you
could build a sysroot binutils.

2010/7/21, Jim Heck <pinball.rules@gmail.com>:
> #-----------------------------------------------------------------
> # sysroot options
> ifdef WITH_SYSROOT
>    with_sysroot = $(WITH_SYSROOT)
> endif
> ifdef WITH_BUILD_SYSROOT
>    with_build_sysroot = $(WITH_BUILD_SYSROOT)
> endif
>
> ifneq ($(with_sysroot),)
>    CONFARGS += --with-sysroot=$(with_sysroot)
> endif
> ifneq ($(with_build_sysroot),)
>    CONFARGS += --with-build-sysroot=$(with_build_sysroot)
> endif
>
>
> became
>
> #-----------------------------------------------------------------
> # sysroot options
> ifdef WITH_SYSROOT
>    with_sysroot = $(WITH_SYSROOT)
> else
>    with_sysroot = /$(PF)/$(TARGET)
> endif

This looks very nasty, and I believe that *breaks native builds on runtime*.
I am not sure if this change is intented to do something different,
but if this is not the way to set SYSROOT defaults.

I suggest to revert changes and set WITH_SYSROOT and/or
WITH_BUILD_SYSROOT paths via enviroment variables when needed. If you
want to set sysroot defaults, you should do it in other way and split
native from cross.

> ifdef WITH_BUILD_SYSROOT
>    with_build_sysroot = $(WITH_BUILD_SYSROOT)
> endif
>
> CROSS_CONFARGS := $(ADDITIONAL_TARGETS) $(CONFARGS)
> ifneq ($(with_sysroot),)
>    CROSS_CONFARGS += --with-sysroot=$(with_sysroot)
> endif
> ifneq ($(with_build_sysroot),)
>    CROSS_CONFARGS += --with-build-sysroot=$(with_build_sysroot)
> endif

Thanks Jim,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."


Reply to: