[testsuite] Pass -pie in ldflags
-pie is a linker flag, it should be passed via "ldflags", instead of "additional_flags". Otherwise, clang complains, clang: warning: argument unused during compilation: '-pie' gdb/testsuite: 2017-11-22 Yao Qi <yao.qi@linaro.org> * gdb.base/attach-pie-noexec.exp: Pass "-pie" in ldflags. * gdb.base/break-interp.exp: Likewise. * gdb.base/jit-attach-pie.exp: Likewise.
This commit is contained in:
parent
6f19e86dac
commit
dc196b230b
4 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2017-11-22 Yao Qi <yao.qi@linaro.org>
|
||||
|
||||
* gdb.base/attach-pie-noexec.exp: Pass "-pie" in ldflags.
|
||||
* gdb.base/break-interp.exp: Likewise.
|
||||
* gdb.base/jit-attach-pie.exp: Likewise.
|
||||
|
||||
2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* gdb.base/float128.c (large128): New variable.
|
||||
|
|
|
@ -20,7 +20,7 @@ if {![can_spawn_for_attach]} {
|
|||
standard_testfile .c
|
||||
set executable ${testfile}
|
||||
|
||||
if { [prepare_for_testing "failed to prepare" $executable "" [list debug "additional_flags=-fPIE -pie"]] } {
|
||||
if { [prepare_for_testing "failed to prepare" $executable "" [list debug "additional_flags=-fPIE" "ldflags=-pie"]] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
|
@ -625,7 +625,8 @@ foreach ldprelink {NO YES} {
|
|||
lappend opts {debug}
|
||||
}
|
||||
if {$binpie != "NO"} {
|
||||
lappend opts {additional_flags=-fPIE -pie}
|
||||
lappend opts {additional_flags=-fPIE}
|
||||
lappend opts {ldflags=-pie}
|
||||
}
|
||||
|
||||
set dir ${exec}.d
|
||||
|
|
|
@ -21,7 +21,7 @@ standard_testfile .c
|
|||
set executable ${testfile}
|
||||
|
||||
if { [build_executable ${testfile}.exp $executable $srcfile \
|
||||
[list debug pthreads "additional_flags=-fPIE -pie"]] } {
|
||||
[list debug pthreads "additional_flags=-fPIE" "ldflags=-pie"]] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue