Date: Thu, 26 Sep 2019 09:41:10 -0700 From: Steve Kargl <sgk@troutmask.apl.washington.edu> To: Willem Jan Withagen <wjw@digiware.nl> Cc: "ports@freebsd.org" <ports@freebsd.org> Subject: Re: Using a different linker in a CMake project Message-ID: <20190926164110.GA29673@troutmask.apl.washington.edu> In-Reply-To: <9e4e72ba-f08a-667d-076a-f4d20614b41f@digiware.nl> References: <9e4e72ba-f08a-667d-076a-f4d20614b41f@digiware.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 26, 2019 at 06:18:17PM +0200, Willem Jan Withagen wrote: > > For building ceph14 in I need to use ld from the ports binutils. > Mainly because of versioning that I can not get to work with the llvm > linker, and is a know difference between GNU ld en LLVM ld. > > Just building in the project I was able to do that with: > -D CMAKE_CXX_FLAGS_DEBUG=" -fuse-ld=/usr/local/bin/ld > -Wno-unused-command-line-argument" > > So I'm trying to pass that also in the ports Makefile as a CMAKE_ARGS. > But nothing thusfar I've tried does actually work. and gets the option > on the commandline. > > So is there a way to get this to work. > It is sort of tricky since CMAKE output uses cc of c++ to do linking. > > A brute force hack would be to > rm /usr/bin/ld > ln -s /usr/local/bin/ld /usr/bin/ld > But I sure that that would not make it in the porst tree. > % cat Makefile PATH = /usr/bin:/bin .unexport-env .export PATH all: @echo ${PATH} which ld % which ld /usr/local/bin/ld % make /usr/bin:/bin which ld /usr/bin/ld HTH -- Steve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190926164110.GA29673>