libtool
[Top][All Lists]
Advanced

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

Re: $CC and intel icc/ecc compiler


From: Bob Friesenhahn
Subject: Re: $CC and intel icc/ecc compiler
Date: Wed, 9 Apr 2003 20:52:01 -0500 (CDT)

It seems to me that both the before and after code is incorrect.  The
reason why I say is is that $CC may contain the command plus some
arguments which are required for it to behave in some consistent way.

This means that the if $CC is 'foo -bar' then

case $CC in
  foo)

will not match, but

case $CC in
  foo*)

will.  Parsing out just the first word from the specification would
solve the problem.

You should not expect that the user won't add compiler options to the
base compiler name since this may be required to select a compiler
version, target architecture, or some other global option which is
best specified via the compiler specification.

Bob

On 9 Apr 2003, Samuel Meder wrote:

> On Wed, 2003-04-09 at 20:35, Bob Friesenhahn wrote:
> > On Wed, 9 Apr 2003, Charles Wilson wrote:
> >
> > > Only half paying attention, but doesn't this break an earlier patch that
> > > allowed things like "-mno-cygwin" to be included in the $CC variable?
> > > Or am I mis-remembering?
> >
> > Yes, it sounds like it does.  It also would break important things
> > like
> >
> >   CC="gcc -V 3.1.1"
> >
> > which I happen to be using at the moment.
>
> Please read the patch. It changes
>
>     linux*)
>       case $CC in
>       icc|ecc)
>       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
>         ;;
>       ccc)
>         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>         # All Alpha code is PIC.
>         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
>         ;;
>       esac
>       ;;
> to
>
>     linux*)
>       case `basename $CC` in
>       icc|ecc)
>       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
>       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
>         ;;
>       ccc)
>         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
>         # All Alpha code is PIC.
>         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
>         ;;
>       esac
>       ;;
>
> If you are using gcc you will never hit this case statement. Also, a
> quick grep -r on mno-cygwin gives no hits other than ChangeLog.1 and
> mail/cygwin32. My understanding is that the option stripping that
> libtool does has changed a little so it may not longer need special
> processing. It should be orthogonal in any case.
>
> /Sam
>
> >
> > Bob
> > ======================================
> > Bob Friesenhahn
> > address@hidden
> > http://www.simplesystems.org/users/bfriesen
> >
>

======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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