ld supports dwarf 2 only under FreeBSD 9.2

Luciano Mannucci luciano at vespaperitivo.it
Wed Aug 20 11:12:30 UTC 2014


On Wed, 20 Aug 2014 12:56:00 +0200
Eduardo Morras <emorrasg at yahoo.es> wrote:

> My makefile doesn't call ld, it's clang++34 who calls it.
> 
> I know I must upgrade my FreeBSD, but meanwhile, how can I force clang++34 to
> use /usr/local/bin/ld? I can't find how do it in clang++34 --help, clang34
> man or clang.llvm.org domentation.
You may wish to try something like this:

root at mordillod:~ # cat /usr/local/bin/switchld 
#!/bin/sh

DIST=/usr/bin/ld
ADIST=/usr/bin/ar
RDIST=/usr/bin/ranlib
MIST=/usr/bin/ld.dist
AMIST=/usr/bin/ar.dist
RMIST=/usr/bin/ranlib.dist

[ "$1" = "-t" ] && {
	[ -x "$DIST" ] && echo $DIST || echo Should be in  /usr/local/bin
	exit 0
}

[ -x "$DIST" ]  && mv "$DIST" "$MIST" || mv "$MIST" "$DIST"

[ -x "$ADIST" ]  && mv "$ADIST" "$AMIST" || mv "$AMIST" "$ADIST"

[ -x "$RDIST" ]  && mv "$RDIST" "$RMIST" || mv "$RMIST" "$RDIST"


exit 0

Cheers,

Luciano.
-- 
 /"\                         /Via A. Salaino, 7 - 20144 Milano (Italy)
 \ /  ASCII RIBBON CAMPAIGN / PHONE : +39 2 485781 FAX: +39 2 48578250
  X   AGAINST HTML MAIL    /  E-MAIL: posthamster at sublink.sublink.ORG
 / \  AND POSTINGS        /   WWW: http://www.lesassaie.IT/


More information about the freebsd-questions mailing list