The tree can be build with an external toolchain that will not
necessarily default to desired settings, so we have to specify
the required flags explicitly to force the required compilation
mode.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 5937
Event Timeline
I think this is a good idea.
share/mk/bsd.cpu.mk | ||
---|---|---|
306 | As an aside LLD will not require these -EL or -EB flags (they are accepted but ignored). |
I've had issues in the past trying to do this. There are some files in the kernel that don't actually work when you set these features, especially the compressed trampoline. I also think there's one in either csu or libc that has issues.
Best way to test this is to spike gcc to be the wrong endian by default and do a buildworld and buildkernel for one of the platforms that has a trampiline. If that works in addition to the external toolchain you're using, I'm game.
The way kernels handle this currently is by setting the ARCH_FLAGS in kernel config file:
sys/mips/conf/ERL:makeoptions ARCH_FLAGS="-march=octeon -mabi=64"
sys/mips/conf/GXEMUL:makeoptions ARCH_FLAGS="-march=mips64 -mabi=64"
sys/mips/conf/JZ4780:makeoptions ARCH_FLAGS="-EL -march=mips32r2"