public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldot at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/56781] New: boostrap-asan failure: fixincl fails to link (missing -lasan)
Date: Fri, 29 Mar 2013 13:33:00 -0000	[thread overview]
Message-ID: <bug-56781-4@http.gcc.gnu.org/bugzilla/> (raw)


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

             Bug #: 56781
           Summary: boostrap-asan failure: fixincl fails to link (missing
                    -lasan)
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: sanitizer
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: aldot@gcc.gnu.org
                CC: dodji@gcc.gnu.org, dvyukov@gcc.gnu.org,
                    jakub@gcc.gnu.org, kcc@gcc.gnu.org


bootstrap on x86_64-linux-gnu fails with:

/scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc
-B/scratch/obj.x86_64/gcc-4.9.mine/./gcc/
-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/bin/
-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/lib/ -isystem
/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/include -isystem
/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/sys-include    -Og -g3 -ggdb3
-static-libstdc++ -static-libgcc  -o fixincl fixincl.o fixtests.o fixfixes.o
server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a 
../libiberty/libiberty.a(regex.o): In function `byte_compile_range':
/scratch/obj.x86_64/gcc-4.9.mine/libiberty/../../../src/gcc-4.9.mine/libiberty/regex.c:4499:
undefined reference to `__asan_report_store1'
/scratch/obj.x86_64/gcc-4.9.mine/libiberty/../../../src/gcc-4.9.mine/libiberty/regex.c:4499:
undefined reference to `__asan_report_load1'
[snip]

we would obviously need to link against asan but it is not immediately obvious
to me how to pass POSTSTAGE1_LDFLAGS to fixincludes/

$ /scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc
-B/scratch/obj.x86_64/gcc-4.9.mine/./gcc/
-B/scratch/obj.x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/libsanitizer/asan
-B/scratch/obj.x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/libsanitizer/asan/.libs
-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/bin/
-B/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/lib/ -isystem
/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/include -isystem
/opt/x86_64/gcc-4.9.mine/x86_64-unknown-linux-gnu/sys-include    -Og -g3 -ggdb3
-static-libstdc++ -static-libgcc  -o fixincl fixincl.o fixtests.o fixfixes.o
server.o procopen.o fixlib.o fixopts.o ../libiberty/libiberty.a
-fsanitize=address -static-libasan
produces the desired fixincl

$ /scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/scratch/obj.x86_64/gcc-4.9.mine/./gcc/xgcc
Target: x86_64-unknown-linux-gnu
Configured with: ../../src/gcc-4.9.mine/configure -v
--enable-languages=c,lto,fortran,c++,go LD=/usr/bin/ld.bfd CFLAGS='-O2 -g3
-ggdb3' CXXFLAGS='-O2 -g3 -ggdb3' 'BOOT_CFLAGS=-O2 -g3 -ggdb3'
'BOOT_CXXFLAGS=-O2 -g3 -ggdb3' 'CFLAGS_FOR_TARGET=-Og -g3 -ggdb3'
'CXXFLAGS_FOR_TARGET=-Og -g3 -ggdb3' --prefix=/opt/x86_64/gcc-4.9.mine//
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--enable-threads=posix --program-suffix=-4.9.mine-HEAD
--with-build-config=bootstrap-asan --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=yes --enable-debug -C
--disable-intermodule --enable-multilib --disable-libstdcxx-pch
--enable-bootstrap --enable-checking=release --with-cpu=native
--with-tune=native --enable-plugin
Thread model: posix
gcc version 4.9.0 20130327 (experimental) [vnhoist revision
32ddde1:a851c38:065ec6e627efa59b32f9fb743368a4a55c4ac310] (GCC)


             reply	other threads:[~2013-03-29 13:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-29 13:33 aldot at gcc dot gnu.org [this message]
2013-03-29 16:20 ` [Bug sanitizer/56781] " hjl.tools at gmail dot com
2013-04-04 11:41 ` aldot at gcc dot gnu.org
2014-03-26  9:20 ` jakub at gcc dot gnu.org
2014-04-17 12:24 ` jakub at gcc dot gnu.org
2014-04-17 12:26 ` jakub at gcc dot gnu.org
2023-04-02 15:30 ` aldot at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56781-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).