summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2010-09-20 22:07:27 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2010-09-20 22:07:27 (GMT)
commita779518cf92213c96cb06ba16b744d4b95d76c1c (patch)
treeda197cc7e5c736b6f7d479f32ef62ee4f4a7e9ce
parentd688fc55a94acc6bdf43607e5224bc28009ee5e8 (diff)
downloadhdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.zip
hdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.tar.gz
hdf5-a779518cf92213c96cb06ba16b744d4b95d76c1c.tar.bz2
[svn-r19442] Move $LIBS to just after $lib_objs in the link command line. Otherwise the linker doesn't find the functions called by the program being compiled. $LIBS is ofr libraries specified by the compile script user.
We don't currently have any tests checked in to do this. Tested with netCDF-4 and hdf5 on jam.
-rwxr-xr-xc++/src/h5c++.in17
-rwxr-xr-xfortran/src/h5fc.in17
-rwxr-xr-xtools/misc/h5cc.in16
3 files changed, 29 insertions, 21 deletions
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in
index b26d0a9..39d3d2a 100755
--- a/c++/src/h5c++.in
+++ b/c++/src/h5c++.in
@@ -84,9 +84,10 @@ CXXLINKERBASE="@CXX@"
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
-# libraries in $link_args, followed by any external library paths and libraries
-# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
H5BLD_CXXFLAGS="@AM_CXXFLAGS@ @CXXFLAGS@"
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
@@ -365,10 +366,12 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
# User's CPPFLAGS and CXXFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
- # libraries in $link_args, followed by any external library paths and libraries
- # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
- $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+
+ $SHOW $CXXLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in
index cfb3cb4..9e9409d 100755
--- a/fortran/src/h5fc.in
+++ b/fortran/src/h5fc.in
@@ -81,9 +81,11 @@ FLINKERBASE="@FC@"
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
# User's FFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
-# libraries in $link_args, followed by any external library paths and libraries
-# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
+
H5BLD_FFLAGS="@AM_FCFLAGS@ @FCFLAGS@"
F9XMODFLAG="@F9XMODFLAG@"
F9XSUFFIXFLAG="@F9XSUFFIXFLAG@"
@@ -343,10 +345,11 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
# User's FFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
- # libraries in $link_args, followed by any external library paths and libraries
- # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
- $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $LIBS $fmodules $link_objs $link_args $shared_link
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+ $SHOW $FLINKER $FFLAGS $H5BLD_FFLAGS $F9XSUFFIXFLAG $LDFLAGS $fmodules $link_objs $LIBS $link_args $shared_link
status=$?
fi
diff --git a/tools/misc/h5cc.in b/tools/misc/h5cc.in
index 2626357..a1421a2 100755
--- a/tools/misc/h5cc.in
+++ b/tools/misc/h5cc.in
@@ -86,9 +86,10 @@ CLINKERBASE="@CC@"
# FLAGS brought from the hdf5 build are put in H5BLD_*FLAGS.
# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
-# them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
-# libraries in $link_args, followed by any external library paths and libraries
-# from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
+# them. User's LDFLAGS come just before clibpath, user's LIBS come after
+# $link_objs and before the hdf5 libraries in $link_args, followed by any
+# external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+# or LIBS carried in from the hdf5 build.
H5BLD_CFLAGS="@AM_CFLAGS@ @CFLAGS@"
H5BLD_CPPFLAGS="@AM_CPPFLAGS@ @CPPFLAGS@"
H5BLD_LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@"
@@ -374,10 +375,11 @@ if test "x$do_link" = "xyes"; then
link_args="$link_args $H5BLD_LDFLAGS $H5BLD_LIBS"
# User's CPPFLAGS and CFLAGS come after their H5BLD counterparts to override
- # them. User's LDFLAGS and $LIBS come just before clibpath and the hdf5
- # libraries in $link_args, followed by any external library paths and libraries
- # from AM_LDFLAGS, LDFLAGS, AM_LIBS or LIBS carried in from the hdf5 build.
- $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $LIBS $clibpath $link_objs $link_args $shared_link
+ # them. User's LDFLAGS come just before clibpath, user's LIBS come after
+ # $link_objs and before the hdf5 libraries in $link_args, followed by any
+ # external library paths and libraries from AM_LDFLAGS, LDFLAGS, AM_LIBS
+ # or LIBS carried in from the hdf5 build.
+ $SHOW $CLINKER $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CFLAGS $CFLAGS $LDFLAGS $clibpath $link_objs $LIBS $link_args $shared_link
status=$?
fi