From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8215 invoked by alias); 13 Jan 2012 18:29:06 -0000 Received: (qmail 8176 invoked by uid 22791); 13 Jan 2012 18:29:05 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 13 Jan 2012 18:28:50 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0DISmM9000779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 13 Jan 2012 13:28:49 -0500 Received: from host2.jankratochvil.net (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q0DISjEv029228 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 13 Jan 2012 13:28:47 -0500 Date: Fri, 13 Jan 2012 18:42:00 -0000 From: Jan Kratochvil To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org Subject: Re: [patch] Cleanup: pass "-pie" only to the linker Message-ID: <20120113182844.GA29277@host2.jankratochvil.net> References: <20120113165503.02937190B08@elbrus2.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120113165503.02937190B08@elbrus2.mtv.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2012-01/txt/msg00497.txt.bz2 On Fri, 13 Jan 2012 17:55:02 +0100, Paul Pluzhnikov wrote: > -set opts [list debug {additional_flags=-fPIE -pie}] > +set opts [list debug {"additional_flags=-fPIE" "ldflags=-pie"}] > if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == "" > || [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == ""} { The first change is OK but this one is wrong, you have disabled -pie completely from gdb.log when you check it. {...} will include the literal text into the variable, including quoting in this case. It should be best: set opts [list debug additional_flags=-fPIE ldflags=-pie] as no quotes are needed anymore (as there is no space). There could be also: set opts [list debug "additional_flags=-fPIE" "ldflags=-pie"] but those quotes are just not needed there. OK to check it in with that change. Thanks, Jan