public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "steven at uplinklabs dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/65828] [LTO] ICE in streamer_get_builtin_tree, at tree-streamer-in.c:1127
Date: Tue, 21 Apr 2015 10:32:00 -0000	[thread overview]
Message-ID: <bug-65828-4-lXMUHDMZnI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65828-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65828

--- Comment #2 from Steven Noonan <steven at uplinklabs dot net> ---
I just noticed that libtool appears to be stripping some of the arguments in
LDFLAGS when invoking GCC:

/bin/sh ../libtool  --tag=CC   --mode=link gcc -flto -Wall -Wstrict-prototypes
-Werror=declaration-after-statement -Werror=missing-prototypes
-Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self
-Werror=format=2 -Werror=missing-include-dirs -fvisibility=hidden -O2
-fsanitize=undefined -Wl,-Bsymbolic-functions  -version-info 4400:0:4400
-export-dynamic  -O2 -fsanitize=undefined -o libglib-2.0.la -rpath
/usr/local/lib [[.lo files]] libcharset/libcharset.la pcre/libpcre.la 
-lpthread

libtool: link: gcc -flto -shared  -fPIC -DPIC  [[.o files]] 
-Wl,--whole-archive libcharset/.libs/libcharset.a pcre/.libs/libpcre.a
-Wl,--no-whole-archive  -lpthread  -flto -O2 -Wl,-Bsymbolic-functions -O2  
-Wl,-soname -Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.4400.0

In particular it dropped the -fsanitize=undefined flag.

If I invoke the libtool-generated GCC command line with '-fsanitize=undefined'
added then there's no ICE.

$ gcc -flto -shared  -fPIC -DPIC  [[.o files]]  -Wl,--whole-archive
libcharset/.libs/libcharset.a pcre/.libs/libpcre.a -Wl,--no-whole-archive 
-lpthread  -flto -O2 -Wl,-Bsymbolic-functions -O2   -Wl,-soname
-Wl,libglib-2.0.so.0 -o .libs/libglib-2.0.so.0.4400.0 -fsanitize=undefined
$ ls -cahl .libs/libglib-2.0.so.0.4400.0
-rwxr-xr-x 1 snoonan snoonan 4.3M Apr 21 03:31 .libs/libglib-2.0.so.0.4400.0

Hmm.


  parent reply	other threads:[~2015-04-21 10:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-65828-4@http.gcc.gnu.org/bugzilla/>
2015-04-21 10:23 ` steven at uplinklabs dot net
2015-04-21 10:32 ` steven at uplinklabs dot net [this message]
2015-04-21 12:39 ` [Bug sanitizer/65828] " rguenth at gcc dot gnu.org
2015-04-21 12:50 ` jakub at gcc dot gnu.org
2015-04-21 12:55 ` mpolacek at gcc dot gnu.org
2015-07-30 18:04 ` zeccav at gmail dot com
2015-07-30 18:08 ` trippels at gcc dot gnu.org
2022-01-09  9:36 ` pinskia 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-65828-4-lXMUHDMZnI@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).