libtool
[Top][All Lists]
Advanced

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

RE: LT 1.5: problem with Solaris Forte 64 bit shared C++ libraries


From: Howard Chu
Subject: RE: LT 1.5: problem with Solaris Forte 64 bit shared C++ libraries
Date: Sat, 3 May 2003 14:06:47 -0700

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of Jeff
> Squyres

> On Sat, 3 May 2003, Bob Friesenhahn wrote:
>
> > > True.  But will libtool pass these flags through?  I'm ok telling
> >
> > The intention is that libtool will pass these flags
> through.  Alas, I
> > have noticed that things can get complicated since
> Autoconf's configure
> > and libtool may not agree on how the flags are passed and what works
> > with libtool may fail entirely with configure.
>
> Invoking libtool manually with:
>
> -----
> shell% /bin/bash ./libtool --mode=link CC <FLAGS> -o
> liblibtool_test.la -rpath /usr/local/lib foo.lo bar.lo
> -----
>
> and substituting in various things for <FLAGS>, I can't seem to get
> anything passed down to the actual linker command line that works --
> libtool strips them all out.  Partial list of things that I've tried:
>
>   -xarch=v9
>   -z -xarch=v9
>   -64
>
> "-Wl,-xarch=v9" does get passed down, but CC doesn't
> recognize -Wl (-Wl is
> apparently an option for cc, not CC).
>
> Is there any other way to pass things down magically to libtool's
> invocation line?

This is such a frequent problem for me that I just automatically assume
libtool will do the wrong thing with options, and write a shell script
wrapper for cc instead. Tell libtool to invoke the shell script instead of
your normal compiler driver, and have the script specify whatever default
options you need.

When building on MinGW I always use an "mgcc" script:
        #! /bin/sh
        gcc -mno-cygwin $*

When building on OS/390:
        #! /bin/sh
        exec /bin/c89 -Wc,LANGLVL\(EXTENDED\),xplink,nocsect -Wl,xplink $*

As I mentioned in a previous post, the OS/390 compiler needs the "-Wc,"
prefix otherwise those options won't be recognized. When libtool doesn't just
strip the option outright, it always strips the prefix, which also breaks
things.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support





reply via email to

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