2005-12-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
- * libltdl/config/general.m4sh (func_show_eval):
- Rewrite use the failure expression, because the exit status of
- the previous command may not be preserved in the next `eval' by
- some shells, such as pdksh.
+ Basic support for PIE (position-independent executables).
+
+ * libltdl/config/ltmain.m4sh (func_generate_dlsyms):
+ Don't pass PIE flag for compilation of the symbol file object.
+ (func_mode_compile): Pass PIE flag only for non-PIC objects.
+ * NEWS: Updated.
+
+2005-12-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * libltdl/config/general.m4sh (func_show_eval): Rewrite use of
+ the failure expression, because the exit status of the previous
+ command may not be preserved in the next `eval' by some shells,
+ such as pdksh.
* libltdl/config/ltmain.m4sh (func_extract_an_archive):
Use func_show_eval correctly.
(func_mode_link): Likewise. Also, do not use `$status'.
* Fixed a branch-1-5/HEAD regression to only link uninstalled libraries
statically with `-static'.
* Support for Interix 3 (Windows SFU).
+* Basic support for PIE (position-independent executables).
* Bug fixes.
\f
New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team:
esac
;;
esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
# Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
# Clean up the generated files.
func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
arg_mode=normal
libobj=
later=
+ pie_flag=
for arg
do
continue
;;
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
-shared | -static | -prefer-pic | -prefer-non-pic)
later="$later $arg"
continue
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
- command="$base_compile $qsrcfile"
+ command="$base_compile $qsrcfile$pie_flag"
else
command="$base_compile $qsrcfile $pic_flag"
fi