mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
Improved Portland support: prelinking of C++ templates and whole_archive.
* m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [ linux ]: Reinstate formatted whole_archive_flag_spec for PGI compilers. * config/ltmain.m4sh (func_mode_link), m4/libtool.m4 (_LT_LINKER_SHLIBS): New tag prelink_cmds, to be executed before linking a program. (_LT_LANG_CXX_CONFIG) [ linux ]: Use for pgCC. (_LT_COMPILER_C_O): conftest might be nonempty, clean up more thoroughly.
This commit is contained in:
parent
8b6f5a929f
commit
652709d688
@ -1,5 +1,14 @@
|
||||
2005-04-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
Improved Portland support: prelinking of C++ templates and whole_archive.
|
||||
|
||||
* m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [ linux ]:
|
||||
Reinstate formatted whole_archive_flag_spec for PGI compilers.
|
||||
* config/ltmain.m4sh (func_mode_link), m4/libtool.m4 (_LT_LINKER_SHLIBS):
|
||||
New tag prelink_cmds, to be executed before linking a program.
|
||||
(_LT_LANG_CXX_CONFIG) [ linux ]: Use for pgCC.
|
||||
(_LT_COMPILER_C_O): conftest might be nonempty, clean up more thoroughly.
|
||||
|
||||
* tests/testsuite.at (LT_AT_BOOTSTRAP): Temporary fix for testing
|
||||
in-tree libtoolize.
|
||||
|
||||
|
@ -5563,6 +5563,17 @@ EOF
|
||||
|
||||
func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
|
||||
|
||||
# template prelinking step
|
||||
if test -n "$prelink_cmds"; then
|
||||
cmds=$prelink_cmds
|
||||
save_ifs="$IFS"; IFS='~'
|
||||
for cmd in $cmds; do
|
||||
eval cmd=\"$cmd\"
|
||||
IFS="$save_ifs"
|
||||
func_show_eval "$cmd" 'exit $?'
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
fi
|
||||
|
||||
wrappers_required=yes
|
||||
case $host in
|
||||
|
38
m4/libtool.m4
vendored
38
m4/libtool.m4
vendored
@ -1504,7 +1504,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
|
||||
test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
|
||||
$RM out/* && rmdir out
|
||||
cd ..
|
||||
rmdir conftest
|
||||
$RM -r conftest
|
||||
$RM conftest*
|
||||
])
|
||||
_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
|
||||
@ -3139,7 +3139,6 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
@ -3702,10 +3701,10 @@ _LT_EOF
|
||||
tmp_addflag=
|
||||
case $cc_basename,$host_cpu in
|
||||
pgcc*) # Portland Group C compiler
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
;;
|
||||
pgf77* | pgf90* ) # Portland Group f77 and f90 compilers
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
tmp_addflag=' -fpic -Mnomain' ;;
|
||||
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
|
||||
tmp_addflag=' -i_dynamic' ;;
|
||||
@ -4501,6 +4500,8 @@ _LT_TAGDECL([], [exclude_expsyms], [1],
|
||||
[Symbols that should not be listed in the preloaded symbols])
|
||||
_LT_TAGDECL([], [include_expsyms], [1],
|
||||
[Symbols that must always be exported])
|
||||
_LT_TAGDECL([], [prelink_cmds], [2],
|
||||
[Commands necessary for linking programs (against libraries) with templates])
|
||||
dnl FIXME: Not yet implemented
|
||||
dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
|
||||
dnl [Compiler flag to generate thread safe objects])
|
||||
@ -5227,12 +5228,35 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
;;
|
||||
pgCC*)
|
||||
# Portland Group C++ compiler
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
|
||||
case `$CC -V` in
|
||||
*pgCC\ [[1-5]]*)
|
||||
_LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
|
||||
rm -rf $tpldir~
|
||||
$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
|
||||
compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
|
||||
_LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
|
||||
rm -rf $tpldir~
|
||||
$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
|
||||
$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
|
||||
$RANLIB $oldlib'
|
||||
_LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
|
||||
rm -rf $tpldir~
|
||||
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
|
||||
$CC -shared $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
|
||||
rm -rf $tpldir~
|
||||
$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
|
||||
$CC -shared $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
|
||||
;;
|
||||
*) # Version 6 will use weak symbols
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
|
||||
_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
|
||||
_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)=''
|
||||
_LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive,`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
|
||||
;;
|
||||
cxx*)
|
||||
# Compaq C++
|
||||
|
Loading…
Reference in New Issue
Block a user