View Single Post
Halftux's Avatar
Posts: 862 | Thanked: 2,511 times | Joined on Feb 2012 @ Germany
#13
Originally Posted by nonsuch View Post
It seems gcc4.2 is not in my reopos, only gcc.4.2-base, which is a completely empty dummy package that doesn't depend on anything either...
There's no actual gcc-4.2 package.
There is gcc-4.6 however.
There are to methods to compile something for the N900.

1. compiling in cross environment
2. compiling on device

When you use the offical cross environment you don't need to set these cflags and have gcc installed. When you are able to build your own cross environment, then probably I can' teach you anything new, but then take care of these cflags.
If you have lots of floating point operation you could change mfp to neon for example. So the normal vfp is in armv7 VFPv3 which can be implemented with either 32 or 16 doubleword registers. Support for these flags depend on the compiler different compiler, different flags, different support, different bugs. Before armv8 for neon is the IEEE 754 standard not fully implemented. Therefore for example when you use gcc4.6 you also need to specify -funsafe-math-optimizations to activate neon. But the most important bit is to use -mfloat-abi=softfp, because all binaries from N900 are compiled with that and you can't mix different modes of hard or soft fp binaries.

When you want to compile on device I would suggest not doing it on a daily driver. So there is a sdk repository you could add. But this is somehow dangerous because it can fill up your root.

Thats why a chroot environment on the device itself is much more safer. It is also easier to try something and when it is not working or the build environment is broken, you could easily delete it and take an old backup from it to start again or have different chroot on device for "quick" testing different gcc's or other libraries.

I don't have so much experience for on device development and still need something to figure out.
Because the method which is known and which I also use, is to take the rootfs from the sdk, but I think the rootfs is made for qemu emulation and it could be that there is a difference compared to real device.

Hence for python 3.5.9 compiling in qemu scratchbox I don't get the assembler messages but on the device I get them.

gcc-4.6 is somehow special, in my opinion you can't use this gcc4.6 package from extras in scratchbox. For on device development it should be possible, but I would try first gcc-4.2.

So if somebody has a perfect setup for a chroot, it would be nice to share it.

Last edited by Halftux; 2020-02-20 at 15:42.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post: