From 96e022f7f3a9448f590adc88e5c24db790ee6fec Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Thu, 16 Mar 2006 15:16:23 +0000 Subject: Allow bsd.lib.mk to generate the symbol version map. --- lib/libc/Makefile | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index 96730fe0deac..bfbfc33e1121 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -18,8 +18,6 @@ CFLAGS+=-I${.CURDIR}/${MACHINE_ARCH} CLEANFILES+=tags INSTALL_PIC_ARCHIVE= PRECIOUSLIB= -VERSION_DEF=Versions.def -VERSION_MAP=Version.map # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: @@ -68,6 +66,12 @@ CFLAGS+= -DHESIOD CFLAGS+= -DNO_FLOATING_POINT .endif +.if defined(SYMVER_ENABLED) +VERSION_DEF=${.CURDIR}/Versions.def +SYMBOL_MAPS=${SYM_MAPS} +CFLAGS+= -DSYMBOL_VERSIONING +.endif + # If there are no machine dependent sources, append all the # machine-independent sources: .if empty(MDSRCS) @@ -98,20 +102,8 @@ libkern.${MACHINE_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${MACHINE_ARCH} .endif - -${VERSION_MAP}: ${SYM_MAPS} - awk -v vfile=${.CURDIR}/Versions.def -f ${.CURDIR}/version_gen.awk \ - ${SYM_MAPS} > ${.TARGET} - .include # Disable warnings in contributed sources. CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/} - -.if defined(SYMVER_ENABLED) -CFLAGS+= -DSYMBOL_VERSIONING -LDFLAGS= -Wl,--version-script=${.OBJDIR}/${VERSION_MAP} - -${SHLIB_NAME}: ${VERSION_MAP} -.endif -- cgit v1.2.3