aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2017-11-22 14:35:01 +0000
committerYao Qi <yao.qi@linaro.org>2017-11-22 14:35:01 +0000
commitdc196b230b7366683799755b4461acef5cc95be7 (patch)
tree4813c5dca703438aaf56c739066dcb50b027aa65 /gdb
parent6f19e86dac3a191945b5eb08ae767deced660a00 (diff)
downloadgdb-dc196b230b7366683799755b4461acef5cc95be7.zip
gdb-dc196b230b7366683799755b4461acef5cc95be7.tar.gz
gdb-dc196b230b7366683799755b4461acef5cc95be7.tar.bz2
[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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/attach-pie-noexec.exp2
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp3
-rw-r--r--gdb/testsuite/gdb.base/jit-attach-pie.exp2
4 files changed, 10 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0027982..110fcb1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/gdb.base/attach-pie-noexec.exp b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
index 82e6af6..56a42cb 100644
--- a/gdb/testsuite/gdb.base/attach-pie-noexec.exp
+++ b/gdb/testsuite/gdb.base/attach-pie-noexec.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index 3a6d9a9..460e5f6 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/jit-attach-pie.exp b/gdb/testsuite/gdb.base/jit-attach-pie.exp
index da77a4a..eb484a3 100644
--- a/gdb/testsuite/gdb.base/jit-attach-pie.exp
+++ b/gdb/testsuite/gdb.base/jit-attach-pie.exp
@@ -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
}