Subject: more on the issue of using the wrong ld in the .wrapper/bin/ld
To: None <jlam@netbsd.org, tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 03/02/2005 21:29:08
Hi everyone,
some of you might recall my cry for help a few weks back regarding the use
of ${LOCALBASE}/bin/ld instead of /usr/bin/ld in .wrapper/bin/ld.
I have further looked into the problem, and I think it is due to the
following code in mk/wrapper/bsd.wrapper.mk:
*) save_IFS="$$IFS"; \
IFS=":"; \
for dir in $${PATH}; do \
case $${dir} in \
*${WRAPPER_DIR}*) \
;; \
*) \
if ${TEST} -f $${dir}/$$wrappee -o \
-h $${dir}/$$wrappee; then \
wrappee=$${dir}/$$wrappee; \
break; \
fi; \
;; \
esac; \
done; \
IFS="$$save_IFS"; \
if ${TEST} ! -x "$$wrappee"; then \
gen_wrapper=no; \
${ECHO_WRAPPER_MSG} "Warning: unable to create
${_wrappee_} wrapper script: \`$$wrappee'"; \
fi; \
;; \
The problem is that ${LOCALBASE}/bin had automatically been prepended to
PATH (although it is not in my normalk shell path), so the scripts happily
finds ${LOCALBASE}/bin/ld and uses that one.
Is there a way to change this, or maybe to explicitly set which ld to use?
bmake show-vars VARNAMES=LD gives /usr/bin/ld, but the script building the
wrapper does not seem to care.
--
Georg Schwarz http://home.pages.de/~schwarz/
georg.schwarz@freenet.de +49 178 8545053