public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled
@ 2014-05-13  4:44 rhill at gentoo dot org
  2014-06-25 10:59 ` [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when " iliyapalachev at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rhill at gentoo dot org @ 2014-05-13  4:44 UTC (permalink / raw)
  To: gcc-bugs

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.


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

* [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when fortification enabled
  2014-05-13  4:44 [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled rhill at gentoo dot org
@ 2014-06-25 10:59 ` iliyapalachev at gmail dot com
  2014-09-27 14:05 ` glebfm at altlinux dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: iliyapalachev at gmail dot com @ 2014-06-25 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

Ilya Palachev <iliyapalachev at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iliyapalachev at gmail dot com

--- Comment #1 from Ilya Palachev <iliyapalachev at gmail dot com> ---
I have the same build error.

The build error is reproduced with Linaro GCC 4.9 2014.06 release.

Also switching off -D_FORTIFY_SOURCE=2 helps.


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

* [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when fortification enabled
  2014-05-13  4:44 [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled rhill at gentoo dot org
  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
  3 siblings, 0 replies; 5+ messages in thread
From: glebfm at altlinux dot org @ 2014-09-27 14:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Gleb Pfotenhauer-Malinowski <glebfm at altlinux dot org> ---
Patch: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02460.html


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

* [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when fortification enabled
  2014-05-13  4:44 [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled rhill at gentoo dot org
  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
  3 siblings, 0 replies; 5+ messages in thread
From: glebfm at altlinux dot org @ 2014-09-27 18:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Gleb Pfotenhauer-Malinowski <glebfm at altlinux dot org> ---
https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02469.html

Sorry, previous patch is incomplete.


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

* [Bug bootstrap/61164] GCC 4.9.0 fails to build libitm when fortification enabled
  2014-05-13  4:44 [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled rhill at gentoo dot org
                   ` (2 preceding siblings ...)
  2014-09-27 18:26 ` glebfm at altlinux dot org
@ 2015-08-24 17:49 ` glebfm at altlinux dot org
  3 siblings, 0 replies; 5+ messages in thread
From: glebfm at altlinux dot org @ 2015-08-24 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Gleb Pfotenhauer-Malinowski <glebfm at altlinux dot org> ---
Seems to be fixed with:
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=227040


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

end of thread, other threads:[~2015-08-24 17:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13  4:44 [Bug libitm/61164] New: GCC 4.9.0 fails to build libitm with fortification enabled rhill at gentoo dot org
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

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).