| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: bsd.lib.mk,v 1.403 2024/05/06 08:43:37 mrg Exp $ | | 1 | # $NetBSD: bsd.lib.mk,v 1.404 2024/05/07 20:56:25 riastradh Exp $ |
2 | # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 | | 2 | # @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 |
3 | | | 3 | |
4 | .include <bsd.init.mk> | | 4 | .include <bsd.init.mk> |
5 | .include <bsd.shlib.mk> | | 5 | .include <bsd.shlib.mk> |
6 | .include <bsd.gcc.mk> | | 6 | .include <bsd.gcc.mk> |
7 | .include <bsd.sanitizer.mk> | | 7 | .include <bsd.sanitizer.mk> |
8 | | | 8 | |
9 | # Pull in <bsd.sys.mk> here so we can override its .c.o rule | | 9 | # Pull in <bsd.sys.mk> here so we can override its .c.o rule |
10 | .include <bsd.sys.mk> | | 10 | .include <bsd.sys.mk> |
11 | | | 11 | |
12 | LIBISMODULE?= no | | 12 | LIBISMODULE?= no |
13 | LIBISPRIVATE?= no | | 13 | LIBISPRIVATE?= no |
14 | LIBISCXX?= no | | 14 | LIBISCXX?= no |
| @@ -652,26 +652,28 @@ ${_LIB.so.full}: ${_MAINLIBDEPS} | | | @@ -652,26 +652,28 @@ ${_LIB.so.full}: ${_MAINLIBDEPS} |
652 | # above and creates the main link | | 652 | # above and creates the main link |
653 | .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \ | | 653 | .if defined(SHLIB_FULLVERSION) && defined(SHLIB_MAJOR) && \ |
654 | "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}" | | 654 | "${SHLIB_FULLVERSION}" != "${SHLIB_MAJOR}" |
655 | ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so.major}.tmp | | 655 | ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so.major}.tmp |
656 | ${MV} ${_LIB.so.major}.tmp ${_LIB.so.major} | | 656 | ${MV} ${_LIB.so.major}.tmp ${_LIB.so.major} |
657 | .endif | | 657 | .endif |
658 | ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so}.tmp | | 658 | ${HOST_LN} -sf ${_LIB.so.full} ${_LIB.so}.tmp |
659 | ${MV} ${_LIB.so}.tmp ${_LIB.so} | | 659 | ${MV} ${_LIB.so}.tmp ${_LIB.so} |
660 | | | 660 | |
661 | # If there's a file listing expected symbols, fail if the diff from it | | 661 | # If there's a file listing expected symbols, fail if the diff from it |
662 | # to the actual symbols is nonempty, and show the diff in that case. | | 662 | # to the actual symbols is nonempty, and show the diff in that case. |
663 | .if exists(${.CURDIR}/${LIB}.${MACHINE_ARCH}.expsym) | | 663 | .if exists(${.CURDIR}/${LIB}.${MACHINE_ARCH}.expsym) |
664 | LIB_EXPSYM?= ${LIB}.${MACHINE_ARCH}.expsym | | 664 | LIB_EXPSYM?= ${LIB}.${MACHINE_ARCH}.expsym |
| | | 665 | .elif exists(${.CURDIR}/${LIB}.${MACHINE_CPU}.expsym) |
| | | 666 | LIB_EXPSYM?= ${LIB}.${MACHINE_CPU}.expsym |
665 | .elif exists(${.CURDIR}/${LIB}.expsym) | | 667 | .elif exists(${.CURDIR}/${LIB}.expsym) |
666 | LIB_EXPSYM?= ${LIB}.expsym | | 668 | LIB_EXPSYM?= ${LIB}.expsym |
667 | .endif | | 669 | .endif |
668 | | | 670 | |
669 | .if !empty(LIB_EXPSYM) && ${MKPIC} != "no" | | 671 | .if !empty(LIB_EXPSYM) && ${MKPIC} != "no" |
670 | realall: ${_LIB.so.full}.diffsym | | 672 | realall: ${_LIB.so.full}.diffsym |
671 | ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} ${_LIB.so.full}.actsym | | 673 | ${_LIB.so.full}.diffsym: ${LIB_EXPSYM} ${_LIB.so.full}.actsym |
672 | ${_MKTARGET_CREATE} | | 674 | ${_MKTARGET_CREATE} |
673 | if diff -u ${.ALLSRC} >${.TARGET}.tmp; then \ | | 675 | if diff -u ${.ALLSRC} >${.TARGET}.tmp; then \ |
674 | ${MV} ${.TARGET}.tmp ${.TARGET}; \ | | 676 | ${MV} ${.TARGET}.tmp ${.TARGET}; \ |
675 | else \ | | 677 | else \ |
676 | ret=$$?; \ | | 678 | ret=$$?; \ |
677 | cat ${.TARGET}.tmp; \ | | 679 | cat ${.TARGET}.tmp; \ |