libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing Dynamic Linking Flags?


From: Bob Friesenhahn
Subject: Re: Passing Dynamic Linking Flags?
Date: Fri, 2 Nov 2012 14:38:13 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

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
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]