libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Libtool branch, master, updated. v2.2.6-146-gb037363


From: Ralf Wildenhues
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-146-gb037363
Date: Tue, 08 Sep 2009 18:05:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  b03736353b6d478a68bfc19c017605eb21a3edce (commit)
       via  1e4e1984b07e4ce21f421b45854b846a93a12128 (commit)
      from  91697c2092ad24aab5b926abd7b9247f14d2d9b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b03736353b6d478a68bfc19c017605eb21a3edce
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Sep 7 21:27:08 2009 +0200

    Allow dlopen self test to work with gcc's -fvisibility=hidden.
    
    * libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
    visibility for the symbol we are going to test dlopen (NULL)
    when a GCC version is used that understands the visibility
    attribute, under the assumption that if -fvisibility=hidden
    will be used, the user code will be sufficiently annotated
    for visibility of needed symbols from the main executable.
    * THANKS: Update.
    Report by Josh Hursey against OpenMPI.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 1e4e1984b07e4ce21f421b45854b846a93a12128
Author: Ralf Wildenhues <address@hidden>
Date:   Mon Sep 7 21:08:50 2009 +0200

    Fix and split recent testsuite addition for compile/link flags.
    
    * tests/flags.at (passing flags through libtool): Split into ...
    (passing CC flags through libtool)
    (passing CXX flags through libtool)
    (passing F77 flags through libtool)
    (passing FC flags through libtool)
    (passing GCJ flags through libtool): ... these five tests,
    factorized with m4_foreach.  Fix F77 and FC compile and link
    commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
    for which no compiler exists.  Use $EXEEXT where appropriate.
    Drop unneeded use of reload_cmds.
    Reports by Peter Rosin and Peter O'Gorman.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog             |   25 ++++++++++++
 THANKS                |    1 +
 libltdl/m4/libtool.m4 |   14 ++++++-
 tests/flags.at        |   99 ++++++++++++++++++++++++++-----------------------
 4 files changed, 91 insertions(+), 48 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cc43535..d3e924f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2009-09-07  Ralf Wildenhues  <address@hidden>
+
+       Allow dlopen self test to work with gcc's -fvisibility=hidden.
+       * libltdl/m4/libtool.m4 (_LT_TRY_DLOPEN_SELF): Declare default
+       visibility for the symbol we are going to test dlopen (NULL)
+       when a GCC version is used that understands the visibility
+       attribute, under the assumption that if -fvisibility=hidden
+       will be used, the user code will be sufficiently annotated
+       for visibility of needed symbols from the main executable.
+       * THANKS: Update.
+       Report by Josh Hursey against OpenMPI.
+
+       Fix and split recent testsuite addition for compile/link flags.
+       * tests/flags.at (passing flags through libtool): Split into ...
+       (passing CC flags through libtool)
+       (passing CXX flags through libtool)
+       (passing F77 flags through libtool)
+       (passing FC flags through libtool)
+       (passing GCJ flags through libtool): ... these five tests,
+       factorized with m4_foreach.  Fix F77 and FC compile and link
+       commands; add GCJ tag.  Use LT_AT_TAG to correctly skip tags
+       for which no compiler exists.  Use $EXEEXT where appropriate.
+       Drop unneeded use of reload_cmds.
+       Reports by Peter Rosin and Peter O'Gorman.
+
 2009-09-07  Peter O'Gorman  <address@hidden
 
        Fix redirect in test case.
diff --git a/THANKS b/THANKS
index 9353885..8baf7f4 100644
--- a/THANKS
+++ b/THANKS
@@ -110,6 +110,7 @@
   John Bowler                  address@hidden
   John R. Cary                 address@hidden
   John Wolfe                   address@hidden
+  Josh Hursey                  address@hidden
   Joseph Beckenbach III                address@hidden
   Lennart Poettering           address@hidden
   Karl Berry                   address@hidden
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index bb1097f..662a88b 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1651,7 +1651,13 @@ else
 #  endif
 #endif
 
