Module Name:    src
Committed By:   riastradh
Date:           Wed May  8 20:38:55 UTC 2024

Modified Files:
        src/share/mk: bsd.lib.mk

Log Message:
bsd.lib.mk: Use LIBC_MACHINE_ARCH/CPU if set for expected symbols.

Otherwise, we get the wrong list of symbols for compat library
builds, where MACHINE_ARCH/CPU is different from
LIBC_MACHINE_ARCH/CPU, e.g. building compat 32-bit sparc libm on
sparc64.

XXX This is kinda kludgey -- `libc' seems wrong here.


To generate a diff of this commit:
cvs rdiff -u -r1.404 -r1.405 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.404 src/share/mk/bsd.lib.mk:1.405
--- src/share/mk/bsd.lib.mk:1.404	Tue May  7 20:56:25 2024
+++ src/share/mk/bsd.lib.mk	Wed May  8 20:38:55 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.404 2024/05/07 20:56:25 riastradh Exp $
+#	$NetBSD: bsd.lib.mk,v 1.405 2024/05/08 20:38:55 riastradh Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -660,10 +660,10 @@ ${_LIB.so.full}: ${_MAINLIBDEPS}
 
 # If there's a file listing expected symbols, fail if the diff from it
 # to the actual symbols is nonempty, and show the diff in that case.
-.if exists(${.CURDIR}/${LIB}.${MACHINE_ARCH}.expsym)
-LIB_EXPSYM?=	${LIB}.${MACHINE_ARCH}.expsym
-.elif exists(${.CURDIR}/${LIB}.${MACHINE_CPU}.expsym)
-LIB_EXPSYM?=	${LIB}.${MACHINE_CPU}.expsym
+.if exists(${.CURDIR}/${LIB}.${LIBC_MACHINE_ARCH:U${MACHINE_ARCH}}.expsym)
+LIB_EXPSYM?=	${LIB}.${LIBC_MACHINE_ARCH:U${MACHINE_ARCH}}.expsym
+.elif exists(${.CURDIR}/${LIB}.${LIBC_MACHINE_CPU:U${MACHINE_CPU}}.expsym)
+LIB_EXPSYM?=	${LIB}.${LIBC_MACHINE_CPU:U${MACHINE_CPU}}.expsym
 .elif exists(${.CURDIR}/${LIB}.expsym)
 LIB_EXPSYM?=	${LIB}.expsym
 .endif

Reply via email to