Subject: Re: [Boost-build] Building Boost on OSX
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2013-08-20 18:52:48
On Aug 20, 2013, at 1:30 PM, Bioxydyn Dev <bioxydyn.dev_at_[hidden]> wrote:
> On Tue, Aug 20, 2013 at 8:05 PM, Marshall Clow <mclow.lists_at_[hidden]> wrote:
> On Aug 20, 2013, at 10:28 AM, Bioxydyn Dev <bioxydyn.dev_at_[hidden]> wrote:
>> But I suspect that you _are_ using Apple's linker (ld), and it does not understand -h.
>> Why do you suspect that Apple's linker is being invoked?
> Because it doesn't understand -h?
>> And why would it not invoke GCC's linker when I've specified the toolset=gcc?
> because they're both (helpfully) named "ld" ?
> and because if you just download and build gcc, I believe that you don't get a standalone linker.
> [ At least I didn't when building gcc 4.7.2 and 4.8 ]
> Please elaborate. Why would it not come with a linker? That doesn't make any sense?
I didn't say that.
I said it didn't come with a *standalone* linker.
if you do:
g++ junk.cpp -o junk
it will compile and link. (g++ knows how to link)
If you do:
g++ -c junk,cpp -o junk.o
ld junk.o -o junk
the first command will produce an object file (junk.o)
and the second will produce an executable (using ld).
b2 issues separate compile and link commands (like the second example)
> How can I check which one it's using.
ld -v is a good place to start.
$ ld -v
configured to support archs: armv6 armv7 armv7s i386 x86_64
LTO support using: LLVM version 3.2svn, from Apple Clang 4.2 (build 425.0.28)
You can also look at the output from running b2 - it should print the commands that it uses.
b2 -n will print the commands w/o executing them.
> I also stumbled across your C++ musings and Xcode stuff. Very helpful.
> From what I've managed to ascertain it looks like if I want to develop for OS X then I should install the latest version of Xcode. Would you agree?
Yes. Note that there's a "command-line tools" package inside of Xcode that you'll want to install (look in preferences).
It's much easier than fussing with gcc - even if you are using MacPorts, etc.
Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>
A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
-- Yu Suzuki
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk