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.10-23-gfdc9248


From: Ralf Wildenhues
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.10-23-gfdc9248
Date: Sat, 19 Jun 2010 08:40:36 +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  fdc9248662c9473ac68b6d4c430b26298215e7d6 (commit)
       via  64377ca9da7e0efec71e73d58b047de24fd27dd1 (commit)
      from  4d3ac408c863b1110ce7782d44c80b24f24111f1 (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 fdc9248662c9473ac68b6d4c430b26298215e7d6
Author: Ralf Wildenhues <address@hidden>
Date:   Wed Jun 9 20:09:37 2010 +0200

    Fix execute mode test for OSF/1 5.1.
    
    * tests/execute-mode.at (execute mode): Do not use grep -F
    with an empty pattern.
    * THANKS: Update.
    Report by Jay K.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 64377ca9da7e0efec71e73d58b047de24fd27dd1
Author: Ralf Wildenhues <address@hidden>
Date:   Sat Jun 19 06:47:42 2010 +0200

    Use config.cache variable for PIC flag, to allow override.
    
    * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) <lt_prog_compiler_pic>:
    Save result, and allow override, through cache variable
    lt_cv_prog_compiler_pic{,_CXX,_F77,_FC}.  The cache variable
    needs to contain an eventual -DPIC.
    * doc/libtool.texi (): Document it.
    * tests/pic_flag.at (override pic_flag at configure time):
    New file, new test.
    * Makefile.am (TESTSUITE_AT): Update.
    * NEWS, THANKS: Update.
    Suggestion by Joakim Tjernlund and Paolo Bonzini.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog             |   20 +++++++++++++++++++
 Makefile.am           |    1 +
 THANKS                |    2 +
 libltdl/m4/libtool.m4 |   11 ++++++---
 tests/execute-mode.at |   10 ++++----
 tests/pic_flag.at     |   51 +++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 86 insertions(+), 9 deletions(-)
 create mode 100644 tests/pic_flag.at

diff --git a/ChangeLog b/ChangeLog
index a5676ef..d9ae546 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2010-06-19  Ralf Wildenhues  <address@hidden>
+
+       Fix execute mode test for OSF/1 5.1.
+       * tests/execute-mode.at (execute mode): Do not use grep -F
+       with an empty pattern.
+       * THANKS: Update.
+       Report by Jay K.
+
+       Use config.cache variable for PIC flag, to allow override.
+       * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) <lt_prog_compiler_pic>:
+       Save result, and allow override, through cache variable
+       lt_cv_prog_compiler_pic{,_CXX,_F77,_FC}.  The cache variable
+       needs to contain an eventual -DPIC.
+       * doc/libtool.texi (): Document it.
+       * tests/pic_flag.at (override pic_flag at configure time):
+       New file, new test.
+       * Makefile.am (TESTSUITE_AT): Update.
+       * NEWS, THANKS: Update.
+       Suggestion by Joakim Tjernlund and Paolo Bonzini.
+
 2010-06-16  Ralf Wildenhues  <address@hidden>
 
        Optimize func_ltwrapper_scriptname to assume a cwrapper.
diff --git a/Makefile.am b/Makefile.am
index d0688ee..5822428 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -509,6 +509,7 @@ TESTSUITE_AT        = tests/testsuite.at \
                  tests/configure-iface.at \
                  tests/stresstest.at \
                  tests/cmdline_wrap.at \
+                 tests/pic_flag.at \
                  tests/darwin.at \
                  tests/deplibs-mingw.at
 
diff --git a/THANKS b/THANKS
index 8a866a4..405a4f7 100644
--- a/THANKS
+++ b/THANKS
@@ -106,9 +106,11 @@
   Jakub Bogusz                 address@hidden
   Jacob Meuser                 address@hidden
   James Su                     address@hidden
+  Jay K                                address@hidden
   Jeff Squyres                 address@hidden
   Jeremy C. Reed               address@hidden
   Jim Meyering                 address@hidden
+  Joakim Tjernlund             address@hidden
   Joel N. Weber II             address@hidden
   Joerg Sonnenberger           address@hidden
   John Bowler                  address@hidden
diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index a91bd61..b93dd0c 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -3587,7 +3587,6 @@ _LT_TAGVAR(lt_prog_compiler_wl, $1)=
 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
 _LT_TAGVAR(lt_prog_compiler_static, $1)=
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
 m4_if([$1], [CXX], [
   # C++ specific cases for pic, static, wl, etc.
   if test "$GXX" = yes; then
@@ -4185,9 +4184,11 @@ case $host_os in
     _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, 
$1)@&address@hidden([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
     ;;
 esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
-       [How to pass a linker flag through the compiler])
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, 
$1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
 
 #
 # Check to make sure the PIC flag actually works.
@@ -4206,6 +4207,8 @@ fi
 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
        [Additional compiler flags for building library objects])
 
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+       [How to pass a linker flag through the compiler])
 #
 # Check to make sure the static flag actually works.
 #
