[build] How can I change how the linker is called?

This is for my PowerPC Tiger Mac system. I've installed GCC 4.7 fromMacPorts on it. I have it set in C++11 mode.
Yesterday, I wrote on the list that I couldn't get the example file torun in my new trial project. (It's athttps://github.com/CTMacUser/Unionize.) As soon as I added acompile-fail test and the corresponding line to Jamfile, everything worked!
Sort of. The compile-fail test fails as expected (at compile-time).The example file still doesn't run due to a linking error I've seen before:
//========================================[daryle@daryle-walkers-emac:test]$ b2 toolset=gcc-4.7...found 30 targets......updating 14 targets...common.mkdir bincommon.mkdir bin/super_union_basics.testcommon.mkdir bin/super_union_basics.test/gcc-4.7common.mkdir bin/super_union_basics.test/gcc-4.7/debuggcc.compile.c++ bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.ogcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basicsld: unknown option: --start-groupcollect2: error: ld returned 1 exit status
"g++-mp-4.7" -o "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics" -Wl,--start-group "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
...failed gcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basics......skipped

AMDG On 05/08/2012 06:52 PM, Daryle Walker wrote:
This is for my PowerPC Tiger Mac system. I've installed GCC 4.7 fromMacPorts on it. I have it set in C++11 mode. Yesterday, I wrote on the list that I couldn't get the example file torun in my new trial project. (It's athttps://github.com/CTMacUser/Unionize.) As soon as I added acompile-fail test and the corresponding line to Jamfile, everything worked! Sort of. The compile-fail test fails as expected (at compile-time).The example file still doesn't run due to a linking error I've seen before: //========================================[daryle@daryle-walkers-emac:test]$ b2 toolset=gcc-4.7...found 30 targets......updating 14 targets...common.mkdir bincommon.mkdir bin/super_union_basics.testcommon.mkdir bin/super_union_basics.test/gcc-4.7common.mkdir bin/super_union_basics.test/gcc-4.7/debuggcc.compile.c++ bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.ogcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basicsld: unknown option: --start-groupcollect2: error: ld returned 1 exit status "g++-mp-4.7" -o "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics" -Wl,--start-group "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
...failed gcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basics......skipped
super_union_basics.run for lack of super_union_basics...common.mkdir bin/super_union_fail_test.testcommon.mkdir bin/super_union_fail_test.test/gcc-4.7common.mkdir bin/super_union_fail_test.test/gcc-4.7/debuggcc.compile.c++ bin/super_union_fail_test.test/gcc-4.7/debug/super_union_fail_test.oIn file included from super_union_fail_test.cpp:9:0://======================================== Now "ld" points to a version of ld64 from MacPorts, but that error hasshown up before this. I don't think my versions of "ld" have"--start-group" or "--end-group" options. What should they be instead,and where do I make these changes? (Even if no one here can answer thefirst part, they should be able to answer the second. That's where I'llmake the changes if I have to ask about the first part elsewhere.) Oh, I've uploaded the version of the project used here. Its SHA ID is"535241c3f13a9488bd845549ce3b1cf661ffcbac". (It's the latest as of this writing.)
Try using gcc : 4.7 : /command/ : <linker-type>darwin ; In Christ, Steven Watanabe

Date: Tue, 8 May 2012 20:29:53 -0700 From: Steven Watanabe
Try
using gcc : 4.7 : /command/ : <linker-type>darwin ;
It worked. In fact, I think I've had posted this same problem before, and the solution wassimilar. (But it was to call the toolset "darwin" instead of "gcc". This probablydoes the same thing.) Thanks. (Sorry for wasting everyone's time.) Daryle W.
participants (2)
-
Daryle Walker
-
Steven Watanabe