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-141-g0805518


From: Ralf Wildenhues
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.6-141-g0805518
Date: Sun, 06 Sep 2009 17:35:33 +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  0805518173d95032e22c2832e73724c08ac2d9c7 (commit)
       via  8c35d797572d3ccef6d1ed6ebc59e679b5b80aa6 (commit)
      from  c9bbeef468f64064e1d50e39c945df929cbc21d8 (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 0805518173d95032e22c2832e73724c08ac2d9c7
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Sep 6 12:42:34 2009 +0200

    Fix failure test in the presence of --with-pic or -prefer-pic.
    
    * tests/fail.at (Failure tests): Run non-PIC failure test only
    if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
    and also -prefer-pic has not been passed in $CFLAGS.
    * THANKS: Update.
    Report by Donn Washburn.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 8c35d797572d3ccef6d1ed6ebc59e679b5b80aa6
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Sep 6 09:48:33 2009 +0200

    Add testsuite exposure for passing of compiler and linker flags.
    
    * tests/flags.at (passing flags through libtool): New file, new
    test, for bug fixed in previous commit.
    * Makefile.am (TESTSUITE_AT): Add tests/flags.at.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog      |   14 ++++++++
 Makefile.am    |    1 +
 THANKS         |    1 +
 tests/fail.at  |   15 ++++++---
 tests/flags.at |   96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 122 insertions(+), 5 deletions(-)
 create mode 100644 tests/flags.at

diff --git a/ChangeLog b/ChangeLog
index 9e5d353..60bf373 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-09-06  Ralf Wildenhues  <address@hidden>
+
+       Fix failure test in the presence of --with-pic or -prefer-pic.
+       * tests/fail.at (Failure tests): Run non-PIC failure test only
+       if pic_mode is 'default' or 'no', rather than 'default' or 'yes'
+       and also -prefer-pic has not been passed in $CFLAGS.
+       * THANKS: Update.
+       Report by Donn Washburn.
+
+       Add testsuite exposure for passing of compiler and linker flags.
+       * tests/flags.at (passing flags through libtool): New file, new
+       test, for bug fixed in previous commit.
+       * Makefile.am (TESTSUITE_AT): Add tests/flags.at.
+
 2009-09-04  Peter Rosin  <address@hidden>
 
        Make -Wc,FLAG behave like -Xcompiler FLAG in link mode.
diff --git a/Makefile.am b/Makefile.am
index a18955e..e22fcc2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -455,6 +455,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/duplicate_members.at \
                  tests/duplicate_conv.at \
                  tests/duplicate_deps.at \
+                 tests/flags.at \
                  tests/inherited_flags.at \
                  tests/convenience.at \
                  tests/link-order.at \
diff --git a/THANKS b/THANKS
index e976ba8..9353885 100644
--- a/THANKS
+++ b/THANKS
@@ -88,6 +88,7 @@
   Daniel Reed                  address@hidden
   Daniel Richard G.            address@hidden
   DJ Delorie                   address@hidden
+  Donn Washburn                        address@hidden
   Edouard G. Parmelan          address@hidden
   Erez Zadok                   address@hidden
   Eric Estievenart             address@hidden
diff --git a/tests/fail.at b/tests/fail.at
index fb05f8c..cec954b 100644
--- a/tests/fail.at
+++ b/tests/fail.at
@@ -50,15 +50,20 @@ FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS 
-c a.c])
 AT_CHECK([test -f a.lo], [1])
 
 # non-PIC compile failure
-case $pic_mode in default | yes)
-  case $build_old_libs,$pic_flag in yes,*-DPIC*)
-    AT_DATA([a.c], [[
+case $pic_mode in default | no)
+  case " $CFLAGS " in
+   *\ -prefer-pic\ *) ;;
+   *)
+    case $build_old_libs,$pic_flag in yes,*-DPIC*)
+      AT_DATA([a.c], [[
 #ifndef PIC
   choke me
 #endif
 ]])
-    FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress -c 
a.c])
-    AT_CHECK([test -f a.lo], [1])
+      FAIL_CHECK([$LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -no-suppress 
-c a.c])
+      AT_CHECK([test -f a.lo], [1])
+      ;;
+    esac
     ;;
   esac
   ;;
diff --git a/tests/flags.at b/tests/flags.at
new file mode 100644
index 0000000..3de1fcb
--- /dev/null
+++ b/tests/flags.at
@@ -0,0 +1,96 @@
+# flags.at -- libtool passing of flags             -*- Autotest -*-
+#
+#   Copyright (C) 2009 Free Software Foundation, Inc.
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from  http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+####
+
+AT_SETUP([passing flags through libtool])
+AT_KEYWORDS([libtool])
+AT_KEYWORDS([CXX F77 FC])
+
+LDFLAGS="$LDFLAGS -no-undefined"
+eval "`$LIBTOOL --config | $EGREP '^(FGREP)='`"
+
+AT_DATA([a.c],
+[[int main () { return 0; }
+]])
+
+AT_DATA([a.f],
+[[      program main
+      end
+]])
+
+cp a.c a.cpp
+cp a.f a.f90
+
+# Linker flags are not passed to the archiver, so don't test static libraries.
+if $LIBTOOL --features | grep 'enable shared libraries'; then
+  library_and_module='library.la "module.la -module -avoid-version"'
+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=$tag --config | $EGREP 
'^(wl|archive_cmds|reload_cmds)='`"
+
+  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
+
+  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
+  done
+done
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool




reply via email to

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