(fix of commit
4a08ae983)
* Makefile.direct (test_cpp): Pass -D GC_NOT_DLL to $(CC) (except for
HP UX case).
* configure.ac [($enable_shared=no || $enable_static=yes)
&& $host=*-*-cygwin*|*-*-mingw*|*-*-msys*] (CXXFLAGS): Add
-D GC_NOT_DLL; add comment.
$(srcdir)/include/gc.h c++ base_lib $(UTILS)
rm -f test_cpp$(EXEEXT)
./if_mach HP_PA HPUX $(CXX) $(CXXFLAGS) -o test_cpp $(srcdir)/tests/test_cpp.cc gc.a gccpp.a -ldld `./threadlibs`
- ./if_not_there test_cpp$(EXEEXT) || $(CXX) $(CXXFLAGS) -o test_cpp$(EXEEXT) $(srcdir)/tests/test_cpp.cc gc.a gccpp.a `./threadlibs`
+ ./if_not_there test_cpp$(EXEEXT) || $(CXX) $(CXXFLAGS) -DGC_NOT_DLL -o test_cpp$(EXEEXT) $(srcdir)/tests/test_cpp.cc gc.a gccpp.a `./threadlibs`
check-cpp: test_cpp$(EXEEXT)
./test_cpp
# Do not require the clients to link with "user32" system library.
AC_DEFINE([DONT_USE_USER32_DLL], 1,
[Do not use user32.dll import library (Win32).])
+ # Use inline version of GC new and delete operators in test_cpp
+ # otherwise the system ones might be used instead because of arbitrary
+ # ordering of object files when linking.
+ CXXFLAGS="$CXXFLAGS -DGC_NOT_DLL"
;;
esac
fi