Bug 257149 - CFLAGS not passed to whole build
Summary: CFLAGS not passed to whole build
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.4-STABLE
Hardware: i386 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2021-07-13 01:31 UTC by Charles Lecklider
Modified: 2024-10-08 04:33 UTC (History)
1 user (show)

See Also:
koobs: maintainer-feedback? (bdrewery)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Lecklider 2021-07-13 01:31:19 UTC
Applies to >=11.4-RELEASE (since the change to default i686):

I'm using -march=pentium-mmx in a VM to build for my old dual Pentium MMX 233; so far so unremarkable.

The first problem is that everything in /usr/obj/tmp/legacy/ is built with default flags, not CFLAGS, so it's built for i686 (CMOV*). Obviously that doesn't work when trying to installworld over nfs. Looking at #250755 I changed the default to i586, did a full build and install twice, and the resulting build runs OK.

However, it's far from  perfect - /usr/local/sbin/pkg-static somehow still gets compiled with CMOV, building ports fails somewhere I've yet to track down - yes, the system boots and runs, but it's not actually usable.

Could CFLAGS, or at least -march=, be passed to *everything* please?

AFAICT it's impossible to compile for <i686 as things stand without treating it as a full cross-compile; FreeBSD has always been able to build itself on the system it's running on, but right now a running i586 system *cannot* do that.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2024-10-08 04:33:53 UTC
^Triage: clear unneeded flags.  Nothing has yet been committed to be merged.