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)
Mar 22 2024, 5:17 PM
Unknown Object (File)
Mar 22 2024, 5:17 PM
Unknown Object (File)
Mar 22 2024, 5:17 PM
Unknown Object (File)
Mar 9 2024, 9:41 AM
Unknown Object (File)
Feb 24 2024, 10:10 AM
Unknown Object (File)
Dec 24 2023, 9:19 AM
Unknown Object (File)
Dec 24 2023, 9:16 AM
Unknown Object (File)
Dec 24 2023, 9:16 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.