diff --git a/config/ChangeLog b/config/ChangeLog index 77b4a6549e6..d77edc07e26 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2012-12-12 H.J. Lu + + * libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Also + AC_SUBST LIBSTDCXX_RAW_CXX_LDFLAGS. + 2012-12-11 H.J. Lu PR sanitizer/55533 diff --git a/config/libstdc++-raw-cxx.m4 b/config/libstdc++-raw-cxx.m4 index 20124e38349..8052c2fa830 100644 --- a/config/libstdc++-raw-cxx.m4 +++ b/config/libstdc++-raw-cxx.m4 @@ -14,13 +14,17 @@ # along with GCC; see the file COPYING3. If not see # . -# Define compiler flags, LIBSTDCXX_RAW_CXX_CXXFLAGS, for libstdc++-v3 -# header files to compile libraries in C++ with raw_cxx=true. +# Define flags, LIBSTDCXX_RAW_CXX_CXXFLAGS and # LIBSTDCXX_RAW_CXX_LDFLAGS, +# for libstdc++-v3 header files to compile and link libraries in C++ with +# raw_cxx=true. AC_DEFUN([GCC_LIBSTDCXX_RAW_CXX_FLAGS], [ AC_REQUIRE([ACX_NONCANONICAL_TARGET]) LIBSTDCXX_RAW_CXX_CXXFLAGS="\ -I\$(top_builddir)/../libstdc++-v3/include \ -I\$(top_builddir)/../libstdc++-v3/include/\$(target_noncanonical) \ -I\$(top_srcdir)/../libstdc++-v3/libsupc++" + LIBSTDCXX_RAW_CXX_LDFLAGS="\ + -I\$(top_builddir)/../libstdc++-v3/src/libstdc++.la" AC_SUBST(LIBSTDCXX_RAW_CXX_CXXFLAGS) + AC_SUBST(LIBSTDCXX_RAW_CXX_LDFLAGS) ]) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index bfc8091c231..fa62d1ec50f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,13 @@ +2012-12-12 H.J. Lu + + * Makefile.am (lib_gnu_awt_xlib_la_CPPFLAGS): Use + $(LIBSTDCXX_RAW_CXX_CXXLAGS). + (lib_gnu_awt_xlib_la_LDFLAGS): Use $(LIBSTDCXX_RAW_CXX_LDLAGS). + * configure.ac (GCC_LIBSTDCXX_RAW_CXX_FLAGS): New. + * aclocal.m4: Regenerated. + * Makefile.in:Likewise. + * configure: Likewise. + 2012-11-19 Matthias Klose * libtool-version: Bump soversion. diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 1b7196285aa..c6c84e4fc6a 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -590,14 +590,11 @@ lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar \ if BUILD_SUBLIBS lib_gnu_awt_xlib_la_DEPENDENCIES += libgcj-noncore.la endif -## We require libstdc++-v3 to be in the same build tree. lib_gnu_awt_xlib_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ - -I../libstdc++-v3/include \ - -I../libstdc++-v3/include/$(target_noncanonical) \ - -I$(srcdir)/../libstdc++-v3/libsupc++ + $(LIBSTDCXX_RAW_CXX_CXXFLAGS) ## The mysterious backslash in the grep pattern is consumed by make. -lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \ +lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDLAGS) \ @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \ -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) diff --git a/libjava/Makefile.in b/libjava/Makefile.in index 1380a7ef633..3544abe50d2 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -99,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/libltdl/acinclude.m4 \ $(top_srcdir)/../config/lib-ld.m4 \ $(top_srcdir)/../config/lib-link.m4 \ $(top_srcdir)/../config/lib-prefix.m4 \ + $(top_srcdir)/../config/libstdc++-raw-cxx.m4 \ $(top_srcdir)/../config/lthostflags.m4 \ $(top_srcdir)/../config/multi.m4 \ $(top_srcdir)/../config/no-executables.m4 \ @@ -619,6 +620,8 @@ LIBMATHSPEC = @LIBMATHSPEC@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXXSPEC = @LIBSTDCXXSPEC@ +LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -1133,11 +1136,9 @@ lib_gnu_awt_xlib_la_DEPENDENCIES = libgcj-$(gcc_version).jar libgcj.la \ $(lib_gnu_awt_xlib_la_LIBADD) $(am__append_21) lib_gnu_awt_xlib_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ - -I../libstdc++-v3/include \ - -I../libstdc++-v3/include/$(target_noncanonical) \ - -I$(srcdir)/../libstdc++-v3/libsupc++ + $(LIBSTDCXX_RAW_CXX_CXXFLAGS) -lib_gnu_awt_xlib_la_LDFLAGS = ../libstdc++-v3/src/libstdc++.la \ +lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDLAGS) \ @X_PRE_LIBS@ @X_LIBS@ -lX11 @X_EXTRA_LIBS@ \ -rpath $(toolexeclibdir) $(LIBJAVA_LDFLAGS_NOUNDEF) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LIBGCJ_LD_SYMBOLIC) diff --git a/libjava/aclocal.m4 b/libjava/aclocal.m4 index b1991de0f5f..ec1285941dc 100644 --- a/libjava/aclocal.m4 +++ b/libjava/aclocal.m4 @@ -1034,6 +1034,7 @@ m4_include([../config/lead-dot.m4]) m4_include([../config/lib-ld.m4]) m4_include([../config/lib-link.m4]) m4_include([../config/lib-prefix.m4]) +m4_include([../config/libstdc++-raw-cxx.m4]) m4_include([../config/lthostflags.m4]) m4_include([../config/multi.m4]) m4_include([../config/no-executables.m4]) diff --git a/libjava/configure b/libjava/configure index 53ab75412a8..44acaeb8f69 100755 --- a/libjava/configure +++ b/libjava/configure @@ -856,6 +856,8 @@ CREATE_GJDOC_TRUE ANTLR_JAR mkinstalldirs LN_S +LIBSTDCXX_RAW_CXX_LDFLAGS +LIBSTDCXX_RAW_CXX_CXXFLAGS target_noncanonical target_os target_vendor @@ -3195,6 +3197,20 @@ esac + + + + + LIBSTDCXX_RAW_CXX_CXXFLAGS="\ + -I\$(top_builddir)/../libstdc++-v3/include \ + -I\$(top_builddir)/../libstdc++-v3/include/\$(target_noncanonical) \ + -I\$(top_srcdir)/../libstdc++-v3/libsupc++" + LIBSTDCXX_RAW_CXX_LDFLAGS="\ + -I\$(top_builddir)/../libstdc++-v3/src/libstdc++.la" + + + + # This works around the fact that libtool configuration may change LD # for this particular configuration, but some shells, instead of # keeping the changes in LD private, export them just because LD is @@ -13366,7 +13382,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13369 "configure" +#line 13385 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13472,7 +13488,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 13475 "configure" +#line 13491 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -19467,7 +19483,7 @@ if test "${enable_sjlj_exceptions+set}" = set; then : enableval=$enable_sjlj_exceptions; : else cat > conftest.$ac_ext << EOF -#line 19470 "configure" +#line 19486 "configure" struct S { ~S(); }; void bar(); void foo() diff --git a/libjava/configure.ac b/libjava/configure.ac index 5fa75c6d573..ba6b3632b92 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -24,6 +24,8 @@ _GCC_TOPLEV_NONCANONICAL_TARGET AC_SUBST(target_noncanonical) +GCC_LIBSTDCXX_RAW_CXX_FLAGS + # This works around the fact that libtool configuration may change LD # for this particular configuration, but some shells, instead of # keeping the changes in LD private, export them just because LD is diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog index c6fbb14c778..aa26e3eeaa3 100644 --- a/libsanitizer/ChangeLog +++ b/libsanitizer/ChangeLog @@ -1,3 +1,14 @@ +2012-12-12 H.J. Lu + + * asan/Makefile.am (libasan_la_LIBADD): Use $(LIBSTDCXX_RAW_CXX_LDLAGS). + * tsan/Makefile.am (libtsan_la_LIBADD): Likewise. + * Makefile.in: Regenerated. + * configure: Likewise. + * asan/Makefile.in: Likewise. + * interception/Makefile.in: Likewise. + * sanitizer_common/Makefile.in: Likewise. + * tsan/Makefile.in: Likewise. + 2012-12-12 H.J. Lu * Makefile.am (AM_MAKEFLAGS): Removed. diff --git a/libsanitizer/Makefile.in b/libsanitizer/Makefile.in index 45db6347dce..42cde43cfaa 100644 --- a/libsanitizer/Makefile.in +++ b/libsanitizer/Makefile.in @@ -158,6 +158,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ diff --git a/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am index 2e6fc8915a0..fcd145ccb31 100644 --- a/libsanitizer/asan/Makefile.am +++ b/libsanitizer/asan/Makefile.am @@ -36,10 +36,11 @@ asan_files = \ libasan_la_SOURCES = $(asan_files) if USING_MAC_INTERPOSE libasan_la_SOURCES += dynamic/asan_interceptors_dynamic.cc -libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la +libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la else -libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la +libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la endif +libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDLAGS) libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl diff --git a/libsanitizer/asan/Makefile.in b/libsanitizer/asan/Makefile.in index b841f017040..9a397bc3f67 100644 --- a/libsanitizer/asan/Makefile.in +++ b/libsanitizer/asan/Makefile.in @@ -79,10 +79,8 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) @USING_MAC_INTERPOSE_FALSE@libasan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la \ -@USING_MAC_INTERPOSE_FALSE@ $(top_builddir)/interception/libinterception.la \ -@USING_MAC_INTERPOSE_FALSE@ $(top_builddir)/../libstdc++-v3/src/libstdc++.la -@USING_MAC_INTERPOSE_TRUE@libasan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la \ -@USING_MAC_INTERPOSE_TRUE@ $(top_builddir)/../libstdc++-v3/src/libstdc++.la +@USING_MAC_INTERPOSE_FALSE@ $(top_builddir)/interception/libinterception.la +@USING_MAC_INTERPOSE_TRUE@libasan_la_DEPENDENCIES = $(top_builddir)/sanitizer_common/libsanitizer_common.la am__libasan_la_SOURCES_DIST = asan_allocator.cc asan_interceptors.cc \ asan_mac.cc asan_malloc_mac.cc asan_new_delete.cc \ asan_posix.cc asan_rtl.cc asan_stats.cc \ @@ -165,6 +163,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -286,8 +285,11 @@ asan_files = \ asan_win.cc libasan_la_SOURCES = $(asan_files) $(am__append_2) -@USING_MAC_INTERPOSE_FALSE@libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la -@USING_MAC_INTERPOSE_TRUE@libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la +@USING_MAC_INTERPOSE_FALSE@libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la \ +@USING_MAC_INTERPOSE_FALSE@ $(top_builddir)/interception/libinterception.la \ +@USING_MAC_INTERPOSE_FALSE@ $(LIBSTDCXX_RAW_CXX_LDLAGS) +@USING_MAC_INTERPOSE_TRUE@libasan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la \ +@USING_MAC_INTERPOSE_TRUE@ $(LIBSTDCXX_RAW_CXX_LDLAGS) libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl all: all-am diff --git a/libsanitizer/configure b/libsanitizer/configure index ab71cb878e4..cd720778324 100755 --- a/libsanitizer/configure +++ b/libsanitizer/configure @@ -686,6 +686,7 @@ am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM +LIBSTDCXX_RAW_CXX_LDFLAGS LIBSTDCXX_RAW_CXX_CXXFLAGS target_noncanonical target_os @@ -2593,6 +2594,9 @@ esac -I\$(top_builddir)/../libstdc++-v3/include \ -I\$(top_builddir)/../libstdc++-v3/include/\$(target_noncanonical) \ -I\$(top_srcdir)/../libstdc++-v3/libsupc++" + LIBSTDCXX_RAW_CXX_LDFLAGS="\ + -I\$(top_builddir)/../libstdc++-v3/src/libstdc++.la" + @@ -11107,7 +11111,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11110 "configure" +#line 11114 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11213,7 +11217,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11216 "configure" +#line 11220 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libsanitizer/interception/Makefile.in b/libsanitizer/interception/Makefile.in index f820654d0a3..d1c4dcb10df 100644 --- a/libsanitizer/interception/Makefile.in +++ b/libsanitizer/interception/Makefile.in @@ -118,6 +118,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ diff --git a/libsanitizer/sanitizer_common/Makefile.in b/libsanitizer/sanitizer_common/Makefile.in index 8274a277a81..8ef3d9a63f1 100644 --- a/libsanitizer/sanitizer_common/Makefile.in +++ b/libsanitizer/sanitizer_common/Makefile.in @@ -123,6 +123,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am index 08bf2f9ad60..d7719ae9d8f 100644 --- a/libsanitizer/tsan/Makefile.am +++ b/libsanitizer/tsan/Makefile.am @@ -34,7 +34,7 @@ tsan_files = \ tsan_symbolize_addr2line_linux.cc libtsan_la_SOURCES = $(tsan_files) -libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la +libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LDLAGS) libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl ## ################################################################ diff --git a/libsanitizer/tsan/Makefile.in b/libsanitizer/tsan/Makefile.in index acce437f354..8d3f30e40cd 100644 --- a/libsanitizer/tsan/Makefile.in +++ b/libsanitizer/tsan/Makefile.in @@ -78,8 +78,7 @@ am__installdirs = "$(DESTDIR)$(toolexeclibdir)" LTLIBRARIES = $(toolexeclib_LTLIBRARIES) libtsan_la_DEPENDENCIES = \ $(top_builddir)/sanitizer_common/libsanitizer_common.la \ - $(top_builddir)/interception/libinterception.la \ - $(top_builddir)/../libstdc++-v3/src/libstdc++.la + $(top_builddir)/interception/libinterception.la am__objects_1 = tsan_clock.lo tsan_interface_atomic.lo tsan_mutex.lo \ tsan_report.lo tsan_rtl_thread.lo tsan_symbolize.lo \ tsan_flags.lo tsan_interface.lo tsan_platform_linux.lo \ @@ -151,6 +150,7 @@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSTDCXX_RAW_CXX_CXXFLAGS = @LIBSTDCXX_RAW_CXX_CXXFLAGS@ +LIBSTDCXX_RAW_CXX_LDFLAGS = @LIBSTDCXX_RAW_CXX_LDFLAGS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -274,7 +274,7 @@ tsan_files = \ tsan_symbolize_addr2line_linux.cc libtsan_la_SOURCES = $(tsan_files) -libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(top_builddir)/../libstdc++-v3/src/libstdc++.la +libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LDLAGS) libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl all: all-am