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.
This commit is contained in:
imp 2006-08-25 23:50:05 +00:00
parent 6e3cd0c979
commit 67e2676521

View File

@ -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"