public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rhill at gentoo dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled
Date: Tue, 13 May 2014 04:44:00 -0000	[thread overview]
Message-ID: <bug-61164-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 61164
           Summary: GCC 4.9.0 fails to build libitm with fortification
                    enabled
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libitm
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rhill at gentoo dot org

We enable -D_FORTIFY_SOURCE=2 by default, but with 4.9.0 we're encountering an
error while building libitm.  It can be reproduced without modifying the
compiler by configuring with:

CXXFLAGS="-O2 -g -D_FORTIFY_SOURCE=2" ../dist/gcc/gcc-4.9.0/configure
--enable-languages=c,c++ --disable-werror --disable-bootstrap

The error is:

libtool: compile:  /home/dirtyepic/build/./gcc/xg++
-B/home/dirtyepic/build/./gcc/ -nostdinc++ -nostdinc++
-I/home/dirtyepic/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu
-I/home/dirtyepic/build/x86_64-unknown-linux-gnu/libstdc++-v3/include
-I/home/dirtyepic/dist/gcc/gcc-4.9.0/libstdc++-v3/libsupc++
-I/home/dirtyepic/dist/gcc/gcc-4.9.0/libstdc++-v3/include/backward
-I/home/dirtyepic/dist/gcc/gcc-4.9.0/libstdc++-v3/testsuite/util
-L/home/dirtyepic/build/x86_64-unknown-linux-gnu/libstdc++-v3/src
-L/home/dirtyepic/build/x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs
-L/home/dirtyepic/build/x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs
-B/usr/local/x86_64-unknown-linux-gnu/bin/
-B/usr/local/x86_64-unknown-linux-gnu/lib/ -isystem
/usr/local/x86_64-unknown-linux-gnu/include -isystem
/usr/local/x86_64-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I.
-I../../../dist/gcc/gcc-4.9.0/libitm
-I../../../dist/gcc/gcc-4.9.0/libitm/config/linux/x86
-I../../../dist/gcc/gcc-4.9.0/libitm/config/linux
-I../../../dist/gcc/gcc-4.9.0/libitm/config/x86
-I../../../dist/gcc/gcc-4.9.0/libitm/config/posix
-I../../../dist/gcc/gcc-4.9.0/libitm/config/generic
-I../../../dist/gcc/gcc-4.9.0/libitm -mrtm -Wall -pthread -Werror -std=gnu++0x
-funwind-tables -fno-exceptions -fno-rtti -fabi-version=4 -O2 -g
-D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -MT util.lo -MD -MP -MF .deps/util.Tpo -c
../../../dist/gcc/gcc-4.9.0/libitm/util.cc  -fPIC -DPIC -o .libs/util.o

In file included from /usr/include/stdio.h:937:0,
                 from ../../../dist/gcc/gcc-4.9.0/libitm/util.cc:27:
/usr/include/bits/stdio2.h: In function ‘void GTM::gtm_verror(const char*,
__va_list_tag*)’:
/usr/include/bits/stdio2.h:124:1: error: inlining failed in call to
always_inline ‘int vfprintf(FILE*, const char*, __va_list_tag*)’: function body
can be overwritten at link time
 vfprintf (FILE *__restrict __stream,
 ^
../../../dist/gcc/gcc-4.9.0/libitm/util.cc:35:31: error: called from here
   vfprintf (stderr, fmt, list);
                               ^

Comparing the preprocessor output for util.cc and a couple other C++ files that
use vfprintf the most obvious difference is the declaration is missing
__inline, ie.

extern __attribute__((always_inline)) __attribute__ ((__gnu_inline__))
__attribute__ ((__artificial__)) int vfprintf

instead of

extern __inline __attribute__ ((__always_inline__)) __attribute__
((__gnu_inline__)) __attribute__ ((__artificial__)) int vfprintf
>From gcc-bugs-return-451395-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 13 04:46:14 2014
Return-Path: <gcc-bugs-return-451395-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19600 invoked by alias); 13 May 2014 04:46:13 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 19552 invoked by uid 48); 13 May 2014 04:46:05 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/61162] possibly bad error location with -Wc++-compat
Date: Tue, 13 May 2014 04:46:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.10.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to target_milestone everconfirmed
Message-ID: <bug-61162-4-SFwSZZ4Tz4@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-61162-4@http.gcc.gnu.org/bugzilla/>
References: <bug-61162-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-05/txt/msg01087.txt.bz2
Content-length: 699

https://gcc.gnu.org/bugzilla/show_bug.cgi?ida162

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-05-13
                 CC|                            |mpolacek at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |4.10.0
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yep.


             reply	other threads:[~2014-05-13  4:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  4:44 rhill at gentoo dot org [this message]
2014-06-25 10:59 ` [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when " iliyapalachev at gmail dot com
2014-09-27 14:05 ` glebfm at altlinux dot org
2014-09-27 18:26 ` glebfm at altlinux dot org
2015-08-24 17:49 ` glebfm at altlinux dot 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-61164-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).