libtool-patches
[Top][All Lists]
Advanced

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

RE: linking a shared library with -pthread omits -pthread on the link l


From: Howard Chu
Subject: RE: linking a shared library with -pthread omits -pthread on the link line.
Date: Sat, 14 Dec 2002 04:40:24 -0800

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden Behalf Of
Max Bowsher

> Bob Friesenhahn <address@hidden> wrote:

> > CVS libtool already passes through any GCC -mfoo options to the
> > link step when the compiler is invoked to do the linking.
>
> This seems like a good time to mention a bug I've been experiencing.
>
> I'm trying to use CC="gcc -mno-cygwin" CXX="gcc -mno-cygwin",
> obviously
> expecting that the -mno-cygwin is appended to *every*
> invocation of gcc.
> Now, this works for CXX (The variable CC in the tagged config
> CXX gets the
> value from the environment. In addition, LTCC gets the value
> of CC from the
> environment in every tag. *But* CC in the untagged C config drops
> the -mno-cygwin.
>
> I kludged it by doing this to libtool.m4:
> @@ -2295,6 +2296,9 @@
>
>  _LT_AC_SYS_COMPILER
>
> +# Allow CC to be a program name with arguments.
> +_LT_AC_TAGVAR(compiler, $1)="$CC"
> +
>  #
>  # Check for any special shared library compilation flags.
>  #
>
> But that was more by random guess than a through understanding of the
> implications of my change.

This is also something we reported 2 or 3 years ago and finally gave up on.
We went with suggesting that people just create a wrapper shell script for
gcc that carries the correct options:

http://www.openldap.org/faq/data/cache/301.html

At the bottom of the page...
( mgcc:
        #! /bin/sh
        gcc -mno-cygwin $*
)

  -- 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]