linux4sam / at91bootstrap

Second level bootloader for Microchip SoC (aka AT91)
https://www.linux4sam.org/linux4sam/bin/view/Linux4SAM/AT91Bootstrap4
114 stars 232 forks source link

Add -fno-pie to CPPFLAGS #89

Closed nikomauno closed 5 years ago

nikomauno commented 5 years ago

If gcc that is used to build at91bootstrap binary was configured with '--enable-default-pie' option, resulting at91bootstrap binary will compile on host but silently fail on target, so add '-fno-pie' option to at91bootstrap CPPFLAGS to avoid this issue.

Signed-off-by: Niko Mauno niko.mauno@vaisala.com

ehristev commented 5 years ago

Hi and thank you for the patch, Which toolchain are you using ?

nikomauno commented 5 years ago

Hi, I'm using toolchain that is generated off "thud" branch of Yocto framework (gcc 8.2.0 + binutils 2.31.1 + glibc 2.28)

ehristev commented 5 years ago

@nikomauno Is something changed in the Yocto "thud" that will configure GCC with "--enable-default-pie" ? Or why it does not work with this version of GCC ? I can confirm Yocto "sumo" works fine with GCC 7.3.1

ehristev commented 5 years ago

https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=thud&id=491082c56ce34f3fd644f8d4457ccd52af951087 I found this commit, I believe this one enables it. You find this correct ?

nikomauno commented 5 years ago

Yes, that would seem to be the one to me as well

ehristev commented 5 years ago

I will run autobuilders and some tests and get back to you. Thanks again, Eugen