public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/55533] New: Can't bootstrap libsanitizer
@ 2012-11-29 20:19 hjl.tools at gmail dot com
  2012-11-29 20:22 ` [Bug sanitizer/55533] " hjl.tools at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-29 20:19 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55533

             Bug #: 55533
           Summary: Can't bootstrap libsanitizer
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: hjl.tools@gmail.com
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


Created attachment 28830
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28830
A patch to boostrap libsanitizer

When bootstrap libsanitizer with

target_modules = { module= libsanitizer;
                   bootstrap=true;
                   lib_path=.libs; };

on Linux/ia32 and Linux/x86-64, I got

/bin/sh ../libtool --tag=CXX   --mode=compile
/export/build/gnu/gcc/build-x86_64-linux/./gcc/xg++
-B/export/build/gnu/gcc/build-x86_64-linux/./gcc/ -nostdinc++
-funconfigured-libstdc++-v3
-L/export/build/gnu/gcc/build-x86_64-linux/x86_64-unknown-linux-gnu/libstdc++-v3/src
-L/export/build/gnu/gcc/build-x86_64-linux/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-B/usr/gcc-4.8.0/x86_64-unknown-linux-gnu/bin/
-B/usr/gcc-4.8.0/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/gcc-4.8.0/x86_64-unknown-linux-gnu/include -isystem
/usr/gcc-4.8.0/x86_64-unknown-linux-gnu/sys-include    -D_GNU_SOURCE -D_DEBUG
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS  -I.
-I/export/gnu/import/git/gcc/libsanitizer/interception  -I
/export/gnu/import/git/gcc/libsanitizer/include   -Wall -W
-Wno-unused-parameter -Wwrite-strings -pedantic -Wno-long-long  -fPIC
-fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables
-fvisibility=hidden -Wno-variadic-macros -Wno-c99-extensions  -g -O2
-D_GNU_SOURCE -c -o interception_linux.lo
/export/gnu/import/git/gcc/libsanitizer/interception/interception_linux.cc
xg++: error: unrecognized command line option ‘-funconfigured-libstdc++-v3’
make[5]: *** [interception_linux.lo] Error 1
make[5]: *** Waiting for unfinished jobs....

From Makefile.tpl:

# CXX_FOR_TARGET is tricky to get right for target libs that require a
# functional C++ compiler.  When we recurse, if we expand
# CXX_FOR_TARGET before configuring libstdc++-v3, we won't get
# libstdc++ include flags from the script.  Instead, we get an
# -funconfigured-* word, so that we'll get errors if this invalid C++
# command line is used for anything, but also so that we can use the
# word to decide whether or not to pass on this CXX_FOR_TARGET.  If we
# don't pass it on, sub-make will use the default definition, that
# re-expands it at the time of use, so we'll get it right when we need
# it.  One potential exception is the expansion of CXX_FOR_TARGET
# passed down as part of CXX within TARGET_FLAGS, but this wouldn't
# really work, for C++ host programs can't depend on the current-stage
# C++ target library.
CXX_FOR_TARGET_FLAG_TO_PASS = \
        $(shell if echo "$(CXX_FOR_TARGET)" | grep " -funconfigured-"
> /dev/null; then :; else echo '"CXX_FOR_TARGET=$(CXX_FOR_TARGET)"';
fi)

When we expand CXX_FOR_TARGET for libsanitizer before configuring it,
libstdc++-v3/scripts/testsuite_flags isn't available yet.  The solution
is to set raw_cxx=true and use -I to include libstdc++ header file
explicitly when the C++ library is used for bootstrap.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/55533] Can't bootstrap libsanitizer
  2012-11-29 20:19 [Bug sanitizer/55533] New: Can't bootstrap libsanitizer hjl.tools at gmail dot com
@ 2012-11-29 20:22 ` hjl.tools at gmail dot com
  2012-12-11 21:32 ` hjl at gcc dot gnu.org
  2012-12-11 23:40 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-11-29 20:22 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55533

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2012-11/msg02480.htm
                   |                            |l
   Last reconfirmed|                            |2012-11-29
   Target Milestone|---                         |4.8.0
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-11-29 20:21:37 UTC ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02480.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/55533] Can't bootstrap libsanitizer
  2012-11-29 20:19 [Bug sanitizer/55533] New: Can't bootstrap libsanitizer hjl.tools at gmail dot com
  2012-11-29 20:22 ` [Bug sanitizer/55533] " hjl.tools at gmail dot com
@ 2012-12-11 21:32 ` hjl at gcc dot gnu.org
  2012-12-11 23:40 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl at gcc dot gnu.org @ 2012-12-11 21:32 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55533

--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2012-12-11 21:32:15 UTC ---
Author: hjl
Date: Tue Dec 11 21:32:11 2012
New Revision: 194424

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194424
Log:
Add libstdc++-raw-cxx.m4 and use it in libsanitizer

config/

    PR sanitizer/55533
    * libstdc++-raw-cxx.m4: New file.

libsanitizer/

    PR sanitizer/55533
    * Makefile.am (AM_MAKEFLAGS): Remove CC and CXX.
    * configure.ac (GCC_LIBSTDCXX_RAW_CXX_FLAGS): New.
    * asan/Makefile.am (AM_CXXFLAGS): Add $(LIBSTDCXX_RAW_CXX_CXXFLAGS).
    (AM_MAKEFLAGS): Remove CC and CXX.
    * interception/Makefile.am: Likewise.
    * sanitizer_common/Makefile.am: Likewise.
    * tsan/Makefile.am: Likewise.
    * Makefile.in: Regenerated.
    * aclocal.m4: Likewise.
    * configure: Likewise.
    * asan/Makefile.in: Likewise.
    * interception/Makefile.in: Likewise.
    * sanitizer_common/Makefile.in: Likewise.
    * tsan/Makefile.in: Likewise.

Added:
    trunk/config/libstdc++-raw-cxx.m4
Modified:
    trunk/config/ChangeLog
    trunk/libsanitizer/ChangeLog
    trunk/libsanitizer/Makefile.am
    trunk/libsanitizer/Makefile.in
    trunk/libsanitizer/aclocal.m4
    trunk/libsanitizer/asan/Makefile.am
    trunk/libsanitizer/asan/Makefile.in
    trunk/libsanitizer/configure
    trunk/libsanitizer/configure.ac
    trunk/libsanitizer/interception/Makefile.am
    trunk/libsanitizer/interception/Makefile.in
    trunk/libsanitizer/sanitizer_common/Makefile.am
    trunk/libsanitizer/sanitizer_common/Makefile.in
    trunk/libsanitizer/tsan/Makefile.am
    trunk/libsanitizer/tsan/Makefile.in


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug sanitizer/55533] Can't bootstrap libsanitizer
  2012-11-29 20:19 [Bug sanitizer/55533] New: Can't bootstrap libsanitizer hjl.tools at gmail dot com
  2012-11-29 20:22 ` [Bug sanitizer/55533] " hjl.tools at gmail dot com
  2012-12-11 21:32 ` hjl at gcc dot gnu.org
@ 2012-12-11 23:40 ` hjl.tools at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2012-12-11 23:40 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55533

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-12-11 23:39:49 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-11 23:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-29 20:19 [Bug sanitizer/55533] New: Can't bootstrap libsanitizer hjl.tools at gmail dot com
2012-11-29 20:22 ` [Bug sanitizer/55533] " hjl.tools at gmail dot com
2012-12-11 21:32 ` hjl at gcc dot gnu.org
2012-12-11 23:40 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).