Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2021 10:27:52 GMT
From:      Alex Richardson <arichardson@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 60fd443962d8 - stable/13 - Fix bootstrap tools build on macOS after 02af91c52e71e8a0f47251e637c9687f35d45dd9
Message-ID:  <202103171027.12HARq9M096175@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by arichardson:

URL: https://cgit.FreeBSD.org/src/commit/?id=60fd443962d8d1119b04269a77bc6d64b0900dcc

commit 60fd443962d8d1119b04269a77bc6d64b0900dcc
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-02-17 16:03:11 +0000
Commit:     Alex Richardson <arichardson@FreeBSD.org>
CommitDate: 2021-03-17 09:59:38 +0000

    Fix bootstrap tools build on macOS after 02af91c52e71e8a0f47251e637c9687f35d45dd9
    
    After changing the namespace.h header we need to provide _err on macOS, too.
    Previously we used the system libc err*/warn*, but that does not provide
    _err/_warn (which is used by other bootstrapped files from libc).
    To fix this problem bootstrap err.c on macOS as well.
    
    Fixes:          02af91c52 (Fix crossbuild bootstrap tools build with Clang 12)
    (cherry picked from commit 962a3814d4c838d21a67a4b704c64be843cb2b51)
---
 tools/build/Makefile | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tools/build/Makefile b/tools/build/Makefile
index 48e62e6561b7..effe8b9cb31d 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -158,6 +158,9 @@ INCS+=	 ${SRCTOP}/include/getopt.h
 # getcap.c is needed for cap_mkdb:
 .PATH: ${LIBC_SRCTOP}/gen
 SRCS+=	getcap.c
+# Glibc does not provide all err*/warn* functions, and for macOS we need the
+# alias with the extra underscore.
+SRCS+=	err.c
 # Add various libbc functions that are not available in glibc:
 SRCS+=	stringlist.c setmode.c
 SRCS+=	strtonum.c merge.c heapsort.c reallocf.c
@@ -172,8 +175,8 @@ SRCS+=	strlcpy.c strlcat.c strmode.c
 SRCS+=	fgetln_fallback.c fgetwln_fallback.c closefrom.c
 CFLAGS.closefrom.c+=	-DSTDC_HEADERS -DHAVE_SYS_DIR_H -DHAVE_DIRENT_H \
 	-DHAVE_DIRFD -DHAVE_SYSCONF
-# Provide warnc/errc/getprogname/setprograme
-SRCS+=	err.c progname.c
+# Provide getprogname/setprograme
+SRCS+=	progname.c
 # Stub implementations of fflagstostr/strtofflags
 SRCS+=	fflags.c
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103171027.12HARq9M096175>