On Thu, 1 Nov 2012, Leek, Jim wrote:

I'm using libtool 2.4.2 on IBM's BG/Q platform with the xlC compiler.  In 
general it is working fairly well, but I
have one issue.  Unlike most Linux systems, on BG/Q static linking is the 
default, and in order to link an executable
dynamically you must pass the flags: -qnostaticlink -qnostaticlink=libgcc

So, the library builds both statically and dynamically just fine, but when I 
try to build the test binary, libtool
does not pass those two flags, so the binary build fails.  If I copy the build 
line and add the two flags, the binary
links dynamically.

How can I get libtool to pass those flags only when I want to build the binary 
dynamically?  So far I've only found
the place where I can put flags to make libtool build the binary statically.

I don't know anything about IBM's BG/Q platform, but under AIX I always use

  ./configure CXXFLAGS='-brtl 'LDFLAGS='-brtl'

in order for behavior to be more like Linux and Solaris.

You might obtain some joy from

  'LDFLAGS=-Wl,-qnostaticlink -Wl,-qnostaticlink=libgcc'

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool

Reply via email to