View Single Post
Old 09-27-2012, 04:54 PM   #706
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
Quote:
Originally Posted by NiLuJe View Post
@Kai771: Try with -mtune set, if it wasn't already done... It should be overriden by -march, but who knows...
Yeah, already tried... no go.

I took another look at Makefile, but couldn't find any more places where *FLAGS were not passed down.

I then went to Linaro site, and downloaded 2012.04 binaries (the last ones for gnueabi - the newer ones are all gnueabihf). I got the same results as with Ubunutu's Linaro. (Not really surprising... gcc -Q -v gave this:
Code:
GNU C (crosstool-NG linaro-1.13.1-2012.04-20120426 - Linaro GCC 2012.04) version 4.7.1 20120402 (prerelease) (arm-linux-gnueabi)
	compiled by GNU C version 4.1.3 20080704 (prerelease) (Ubuntu 4.1.2-27ubuntu1), GMP version 5.0.2, MPFR version 3.1.0, MPC version 0.9
Linaro 2012.04 needs -D_GNU_SOURCE (GLIBC_2.7 error without it). It has -mtls-dialect=gnu in it's COLLECT_GCC_OPTIONS - so that's not it either.

The settings I used are supposed to override any problematic defaults:

Code:
CFLAGS:=-O3 -fno-stack-protector -U_FORTIFY_SOURCE -D_GNU_SOURCE $(SYSROOT)
CXXFLAGS:=-O3 -fno-stack-protector -U_FORTIFY_SOURCE -fno-use-cxa-atexit $(SYSROOT)
ARM_CFLAGS:=-march=armv6j -mtune=arm1136jf-s -marm -mfloat-abi=softfp -mfpu=vfp
but it doesn't work - Segmentation fault.

Both Linaro 2012.04 and Ubuntu Linaro use -imultilib and -imultiarch, so they might be the problem. None of the other TCs I tried (and NiLuJe's version) use it.

In the end, I compiled hello.c with 2012.04 using
Code:
arm-linux-gnueabi-gcc -O3 -fno-stack-protector -U_FORTIFY_SOURCE -D_GNU_SOURCE -march=armv6j -mtune=arm1136jf-s -marm -mfloat-abi=softfp -mfpu=vfp hello.c -o hello
and tried running it on Kindle. Yeah, you guessed it - Segmentation fault.

I'm now of the opinion that Linaro/Ubuntu somehow compile their TC in a way that makes them incompatible with Kindle 3, and that switches won't fix it. (Disclaimer: Noob's opinion - possibly wrong). If someone can prove it wrong, I'd really like to hear it.

Last edited by Kai771; 09-28-2012 at 02:23 PM.
Kai771 is offline   Reply With Quote