From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6328 invoked by alias); 3 Jan 2013 17:18:59 -0000 Received: (qmail 6309 invoked by uid 22791); 3 Jan 2013 17:18:56 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_IB X-Spam-Check-By: sourceware.org Received: from mail-qa0-f46.google.com (HELO mail-qa0-f46.google.com) (209.85.216.46) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Jan 2013 17:18:48 +0000 Received: by mail-qa0-f46.google.com with SMTP id r4so12750634qaq.12 for ; Thu, 03 Jan 2013 09:18:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.173.102 with SMTP id o38mr6281914qcz.139.1357233527374; Thu, 03 Jan 2013 09:18:47 -0800 (PST) Received: by 10.49.12.210 with HTTP; Thu, 3 Jan 2013 09:18:47 -0800 (PST) In-Reply-To: References: <20130102111116.GP2315@tucnak.redhat.com> Date: Thu, 03 Jan 2013 17:18:00 -0000 Message-ID: Subject: Re: Use libstdc++-raw-cxx.m4 in libjava From: "H.J. Lu" To: Andreas Schwab Cc: Jakub Jelinek , Paolo Bonzini , DJ Delorie , neroden@gcc.gnu.org, Alexandre Oliva , Ralf Wildenhues , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00129.txt.bz2 On Wed, Jan 2, 2013 at 3:27 AM, Andreas Schwab wrote: > Jakub Jelinek writes: > >> On Tue, Dec 11, 2012 at 02:00:18PM -0800, H.J. Lu wrote: >>> 2012-12-11 H.J. Lu >>> >>> * libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Also >>> AC_SUBST LIBSTDCXX_RAW_CXX_LDFLAGS. >> >>> --- 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" >> >> -I..../libstdc++-v3/src/libstdc++.la ? That can't be right, libstdc++.la >> is not a directory containing header files. > > And a library shouldn't be put on LDFLAGS, but on LIBADD. And > LIBSTDCXX_RAW_CXX_LDLAGS doesn't exist. > Here is the patch. OK to install? Thanks. -- H.J. --- config/ 2013-01-03 H.J. Lu * libstdc++-raw-cxx.m4 (GCC_LIBSTDCXX_RAW_CXX_FLAGS): Replace LIBSTDCXX_RAW_CXX_LDFLAGS with LIBSTDCXX_RAW_CXX_LIBADD. libjava/ 2013-01-03 H.J. Lu * Makefile.am (lib_gnu_awt_xlib_la_LDFLAGS): Replace LIBSTDCXX_RAW_CXX_LDLAGS with LIBSTDCXX_RAW_CXX_LIBADD. * Makefile.in: Regenerated. libsanitizer/ 2013-01-03 H.J. Lu * asan/Makefile.am (libasan_la_LIBADD): Replace LIBSTDCXX_RAW_CXX_LDLAGS with LIBSTDCXX_RAW_CXX_LIBADD. * 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. diff --git a/config/libstdc++-raw-cxx.m4 b/config/libstdc++-raw-cxx.m4 index 8052c2f..d7aa1a9 100644 --- a/config/libstdc++-raw-cxx.m4 +++ b/config/libstdc++-raw-cxx.m4 @@ -23,8 +23,8 @@ AC_DEFUN([GCC_LIBSTDCXX_RAW_CXX_FLAGS], [ -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" + LIBSTDCXX_RAW_CXX_LIBADD="\ + \$(top_builddir)/../libstdc++-v3/src/libstdc++.la" AC_SUBST(LIBSTDCXX_RAW_CXX_CXXFLAGS) - AC_SUBST(LIBSTDCXX_RAW_CXX_LDFLAGS) + AC_SUBST(LIBSTDCXX_RAW_CXX_LIBADD) ]) diff --git a/libjava/Makefile.am b/libjava/Makefile.am index c6c84e4..dd08a4f 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -594,7 +594,7 @@ lib_gnu_awt_xlib_la_CPPFLAGS = \ $(AM_CPPFLAGS) \ $(LIBSTDCXX_RAW_CXX_CXXFLAGS) ## The mysterious backslash in the grep pattern is consumed by make. -lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LDLAGS) \ +lib_gnu_awt_xlib_la_LDFLAGS = $(LIBSTDCXX_RAW_CXX_LIBADD) \ @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/libsanitizer/asan/Makefile.am b/libsanitizer/asan/Makefile.am index 76cdcfd..b5a61ec 100644 --- a/libsanitizer/asan/Makefile.am +++ b/libsanitizer/asan/Makefile.am @@ -40,7 +40,7 @@ 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 endif -libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LDLAGS) +libasan_la_LIBADD += $(LIBSTDCXX_RAW_CXX_LIBADD) libasan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl diff --git a/libsanitizer/tsan/Makefile.am b/libsanitizer/tsan/Makefile.am index 435fe71..62e339e 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 $(LIBSTDCXX_RAW_CXX_LDLAGS) +libtsan_la_LIBADD = $(top_builddir)/sanitizer_common/libsanitizer_common.la $(top_builddir)/interception/libinterception.la $(LIBSTDCXX_RAW_CXX_LIBADD) libtsan_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` -lpthread -ldl # Work around what appears to be a GNU make bug handling MAKEFLAGS