Fix redundant usage of -mcpu and -march/-mtune
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 1 patch 0 repliesNew
Patches in v1 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Buildroot] [PATCH 0/1] Fix redundant usage of -mcpu and -march/-mtune
Dear Karoly Kasza,
Thanks for your report!
Quoted 7 lines · Karoly Kasza
I've been using the Linaro external toolchain in the latest GIT to generate ARM code. I've found that when using this external compiler, Buildroot compulsorily specifies the -mcpu and -march switches to GCC, which is redundant (-march and -mtune can be concluded from -mcpu, see
http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html )
While most of the time this only generates a warning, mmc-utils can not be compiled this way and probably other packages suffer from this as well.
Which mmc-utils problem have you seen? I've just tried building the following configuration:
BR2_arm=y
BR2_cortex_a8=y
BR2_ARM_EABIHF=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_MMC_UTILS=y
And it just built fine, and uses a Linaro toolchain.
Quoted 2 lines
I recommend altering
toolchain/toolchain-external/toolchain-external.mk, so it won't supply redundant GCC switches.
The potential problem I see is that the code you're changing is used for *all* architectures, but the change you're making has only been made with ARM specificities in mind. Does ignoring -march and -mtune when -mcpu is defined also works for all other architectures?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com