From 67e26765217b0653374046a888c93bbb466f38f7 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 25 Aug 2006 23:50:05 +0000 Subject: [PATCH] Pass whatever the value of NM down to lorder. This allows one to override NM in Makefiles when, for example, cross compiling and have that value be used by lorder. NM normally isn't defined, so we pass a null value to lorder. lorder says 'NM=${NM-nm}' which causes it to pickup the default value. --- share/mk/bsd.lib.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 7b3671dbfc28..b28930fe7f80 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -149,7 +149,7 @@ _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static ${LIB} library @rm -f ${.TARGET} - @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} + @${AR} cq ${.TARGET} `env NM=${NM} lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD} ${RANLIB} ${.TARGET} .endif @@ -162,7 +162,7 @@ POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} lib${LIB}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} - @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD} + @${AR} cq ${.TARGET} `env NM=${NM} lorder ${POBJS} | tsort -q` ${ARADD} ${RANLIB} ${.TARGET} .endif @@ -182,7 +182,7 @@ ${SHLIB_NAME}: ${SOBJS} .endif @${CC} ${LDFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ - `lorder ${SOBJS} | tsort -q` ${LDADD} + `env NM=${NM} lorder ${SOBJS} | tsort -q` ${LDADD} .endif .if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no"