This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Cleanup: pass "-pie" only to the linker
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 13 Jan 2012 19:28:44 +0100
- Subject: Re: [patch] Cleanup: pass "-pie" only to the linker
- References: <20120113165503.02937190B08@elbrus2.mtv.corp.google.com>
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