From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57016 invoked by alias); 16 Aug 2019 18:49:00 -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 56957 invoked by uid 89); 16 Aug 2019 18:49:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f48.google.com Received: from mail-wm1-f48.google.com (HELO mail-wm1-f48.google.com) (209.85.128.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Aug 2019 18:48:59 +0000 Received: by mail-wm1-f48.google.com with SMTP id z23so4850190wmf.2 for ; Fri, 16 Aug 2019 11:48:59 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id b186sm3756426wmb.3.2019.08.16.11.48.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Aug 2019 11:48:56 -0700 (PDT) Subject: Re: [PATCH][gdb/testsuite] Fail in gdb_compile if nopie results in PIE executable To: Tom de Vries , gdb-patches@sourceware.org References: <20190723072210.GA24180@delia> From: Pedro Alves Message-ID: <8592a3b7-56b2-92e8-1450-91882a4d524c@redhat.com> Date: Fri, 16 Aug 2019 18:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190723072210.GA24180@delia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-08/txt/msg00380.txt.bz2 On 7/23/19 8:22 AM, Tom de Vries wrote: > When running gdb.base/dump.exp with --target_board=unix/-fPIE/-pie, we get: > ... > Running gdb/testsuite/gdb.base/dump.exp ... > FAIL: gdb.base/dump.exp: dump array as value, intel hex > ... > > The FAIL happens because although the test specifies nopie, the exec is > in fact compiled as PIE. The "-fPIE -pie" options specified using the > target_board are interpreted by dejagnu as multilib_flags, and end up > overriding the nopie flags. I'd think it would be better to temporarily strip out -fPIE/-pie (*) from multilib_flags if nopie is set? (*) - and/or the contents of gdb,pie_ldflag gdb,pie_flag. Thanks, Pedro Alves