From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4136 invoked by alias); 2 Dec 2018 23:41:15 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 4041 invoked by uid 48); 2 Dec 2018 23:41:11 -0000 From: "slyfox at inbox dot ru" To: elfutils-devel@sourceware.org Subject: [Bug general/23914] Add --disable-werror to ./configure support (example trigger: CFLAGS=-Og Date: Sun, 02 Dec 2018 23:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: general X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox at inbox dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q4/txt/msg00211.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23914 --- Comment #4 from Sergei Trofimovich --- (In reply to Mark Wielaard from comment #3) > (In reply to Sergei Trofimovich from comment #2) > > Gentoo allows users to control CC and CFLAGS and thus the space for get= ting > > a warning is wide. People frequently use things like -Wcast-qual or oth= er > > high signal-to-noise flags for their purposes. >=20 > If they do and don't care about the warnings, then why don't they simply = add > -Wno-error too? I'm not sure it works when CFLAGS are set system-wide (instead of per-packa= ge basis). A few packages do feature testing with -Werror set and insist on ke= ep doing it. Gentoo can pass CFLAGS=3D"-Wno-error ${USER_CFLAGS}" to elfutils package unconditionally as part of a build script if it's a supported configuration upstream. It should be good enough alternative to --disable-werror. > > 2. CFLAGS=3D"-g -O2 -Wstack-protector" > >=20 > > CC readelf.o > > readelf.c: In function 'open_input_section': > > readelf.c:581:1: error: stack protector not protecting local variable= s: > > variable length buffer [-Werror=3Dstack-protector] > > open_input_section (int fd) > > ^~~~~~~~~~~~~~~~~~ >=20 > That in itself wouldn't warn. I assume you are using > -fstack-protector[-all|strong] too. Ah, right. Gentoo's gcc is configured with --enable-default-ssp (#define __SSP_STRONG__ 3). That's why enabling warning alone is enough. --=20 You are receiving this mail because: You are on the CC list for the bug.