Page MenuHomeFreeBSD

Fix two more issues with r465416.

Authored by jhb on Apr 1 2018, 5:58 PM.
Referenced Files
F52817693: D14925.diff
Fri, Dec 9, 9:16 AM
Unknown Object (File)
Mon, Nov 28, 6:42 PM


  • Force build of a cross-compiler by defining CROSS_DIRECTORY_STRUCTURE in CFLAGS even if the build host matches the build target. This fixes such a cross compiler to not include /usr/local/lib in its default library path (e.g. amd64-gcc when built on amd64).
  • Don't remove the include-fixed headers for the aarch64-none-elf-gcc and arm-none-eabi-gcc packages.
Test Plan
  • make buildworld CROSS_TOOLCHAIN=amd64-gcc with changes to only use -sysroot for GCC.
  • make buildworld CROSS_TOOLCHAIN=mips-gcc TARGET_ARCH=mips64 with same changes
  • build of arm-none-eabi-newlib package (kevans@ reported this was failing after r465416)

Diff Detail

rP FreeBSD ports repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

Looks good from a newlib perspective. Thanks!

This revision is now accepted and ready to land.Apr 1 2018, 6:30 PM
bdrewery added inline comments.
101 ↗(On Diff #40964)

This is pretty obscure. Is there a more clear variable unique to the proper ports?

101 ↗(On Diff #40964)

It is the same thing used in devel/binutils currently. :-/ Earlier in this Makefile we use '!empty(GCC_TARGET)' but then we set GCC_TARGET so it is always set by this point. I could set a helper variable in the earlier test when GCC_TARGET is already set (or perhaps use something like '.if ${GCC_TARGET:Mfreebsd} != ""'). I'm not sure any of those are less obscure.

I'm going to commit the current patch for now to unbreak the non-xtoolchain gcc ports, but I'm happy to refine the condition later if there is a better one to use.

This revision was automatically updated to reflect the committed changes.