Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Dec 2025 12:17:53 +0000
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Ayrton Munoz <a.munoz3327@gmail.com>
Subject:   git: 9ea1aadfdb30 - stable/14 - cross-build: Avoid adding <sys/cdefs.h> to SYSINCS
Message-ID:  <69527171.3094f.2fa31aa3@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=9ea1aadfdb306d95e79854ca569aefc7cf993fcb

commit 9ea1aadfdb306d95e79854ca569aefc7cf993fcb
Author:     Ayrton Munoz <a.munoz3327@gmail.com>
AuthorDate: 2025-12-29 02:02:28 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2025-12-29 12:16:27 +0000

    cross-build: Avoid adding <sys/cdefs.h> to SYSINCS
    
    Summary:
    The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so
    cross-building broke when the former was added to SYSINCS in 1c9ff80f06. This
    commit adds a guard around that to only do that when building on FreeBSD. This
    should fix github CI.
    
    Test Plan:
    Ran buildkernel using tools/build/make.py on linux in github CI and
    locally on FreeBSD to double check nothing broke.
    
    Reviewed by:    dim
    MFC after:      3 days
    Differential Revision: https://reviews.freebsd.org/D54385
    
    (cherry picked from commit b6672803a1cf10dd1c912fe6571a8d426b8868bd)
---
 tools/build/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 75b05a4e5b9c..66ac2a4f381c 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -273,9 +273,11 @@ MSDOSFSINCS+=	${SRCTOP}/sys/fs/msdosfs/fat.h
 MSDOSFSINCS+=	${SRCTOP}/sys/fs/msdosfs/msdosfsmount.h
 DISKINCS+=	${SRCTOP}/sys/sys/disk/bsd.h
 
+.if ${.MAKE.OS} == "FreeBSD"
 # Needed to build most of the things below, which include sys/cdefs.h either
 # directly or transitively
 SYSINCS+=	${SRCTOP}/sys/sys/cdefs.h
+.endif
 
 # Needed to build config (since it uses libnv)
 SYSINCS+=	${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h \


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69527171.3094f.2fa31aa3>