Page MenuHomeFreeBSD

Set endianness and floating point flags explicitly for MIPS targets
ClosedPublic

Authored by kan on Nov 13 2016, 3:17 AM.
Tags
None
Referenced Files
F83304347: D8505.id.diff
Wed, May 8, 3:59 PM
F83300983: D8505.diff
Wed, May 8, 2:56 PM
Unknown Object (File)
Apr 5 2024, 9:19 AM
Unknown Object (File)
Apr 5 2024, 9:08 AM
Unknown Object (File)
Jan 26 2024, 12:56 PM
Unknown Object (File)
Jan 9 2024, 3:48 AM
Unknown Object (File)
Dec 23 2023, 2:03 PM
Unknown Object (File)
Dec 20 2023, 7:20 AM

Details

Reviewers
sgalabov
adrian
br
Summary

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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 5937

Event Timeline

kan retitled this revision from to Set endianness and floating point flags explicitly for MIPS targets.
kan updated this object.
kan edited the test plan for this revision. (Show Details)
kan added reviewers: adrian, br, sgalabov.
kan set the repository for this revision to rS FreeBSD src repository - subversion.

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.

br edited edge metadata.
This revision is now accepted and ready to land.Nov 13 2016, 11:04 AM
In D8505#176873, @imp wrote:

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"

adrian edited edge metadata.

Seemed to work!