[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Libtool strips out -tp=k8-32 PGI compiler flag in link mode
From: |
Ralf Wildenhues |
Subject: |
Re: Libtool strips out -tp=k8-32 PGI compiler flag in link mode |
Date: |
Sat, 21 Mar 2009 11:41:20 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi Ethan,
* Ethan Mallove wrote on Fri, Mar 20, 2009 at 08:05:31PM CET:
> I am trying to use Libtool with the PGI compilers in 32-bit mode
> (using the -tp=k8-32 flag). In link mode, Libtool seems to be
> stripping out the -tp=k8-32 compiler flag, which results in a compiler
> error:
>
> $ make
> /bin/sh ../../../../libtool --tag=CC --mode=link pgcc -O -DNDEBUG -tp=k8-32
> -export-dynamic -o libopenmpi-malloc.la -rpath /opt/SUNWhpc/HPC8.2/pgi/lib
> malloc.lo malloc-stats.lo -lnsl -lutil -lpthread
> libtool: link: pgcc -shared -fpic -DPIC .libs/malloc.o .libs/malloc-stats.o
> -lnsl -lutil -lpthread -lc -Wl,-soname -Wl,libopenmpi-malloc.so.0 -o
> .libs/libopenmpi-malloc.so.0.0.0
> /usr/bin/ld: warning: i386 architecture of input file `.libs/malloc.o' is
> incompatible with i386:x86-64 output
> /usr/bin/ld: warning: i386 architecture of input file
> `.libs/malloc-stats.o' is incompatible with i386:x86-64 output
> .libs/malloc.o(.text+0x14d3): In function `munmap_chunk':
> : undefined reference to `opal_mem_free_ptmalloc2_munmap'
> ...
> make: *** [libopenmpi-malloc.la] Error 2
>
> If I add in the -tp=k8-32 manually, it compiles. I have tried without
> success to override this behavior with a Makefile macro at the command
> line (e.g., LDFLAGS="-tp=k8-32). Is there a workaround for this issue?
Thanks for the bug report. A workaround should be to
./configure CC="pgcc -tp=k8-32"
and the following patch should fix the issue. Can you try both?
Thanks,
Ralf
Allow through -tp and -tp=* at link time, for pgcc.
* libltdl/config/ltmain.m4sh (func_mode_link): Portlant Group
pgcc uses `-tp PROCESSOR' or `-tp=PROCESSOR' for target
processor selection; allow the flag through at link time.
* THANKS: Update.
Report by Ethan Mallove.
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index f17ad72..cc13935 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4497,8 +4497,9 @@ func_mode_link ()
# -F/path gives path to uninstalled frameworks, gcc on darwin
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
# @file GCC response files
+ # -tp, -tp=* Portland pgcc target processor selection
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp|-tp=*)
func_quote_for_eval "$arg"
arg="$func_quote_for_eval_result"
func_append compile_command " $arg"