diff --git a/tests/execute-mode.at b/tests/execute-mode.at
index a1a1ee2..55f776c 100644
--- a/tests/execute-mode.at
+++ b/tests/execute-mode.at
@@ -1,6 +1,6 @@
 # execute-mode.at -- libtool --mode=execute             -*- Autotest -*-
 #
-#   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+#   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 #   Written by Ralf Wildenhues, 2008
 #
 #   This file is part of GNU Libtool.
@@ -193,19 +193,19 @@ do
   fi
   AT_CHECK([$LIBTOOL --mode=execute ./foo abc "$arg1" "$arg2" xyz], [], 
[stdout], [ignore])
   AT_CHECK([$FGREP "$arg1" stdout], [], [ignore])
-  AT_CHECK([$FGREP "$arg2" stdout], [], [ignore])
+  AT_CHECK([test -z "$arg2" || $FGREP "$arg2" stdout], [], [ignore])
   AT_CHECK([test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4])
   AT_CHECK([$LIBTOOL --mode=execute ./lt-wrapper abc "$arg1" "$arg2" xyz 
</dev/null], [], [stdout])
   AT_CHECK([$FGREP "$arg1" stdout], [], [ignore])
-  AT_CHECK([$FGREP "$arg2" stdout], [], [ignore])
+  AT_CHECK([test -z "$arg2" || $FGREP "$arg2" stdout], [], [ignore])
   AT_CHECK([test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4])
   AT_CHECK([$LIBTOOL --mode=execute ./foo lt-wrapper abc "$arg1" "$arg2" xyz], 
[], [stdout])
   AT_CHECK([$FGREP "$arg1" stdout], [], [ignore])
-  AT_CHECK([$FGREP "$arg2" stdout], [], [ignore])
+  AT_CHECK([test -z "$arg2" || $FGREP "$arg2" stdout], [], [ignore])
   AT_CHECK([test `sed -n '/^abc$/,/^xyz$/p' stdout | wc -l` -eq 4])
   AT_CHECK([$LIBTOOL --mode=execute ./main$EXEEXT abc "$arg1" "$arg2" xyz], 
[], [stdout])
   AT_CHECK([$FGREP "$arg1" stdout], [], [ignore])
-  AT_CHECK([$FGREP "$arg2" stdout], [], [ignore])
+  AT_CHECK([test -z "$arg2" || $FGREP "$arg2" stdout], [], [ignore])
   # Do not match EOL here, cross setups may have an extra \r here.
   AT_CHECK([test `sed -n '/^abc/,/^xyz/p' stdout | wc -l` -eq 4])
   arg1=
diff --git a/tests/pic_flag.at b/tests/pic_flag.at
new file mode 100644
index 0000000..a729d16
--- /dev/null
+++ b/tests/pic_flag.at
@@ -0,0 +1,51 @@
+# pic_flag.at -- override the pic_flag at configure time   -*- Autotest -*-
+
+#   Copyright (C) 2010 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([override pic_flag at configure time])
+
+# Just try to configure the Libtool package with -fpic if we can compile
+# with it, for C and C++.
+
+AT_DATA([foo.c],
+[[int data = 42;
+int func(void) { return data; }
+]])
+
+cp foo.c foo.cpp
+C_pic_flag='-fpic -DPIC'
+AT_CHECK([$CC $CPPFLAGS $CFLAGS $C_pic_flag -c foo.c || exit 77],
+        [], [ignore], [ignore])
+
+CXX_pic_flag='-fpic -DPIC'
+if $CXX $CPPFLAGS $CXXFLAGS $CXX_pic_flag -c foo.cpp; then :; else
+  CXX_pic_flag=
+fi
+
+AT_CHECK(["$abs_top_srcdir"/configure lt_cv_prog_compiler_pic="$C_pic_flag" 
]dnl
+        [lt_cv_prog_compiler_pic_CXX="$CXX_pic_flag"], [], [ignore], [ignore])
+: ${MAKE=make}
+AT_CHECK([$MAKE], [], [stdout], [ignore])
+AT_CHECK([if ./libtool --features | grep 'enable shared libraries'; then ]dnl
+        [  grep -e -fpic stdout; else exit 77; fi], [], [ignore], [ignore])
+
+AT_CLEANUP


hooks/post-receive
-- 
GNU Libtool



reply via email to

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