[Buildroot] Unable to compile uboot v2012.10 on Buildroot 2016.05

Arnout Vandecappelle arnout at mind.be
Sat Jul 2 10:47:14 UTC 2016


On 01-07-16 17:28, Carlos Santos wrote:
>> From: "Thomas Petazzoni" <thomas.petazzoni at free-electrons.com>
>> To: "Carlos Santos" <casantos at datacom.ind.br>
>> Cc: "buildroot" <buildroot at buildroot.org>, "Julien Boibessot" <julien.boibessot at armadeus.com>
>> Sent: Friday, July 1, 2016 11:15:56 AM
>> Subject: Re: [Buildroot] Unable to compile uboot v2012.10 on Buildroot 2016.05
> 
>> Hello,
>>
>> On Fri, 1 Jul 2016 11:00:57 -0300 (BRT), Carlos Santos wrote:
>>
>>>> What is your host gcc version ? This failure smells like building an
>>>> old U-Boot, with gcc 5.x as the host gcc version.
>>>
>>> The problem happens on CentOS 7 (GCC 4.8.3) and Ubuntu 16.04 (GCC 5.3.1).
>>
>> I think the failure with GCC 5.3.x is normal, but I don't understand
>> why it would fail with gcc 4.8.
>>
>>>>>  UBOOT_MAKE_OPTS += \
>>>>>  	CROSS_COMPILE="$(TARGET_CROSS)" \
>>>>> -	ARCH=$(UBOOT_ARCH) \
>>>>> -	HOSTCFLAGS="$(HOST_CFLAGS)" \
>>>>> -	HOSTLDFLAGS="$(HOST_LDFLAGS)"
>>>>
>>>> I'm not sure to see why this would fix the problem you're reporting.
>>>
>>> It prevents overriding HOSTCFLAGS and HOSTLDFLAGS on targets that don't need
>>> OpenSSL, so older versions of U-Boot will compile successfully.
>>
>> Yes, but I don't understand why not setting HOSTCFLAGS/HOSTLDFLAGS
>> fixes the build issue you mentioned.
>>
> 
> Without setting HOSTCFLAGS/HOSTLDFLAGS the command line is this
> 
> gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /work/bcm95615x/build/uboot-2012.10/include -idirafter /work/bcm95615x/build/uboot-2012.10/include2 -idirafter /work/bcm95615x/build/uboot-2012.10/include -I /work/bcm95615x/build/uboot-2012.10/lib/libfdt -I /work/bcm95615x/build/uboot-2012.10/tools -DCONFIG_SYS_TEXT_BASE=0x80800000 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -pedantic   -o img2srec.o img2srec.c -c
> 
> Setting HOSTCFLAGS/HOSTLDFLAGS the command line becomes
> 
> gcc -O2 -I/work/bcm95615x/host/usr/include   -o img2srec.o img2srec.c -c
> 
> Because the value of HOSTCFLAGS set in U-Boot's config.mk is overwritten. 

 How about leaving HOSTCFLAGS alone, and instead setting
HOSTCC="$(HOSTCC) $(HOST_CFLAGS)". HOSTLDFLAGS can probably be overridden.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list