LAM/MPI logo

LAM/MPI Development Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Didier Cabannes (didier_at_[hidden])
Date: 2005-11-04 15:24:45


On Fri, 2005-11-04 at 13:14 +0100, Bogdan Costescu wrote:
> On Thu, 3 Nov 2005, Didier Cabannes wrote:
>
> > CC=pathcc
> > CXX=pathCC
> > ...
> >> if test "$CC" = "pathCC" -a $psc_deps_depth -eq 2 ; then
>
> I have to confess of not looking at the actual configure script, but
> it strikes me that you set CC to pathcc (C compiler) and later on
> check for pathCC (C++ compiler).

As you can see below the script sets CC to the C++ compiler. But don't
ask me why.

[...]

+ unset lt_cv_path_LD
+ test -z ''
+ CC=/opt/pathscale/bin/pathCC
+ compiler=/opt/pathscale/bin/pathCC
+ compiler_CXX=/opt/pathscale/bin/pathCC
++ echo X/opt/pathscale/bin/pathCC
++ sed -e 's/^X//' -e 's%^.*/%%'
+ cc_basename=pathCC
+ test yes = yes
+ lt_prog_compiler_no_builtin_flag_CXX= -fno-builtin
+ test yes = yes

[...]

+ pre_test_object_deps_done=no
+ psc_deps_depth=2
++ echo 'X$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
++ sed -e 's/^X//' -e 's/\*/\\\*/g'
+ output_verbose_link_cmd=$CC -shared $CFLAGS -v conftest.$objext 2>&1 |
grep "\-L"
++ eval '$CC' -shared '$CFLAGS' -v 'conftest.$objext' '2>&1' '|' grep
'"\-L"'
+++ /opt/pathscale/bin/pathCC -shared -O3 -pthread -v conftest.o
+++ grep '\-L'
+ test -L/opt/pathscale/lib/2.2.99 = -L

Anyway in this particular case, using CXX is certainly more appropriate.

> Furthermore, how is this supposed to
> work if I set:
>
> CC=/path/to/pathcc
>
> (an absolute path to the compiler executable) ?
>

Here is a revised patch that covers your both comments.

% cat configure.patch
33503a33504
> psc_deps_depth=2
33552c33553,33557
< pre_test_object_deps_done=yes

---
>            if test "`basename $CXX`" = "pathCC" -a $psc_deps_depth -eq
2 ; then
>                        psc_deps_depth=1
>                else
>                        pre_test_object_deps_done=yes
>                fi