Page MenuHomeFreeBSD

Always specify MIPS ABI flags.
AbandonedPublic

Authored by imp on Nov 14 2015, 9:26 PM.
Tags
None
Referenced Files
F81950294: D4155.id.diff
Tue, Apr 23, 3:57 PM
F81949750: D4155.diff
Tue, Apr 23, 3:44 PM
Unknown Object (File)
Sat, Apr 13, 1:29 AM
Unknown Object (File)
Wed, Apr 10, 2:06 AM
Unknown Object (File)
Mar 23 2024, 2:37 AM
Unknown Object (File)
Feb 23 2024, 6:57 PM
Unknown Object (File)
Feb 3 2024, 8:18 AM
Unknown Object (File)
Feb 3 2024, 3:10 AM

Details

Summary

Always over-specify mips. Makes life easier when the cross compiler
isn't configured quite correctly and outputs the wrong thing by
default. Introduce _ABI_CFLAGS to hold the over specification. Use
_ABI_CFLAGS in COPTFLAGS in the kernel build, and add those flags
to the various FOO_CFLAGS definitions.

XXX haven't made a pass through files to pick up the crazy, loony
XXX stuff that goes on there.

Test Plan

make TARGET_ARCH=mipsel CROSS_COMPILER_PREFIX=/usr/local/bin/mips64-portbld-freebsd11.0- XCC=/usr/local/bin/mips64-portbld-freebsd11.0-gcc CROSS_BINUTILS_PREFIX=mips64-freebsd- X_COMPILER_TYPE=gcc buildkernel KERNCONF=RT305X
make TARGET_ARCH=mipsel CROSS_COMPILER_PREFIX=/usr/local/bin/mips64-portbld-freebsd11.0- XCC=/usr/local/bin/mips64-portbld-freebsd11.0-gcc CROSS_BINUTILS_PREFIX=mips64-freebsd- X_COMPILER_TYPE=gcc buildworld

Note: the gcc 5.2.0 compiler that I'm testing with barfs with set but unused warnings everywhere. These
are fatal, so the buildworld doesn't complete.

The kernel fails at the moment because it uses floating point stores with the mips32 ISA, which apparently is undefined (or I'm misunderstanding the swc1 opcode warnings). This is swtch.S

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1211
Build 1215: arc lint + arc unit

Event Timeline

imp retitled this revision from to Always specify MIPS ABI flags.
imp updated this object.
imp edited the test plan for this revision. (Show Details)
imp added a reviewer: adrian.
share/mk/bsd.cpu.mk
124–125

This change is unrelated, but also something Adrian has been asking for.
It harmonizes the mips CPUTYPE with the rest of the system and gives
a list of helpful choices based on what we support or nearly support today.

imp retitled this revision from Always specify MIPS ABI flags to Always specify MIPS ABI flags. Harmonizes MIPS CPUTYPE processing.Nov 14 2015, 9:32 PM
imp edited the test plan for this revision. (Show Details)
ngie added a reviewer: ngie.
ngie added a subscriber: ngie.

LGTM!

This revision is now accepted and ready to land.Nov 15 2015, 4:41 AM
ngie requested changes to this revision.Nov 15 2015, 4:43 AM
ngie edited edge metadata.

Sorry. Missed a spot.

sys/conf/kern.pre.mk
165

This is a bit inconsistent with the other CFLAGS. In particular, DTRACE_CFLAGS does the same thing FBT_CFLAGS does, but only DTRACE_CFLAGS gets the COPTFLAGS treatment?

This revision now requires changes to proceed.Nov 15 2015, 4:43 AM
imp edited edge metadata.
imp edited the test plan for this revision. (Show Details)

Cleanup of repeated CFLAGS stuff ngie found the tip of.

Updating D4155: Always specify MIPS ABI flags.

Harmonizes MIPS CPUTYPE processing

ngie edited edge metadata.

A lot simpler. Like it a lot :).

This revision is now accepted and ready to land.Nov 15 2015, 6:18 PM
imp marked an inline comment as done.Nov 15 2015, 6:19 PM
imp added inline comments.
sys/conf/kern.pre.mk
165

You're right. I didn't notice the CDDL_CFLAGS there.

165

It's actually more insidious than that. See the updated change.

imp marked 3 inline comments as done.Nov 15 2015, 6:20 PM
imp added inline comments.
sys/conf/kern.pre.mk
165

You're right. I didn't notice the CDDL_CFLAGS there.

imp marked an inline comment as done.Nov 15 2015, 6:20 PM

Ticked off things I'd done.

imp edited edge metadata.

Regen after lifting one of the parts out of this patch
that's really just a bug fix.

Updating D4155: Always specify MIPS ABI flags.

Harmonizes MIPS CPUTYPE processing

This revision now requires review to proceed.Nov 16 2015, 10:46 PM
sys/conf/kern.pre.mk
165

Ignore the above comments: I've peeled out this sub-match and committed separately since it's just a bug fix.

bdrewery added a reviewer: bdrewery.
bdrewery added inline comments.
share/mk/bsd.cpu.mk
257–259

Seems redundant with line 17 and 18.

This revision now requires changes to proceed.Nov 16 2015, 11:04 PM
bdrewery edited edge metadata.

Nevermind, I see it's all an else branch.

It seems fine to me. I did not review the specifics of the flags for ABI/impact correctness.

This revision is now accepted and ready to land.Nov 16 2015, 11:06 PM

LGTM

share/mk/bsd.cpu.mk
337

ACFLAGS is for when cc is used as an assembler?

share/mk/bsd.cpu.mk
337

Yes. It is used to compile all .S files in the tree. We don't call the assembler directly in the tree (or shouldn't IMHO). If we don't add _ABI_CFLAGS to ACFLAGS, then we produce the default output, not the desired output.

This revision was automatically updated to reflect the committed changes.
imp retitled this revision from Always specify MIPS ABI flags. Harmonizes MIPS CPUTYPE processing to Always specify MIPS ABI flags..
imp edited edge metadata.
This revision is now accepted and ready to land.Nov 19 2015, 3:21 AM
imp edited edge metadata.

Split out the Harmonzing MIPS CPUTYPE processing bits
leaving just the ABI flags.

Updating D4155: Always specify MIPS ABI flags.

Harmonizes MIPS CPUTYPE processing

This revision now requires review to proceed.Nov 19 2015, 3:23 AM