Page MenuHomeFreeBSD

Remove the various build flag hacks for GCC cross-compile.
ClosedPublic

Authored by jhb on Jun 28 2018, 8:21 PM.
Tags
None
Referenced Files
F86825012: D16055.id44600.diff
Wed, Jun 26, 3:54 AM
Unknown Object (File)
Wed, Jun 19, 4:07 AM
Unknown Object (File)
Wed, Jun 19, 4:06 AM
Unknown Object (File)
Wed, Jun 19, 4:06 AM
Unknown Object (File)
Wed, Jun 19, 4:04 AM
Unknown Object (File)
Tue, Jun 18, 2:57 AM
Unknown Object (File)
Tue, Jun 11, 11:35 AM
Unknown Object (File)
Mar 22 2024, 5:17 PM
Subscribers

Details

Summary

The xtoolchain GCC packages have not required these flags since ports
commits r465416 and r466701. The in-tree GCC 4.2.1 has also been patched
in r335716 and r335717 to correctly honor --sysroot when looking for
includes and libraries.

Test Plan
  • make tinderbox passes
  • have built a FreeBSD/mips world+kernel with external GCC using this patch and booted it under QEMU.
  • FreeBSD/mips QEMU instance has been doing a native build with base/gcc as the compiler. It is not yet finished, but it's been able to compile at least part of a native world successfully (currently working on libarchive).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 17705
Build 17507: arc lint + arc unit

Event Timeline

It makes me nervous :)

Makefile.inc1
751–752

This .if is now empty. Though I could see leaving it since the pattern needed is funky. The problem is X_COMPILER_TYPE is set wrongly. I may fix that soon.

This revision is now accepted and ready to land.Jun 28 2018, 8:32 PM
Makefile.inc1
751–752

Yeah, exactly. I left it in place because IIRC when you build with external GCC, then WANT_COMPILER_TYPE can still be clang even though X_COMPILER_TYPE is gcc or some such. I think I ran into this before in Makefile.libcompat where you have to test for GCC first before clang for it to DTRT. Having some kind of reliable "WORLD_COMPILER" that was set to either "clang" or "gcc" (maybe XCOMPILER since it is supposed to describe what XCC is) would be easier to read I think, but I'm not sure how to implement that.

This revision was automatically updated to reflect the committed changes.