From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4170 invoked by alias); 17 Oct 2018 15:47:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4157 invoked by uid 89); 17 Oct 2018 15:47:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=our, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 Oct 2018 15:47:49 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C5347F6C5; Wed, 17 Oct 2018 15:47:48 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id EDE245F7C2; Wed, 17 Oct 2018 15:47:46 +0000 (UTC) Subject: Re: [PATCH] Fix various tests to use -no-pie linker flag when needed To: Simon Marchi , Jan Vrany References: <20180828193643.15530-1-jan.vrany@fit.cvut.cz> <87lg8dvy0o.fsf@tromey.com> <9dbaccd25aae8bdf1cd96e59ae8f7c9be9cce7db.camel@fit.cvut.cz> <01b5605a3df81c4d773a82e8648051fa@polymtl.ca> Cc: Tom Tromey , gdb-patches@sourceware.org From: Pedro Alves Message-ID: <4e2d9d5a-5381-faf1-a5ee-425158f07b97@redhat.com> Date: Wed, 17 Oct 2018 15:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <01b5605a3df81c4d773a82e8648051fa@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-10/txt/msg00372.txt.bz2 On 10/16/2018 11:18 PM, Simon Marchi wrote: > On 2018-10-14 05:59, Jan Vrany wrote: >> No, I don't know how universal -no-pie is. From what I have understood >> from Simon (https://sourceware.org/ml/gdb-patches/2018-08/msg00662.html), >> out of the options available -no-pie is still the best bet. > > gcc supports it, icc supports it [1], clang supports it starting at version 6 according to my testing. I think this is universal > enough that we can use it. If somebody stumbles on a compiler that does not understand -no-pie and they really need to use it for > their testing, they can quite easily add an option for gdb_compile. Not sure it's that universal. See: https://github.com/xd009642/tarpaulin/issues/7#issuecomment-317180523 For example, the gcc 4.8 I have handy (our minimum supported version) does not support it: $ /opt/gcc-4.8/bin/gcc /home/pedro/gdb/tests/main.c -o main -no-pie gcc: error: unrecognized command line option ‘-no-pie’ > But for now, I don't think it's worth the extra work. I disagree. Thanks, Pedro Alves