This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Cleanup: pass "-pie" only to the linker


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]