Tiny Core Linux
Tiny Core Base => Raspberry Pi => Topic started by: Akane on May 19, 2014, 06:30:39 AM
-
Hi there.
There is no recommendation of compile flags for rpi extensions on tinycore wiki.
(http://wiki.tinycorelinux.net/wiki:creating_extensions (http://wiki.tinycorelinux.net/wiki:creating_extensions))
So we should decide them.
I think the best flags are below:
CFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard -Os -pipe"
CXXFLAGS="-march=armv6 -mfpu=vfp -mfloat-abi=hard -fno-exceptions -fno-rtti -Os -pipe"
How do you think about them?
If it were OK, I would edit the wiki page.
Regards,
Akane.
-
You can omit
-march=armv6 -mfpu=vfp -mfloat-abi=hard
as these are the default settings of the tool-chain. Choose the proper -O settings for the application you are building. -Os can be good in general, but use -O2 when speed is critical like codecs, fft and math libraries, etc.
-
Hi bmarkus.
Thanks for your reply.
Now I see that the flags can be omitted.
But as for optimization flag, since tinycore is designed as "Tiny Linux",
we should usually use "-Os" flag.
Based on these, I will edit the wiki page.
Thanks,
Akane.
-
Maybe someone can post the flags for compiling for the RPi2 here, too?! Does only armv6 change to armv7 or are there other optimisations recommended?
I know this thread is over a year old, but it's linked in the Wiki article about creating extensions and it would be nice to keep it up to date for new users - like me ;D
Thanks and cheers, JJ
-
In most cases there are no benefits to build for armv7 and you risk it will not run on armv6. Except few minor cases like intensive use of neon, build it for armv6. Options used currently to build extensions:
-O2 -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp
-
Ok, thanks for the reply.
The mfpu=vfp argument leads to an error with gcc in the .configure script for bluez5 compiling. Without that, it works fine. I hope leaving that out is no big deal.
But if it is, i don't know if this is the right place to discuss...
Cheers, JJ
-
Hi JJF
According to bmarkus in reply #1 of this thread:
You can omit
-march=armv6 -mfpu=vfp -mfloat-abi=hard
-
Ok that seems to work, thanks! ... Now it's time to build my first TC extension. :)