[Bug 257149] CFLAGS not passed to whole build

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 13 Jul 2021 01:31:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257149

            Bug ID: 257149
           Summary: CFLAGS not passed to whole build
           Product: Base System
           Version: 11.4-STABLE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: freebsd@charles.lecklider.org

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.