View Single Post
Old 09-27-2012, 08:11 PM   #708
knc1
Helpdesk Junkie
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 6,676
Karma: 5850002
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by Kai771 View Post
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, 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.
strace -fF YourHelloWorld application.
Let us see **when** it segfaults.

You can find a static built strace in the tools index.
knc1 is offline   Reply With Quote