From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4138 invoked by alias); 11 Jan 2015 17:39:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 4127 invoked by uid 89); 11 Jan 2015 17:39:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f53.google.com Received: from mail-oi0-f53.google.com (HELO mail-oi0-f53.google.com) (209.85.218.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 11 Jan 2015 17:39:25 +0000 Received: by mail-oi0-f53.google.com with SMTP id g201so17887592oib.12 for ; Sun, 11 Jan 2015 09:39:23 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.198.133 with SMTP id w127mr14069633oif.74.1420997963369; Sun, 11 Jan 2015 09:39:23 -0800 (PST) Received: by 10.76.185.7 with HTTP; Sun, 11 Jan 2015 09:39:23 -0800 (PST) In-Reply-To: <1544032.XE9RNgkelG@laptop1.gw.ume.nu> References: <54B239EA.8080807@gmail.com> <54B23CE4.60408@gmail.com> <1544032.XE9RNgkelG@laptop1.gw.ume.nu> Date: Sun, 11 Jan 2015 17:47:00 -0000 Message-ID: Subject: Re: [PING][PATCH][1-3] New configure options that make the compiler use -fPIE and -pie as default option From: "H.J. Lu" To: Magnus Granberg Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00614.txt.bz2 On Sun, Jan 11, 2015 at 5:29 AM, Magnus Granberg wrote: > s=C3=B6ndag 11 januari 2015 03.37.14 skrev H.J. Lu: >> On Sun, Jan 11, 2015 at 1:05 AM, Daniel Micay wr= ote: >> > On 11/01/15 03:52 AM, Daniel Micay wrote: >> >> This branch works well for me. It doesn't automatically turn off the >> >> linker flag when -fno-PIE or -fno-PIC are passed like most of the >> >> wrapper scripts / downstream patches do, but that might not be a prob= lem >> >> in practice. >> >> -fno-PIE and -fno-PIC aren't linking options. We don't turn on PIE with >> >> # gcc -fPIE .... >> >> You need to use >> >> # gcc -pie -fPIE >> >> To turn off PIE, you should use >> >> # gcc -no-pie -fno-PIE >> >> > Er, Thunderbird did a terrible job handling my manual reply (wasn't >> > subscribed to the list). Sorry about that. >> > >> > For clarity, this is about H.J. Lu's branch at: >> > >> > https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dshortlog;h=3Drefs/heads/hjl/p= ie > It works fine for me but 6 test fails in the testsuite. > Do we realy want to pass -fPIE -fPIC when someone do -fno-PIC or -fno-pic? > > FAIL: gcc.dg/tree-ssa/ssa-store-ccp-3.c scan-tree-dump-times optimized > "conststaticvariable" 1 > FAIL: gcc.target/i386/nop-mcount.c (test for excess errors) > FAIL: gcc.target/i386/pr54445-2.c scan-assembler mov(b|zbl)[ \t] > (%fs:)?tls_array@tpoff-1\\(% > FAIL: g++.dg/other/anon5.C -std=3Dgnu++98 (test for excess errors) > FAIL: g++.dg/other/anon5.C -std=3Dgnu++11 (test for excess errors) > FAIL: g++.dg/other/anon5.C -std=3Dgnu++14 (test for excess errors) I fixed them on hjl/pie branch. Please take a look. --=20 H.J.