-void fnord() { int i=42;}
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || 
(__GNUC__ > 3))
+void fnord () __attribute__((visibility("default")));
+#endif
+
+void fnord () { int i=42; }
 int main ()
 {
   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
@@ -1660,7 +1666,11 @@ int main ()
   if (self)
     {
       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      else
+        {
+         if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+       }
       /* dlclose (self); */
     }
   else
diff --git a/tests/flags.at b/tests/flags.at
index 3de1fcb..eceda74 100644
--- a/tests/flags.at
+++ b/tests/flags.at
@@ -21,24 +21,42 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 ####
 
-AT_SETUP([passing flags through libtool])
+m4_foreach([lt_tag], [CC, CXX, F77, FC, GCJ],
+[AT_SETUP([passing lt_tag flags through libtool])
 AT_KEYWORDS([libtool])
-AT_KEYWORDS([CXX F77 FC])
+LT_AT_TAG([lt_tag])
 
 LDFLAGS="$LDFLAGS -no-undefined"
 eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
 
-AT_DATA([a.c],
+m4_case(lt_tag,
+[CC], [AT_DATA([a.c],
 [[int main () { return 0; }
 ]])
-
-AT_DATA([a.f],
+compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c
+],
+[CXX], [AT_DATA([a.cpp],
+[[int main () { return 0; }
+]])
+compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" source=a.cpp
+],
+[F77], [AT_DATA([a.f],
 [[      program main
       end
 ]])
-
-cp a.c a.cpp
-cp a.f a.f90
+compile="$F77 $FFLAGS" link="$F77 $FFLAGS $LDFLAGS" source=a.f
+],
+[FC], [AT_DATA([a.f90],
+[[      program main
+      end
+]])
+compile="$FC $FCFLAGS" link="$FC $FCFLAGS $LDFLAGS" source=a.f90
+],
+[GCJ], [AT_DATA([a.java],
+[[class a {}
+]])
+compile="$GCJ $GCJFLAGS" link="$GCJ $GCJFLAGS $LDFLAGS" source=a.java
+])
 
 # Linker flags are not passed to the archiver, so don't test static libraries.
 if $LIBTOOL --features | grep 'enable shared libraries'; then
@@ -47,50 +65,39 @@ else
   library_and_module=
 fi
 
-for tag in CC CXX F77 FC; do
-  if $LIBTOOL --tag=$tag 2>&1 | grep 'unknown tag'; then
-    continue
-  fi
-  case $tag in
-  CC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.c ;;
-  CXX) compile="$CXX $CPPFLAGS $CXXFLAGS" link="$CXX $CXXFLAGS $LDFLAGS" 
source=a.cpp;;
-  F77) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f 
;;
-  FC) compile="$CC $CPPFLAGS $CFLAGS" link="$CC $CFLAGS $LDFLAGS" source=a.f90 
;;
-  esac
+eval "`$LIBTOOL --tag=lt_tag --config | $EGREP '^(wl|archive_cmds)='`"
 
-  eval "`$LIBTOOL --tag=$tag --config | $EGREP 
'^(wl|archive_cmds|reload_cmds)='`"
+AT_CHECK([$LIBTOOL --tag=lt_tag --mode=compile $compile -c $source],
+        [], [ignore], [ignore])
 
-  AT_CHECK([$LIBTOOL --tag=$tag --mode=compile $compile -c $source],
-          [], [ignore], [ignore])
+# Linker flags are prefixed with ${wl} iff they are passed to the
+# compiler driver, instead of directly to the linker.
+case $archive_cmds in
+*\$LD*\$linker_flags*) maybe_wl= ;;
+*) maybe_wl=$wl ;;
+esac
 
-  # Linker flags are prefixed with ${wl} iff they are passed to the
-  # compiler driver, instead of directly to the linker.
-  case $archive_cmds in
-  *\$LD*\$linker_flags*) maybe_wl= ;;
-  *) maybe_wl=$wl ;;
+for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
+  case $flag in
+  -Wc, | -Xcompiler\ )
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=compile $compile ]dnl
+            [$flag-foo -c $source], [], [stdout], [ignore])
+    AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
+    flag_prefix=
+    ;;
+  -Wl, | -Xlinker\ )
+    flag_prefix=$maybe_wl
+    ;;
   esac
 
-  for flag in -Wc, -Wl, '-Xcompiler ' '-Xlinker '; do
-    case $flag in
-    -Wc, | -Xcompiler\ )
-      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=compile $compile ]dnl
-              [$flag-foo -c $source], [], [stdout], [ignore])
-      AT_CHECK([$FGREP " -foo" stdout], [], [ignore])
-      flag_prefix=
-      ;;
-    -Wl, | -Xlinker\ )
-      flag_prefix=$maybe_wl
-      ;;
-    esac
-
-    eval set program "$library_and_module"
-    for output
-    do
-      AT_CHECK([$LIBTOOL -n --tag=$tag --mode=link $link ]dnl
-              [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], 
[ignore])
-      AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
-    done
+  eval set program$EXEEXT "$library_and_module"
+  for output
+  do
+    AT_CHECK([$LIBTOOL -n --tag=lt_tag --mode=link $link ]dnl
+            [-o $output a.lo -rpath /nowhere $flag-foo], [], [stdout], 
[ignore])
+    AT_CHECK([$FGREP " $flag_prefix-foo" stdout], [], [ignore])
   done
 done
 
 AT_CLEANUP
+])dnl m4_foreach(tag)


hooks/post-receive
-- 
GNU Libtool




reply via email to

[Prev in Thread] Current Thread [Next in Thread]