Skip to content
Permalink
Browse files

more linking fixes for C++ compiler+linker flags (e.g. -stdlib)

  • Loading branch information...
evaleev committed Apr 9, 2019
1 parent b56cc40 commit cc519b9ba161a6593565db1c13c36de4dcad2b31
Showing with 10 additions and 9 deletions.
  1. +2 −1 CHANGES
  2. +2 −2 src/bin/libint/Makefile
  3. +2 −2 src/bin/profile/Makefile
  4. +4 −4 src/bin/test_eri/Makefile
@@ -3,7 +3,7 @@

Following is a brief summary of changes made in each release of Libint.

- 2018-04-08: 2.5.0
- 2018-04-09: 2.5.0
- New Fortran bindings to Libint by Patrick Seewald (https://github.com/pseewald); requires Fortran 2003 or later.
- validation target in exported library works correctly in absence of C++11 API
- cleanup of molden exporter
@@ -12,6 +12,7 @@ Following is a brief summary of changes made in each release of Libint.
- resolves issues #108: do not use bundled boost if possible
- resolved issue #118: workaround broken Intel C++ 2019 compiler bug
- updated libtool and catch2
- resolved numerous linking issues with -stdlib flags

- 2018-08-13: 2.5.0-beta.2
- fixed molden exporter
@@ -46,15 +46,15 @@ default:: build_libint
all:: default

build_libint: $(BUILDCXXOBJ) $(LIBTARGET)
$(CXX) -o $@ $(LDFLAGS) $^ $(SYSLIBS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $^ $(SYSLIBS)

depend:: $(TESTCXXDEP) $(BUILDCXXDEP) $(LIBCXXDEP)

run_test:: test
./test

test: $(TESTCXXOBJ) $(LIBTARGET)
$(CXX) -o $@ $(LDFLAGS) $^ $(SYSLIBS)
$(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $^ $(SYSLIBS)

$(LIBTARGET): $(LIBOBJ)
/bin/rm -f $@
@@ -32,7 +32,7 @@ $(COMP1): LDFLAGS := -pg $(LDFLAGS)

$(COMP1): $(COMP1OBJ) $(LIBINTDIR)/buildtest.o $(LIBINT)
cd ../libint; $(MAKE) $(LIBINT)
$(LD) -o $@ $^ $(SYSLIBS) $(LDFLAGS)
$(LD) -o $@ $^ $(SYSLIBS) $(CXXFLAGS) $(LDFLAGS)

$(COMP1OBJ):: $(LIBINTDIR)/buildtest.h

@@ -44,7 +44,7 @@ COMP2SRC = $(COMP2).cc
COMP2OBJ = $(COMP2SRC:%.cc=%.o)

$(COMP2): $(COMP2OBJ)
$(CXX) -o $@ $^ $(SYSLIBS) $(BLAS) $(LDFLAGS)
$(CXX) -o $@ $^ $(SYSLIBS) $(BLAS) $(CXXFLAGS) $(LDFLAGS)

$(COMP2OBJ):: $(TOPDIR)/include/libint2/boys.h

@@ -44,22 +44,22 @@ CXXTEST2OBJ = $(CXXTEST2SRC:%.cc=%.o)

$(ERICOMP): $(CXXERICOMPOBJ) $(LIBINTDIR)/buildtest.o $(LIBINT)
cd ../libint; $(MAKE) $(LIBINT)
$(CXX) -o $@ $^ $(SYSLIBS) $(LDFLAGS)
$(CXX) -o $@ $^ $(SYSLIBS) $(CXXFLAGS) $(LDFLAGS)

ifeq ($(CXX_COMPATIBLE_WITH_CXXGEN),yes)
$(TEST): $(CXXTESTOBJ) $(CXXGENOBJ) $(CGSHELLOBJ)
$(CXX) -o $@ $^ $(SYSLIBS) $(LDFLAGS)
$(CXX) -o $@ $^ $(SYSLIBS) $(CXXGENFLAGS) $(LDFLAGS)
else
$(TEST):
echo "Cannot test generated code! $(CXXGEN) is not compatible with $(CXXCOMP)"
@exit 1
endif

$(TIME): $(CXXTIMEOBJ) $(CXXGENOBJ) $(CGSHELLOBJ)
$(CXX) -o $@ $^ $(SYSLIBS) $(LDFLAGS)
$(CXX) -o $@ $^ $(SYSLIBS) $(CXXGENFLAGS) $(LDFLAGS)

$(TEST2): $(CXXTEST2OBJ) $(CXXGENOBJ) $(CGSHELLOBJ)
$(CXX) -o $@ $^ $(SYSLIBS) $(LDFLAGS)
$(CXX) -o $@ $^ $(SYSLIBS) $(CXXGENFLAGS) $(LDFLAGS)

# Assume that CXXGEN has the weaker frontend of the two (there is no reason to not use it then as CXX)
# hence use it *only* to compile generated source if CXXGEN is compatible with CXX

0 comments on commit cc519b9

Please sign in to comment.
You can’t perform that action at this time.