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
Unknown Object (File)
Fri, Oct 4, 12:26 PM
Unknown Object (File)
Thu, Sep 12, 6:19 PM
Unknown Object (File)
Sep 6 2024, 3:12 AM
Unknown Object (File)
Aug 21 2024, 12:20 AM
Unknown Object (File)
Aug 20 2024, 11:59 PM
Unknown Object (File)
Aug 19 2024, 9:19 PM
Unknown Object (File)
Aug 14 2024, 1:18 PM
Unknown Object (File)
Aug 11 2024, 4:23 AM
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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It makes me nervous :)

Makefile.inc1
751–752 ↗(On Diff #44598)

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 ↗(On Diff #44598)

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.