]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (lt_preloaded_setup): function added to symbol list
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Tue, 19 Jan 1999 23:52:19 +0000 (23:52 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Tue, 19 Jan 1999 23:52:19 +0000 (23:52 +0000)
source file to work around FreeBSD problem

ChangeLog
ltmain.in

index 8b1ae3e5b55b3d935a440deb75a03c7011a5adcf..4d760d9422b693f194fc4b71ffc5d6782e8c4bcc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1999-01-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
 
+       * ltmain.in (lt_preloaded_setup): function added to symbol list
+       source file to work around FreeBSD problem
+
        * Makefile.am (check-local): depend on libltdl/Makefile
 
        * mdemo/Makefile.am (mdemo_LDFLAGS, mdemo_LDADD): moved -dlopen
index 50d45e7601db1b9cbf1ae0214caa7186b9425a01..295a68a12938108c1681e81fc6979289aa066249 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -2006,6 +2006,11 @@ lt_preloaded_symbols[] =
   {0, (lt_ptr_t) 0}
 };
 
+/* This works around a problem in FreeBSD linker */
+static const void *lt_preloaded_setup() {
+  return lt_preloaded_symbols;
+}
+
 #ifdef __cplusplus
 }
 #endif\
@@ -2013,8 +2018,9 @@ lt_preloaded_symbols[] =
          fi
 
          # Now compile the dynamic symbol file.
-         $show "(cd $objdir && $C_compiler -c$no_builtin_flag \"$dlsyms\")"
-         $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag "$dlsyms")' || exit $?
+         # pic_flag works around a bug in FreeBSD linker
+         $show "(cd $objdir && $C_compiler -c$no_builtin_flag $pic_flag -DPIC \"$dlsyms\")"
+         $run eval '(cd $objdir && $C_compiler -c$no_builtin_flag $pic_flag -DPIC "$dlsyms")' || exit $?
 
          # Transform the symbol file into the correct name.
          compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$objdir/${output}S.${objext}%"`