Skip to contentSkip to conversation

Undefined results when building highbank board

U-Boot Wolfgang Denk 2 participants 3 messages Apr 26, 2012

lore
Share & tools
lore
#0 lore raw

Dear Rob,

arch/arm/cpu/armv7/highbank/config.mk contains this setting:

	PLATFORM_CPPFLAGS += -march=armv7-a

This results in code bueing built with the follwoing compiler options:

        ... -march=armv5 -march=armv7-a ...

This is a bad idea - dependign on tool chain used, this may result in compiler errors ("error: bad value (armv7-a) for -march= switch"), or undefined behaviour, as it is not clear which option is used by the compiler.

Can you please provide a fix? Thanks!

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The philosophy exam was a piece of cake  -  which  was  a  bit  of  a
surprise, actually, because I was expecting some questions on a sheet
of paper.
#1 lore raw
Quoted 8 lines · Wolfgang Denk

Dear Rob,

arch/arm/cpu/armv7/highbank/config.mk contains this setting:

	PLATFORM_CPPFLAGS += -march=armv7-a

This results in code bueing built with the follwoing compiler options:

Quoted 8 lines
        ... -march=armv5 -march=armv7-a ...

This is a bad idea - dependign on tool chain used, this may result in compiler errors ("error: bad value (armv7-a) for -march= switch"), or undefined behaviour, as it is not clear which option is used by the compiler.

Can you please provide a fix? Thanks!

The issue is I require a wfi assembly instruction for reset, so I would have to hard code the machine code to work on all compilers.

Rob

Quoted 5 lines

Best regards,

Wolfgang Denk

#2 lore raw

Dear Rob Herring,

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 2 lines

Can you please provide a fix? Thanks!

The issue is I require a wfi assembly instruction for reset, so I would have to hard code the machine code to work on all compilers.

If it's only for this single instruction that thi sseems to be not so bad an option.

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Computers are not intelligent.  They only think they are.