aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/reread.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-09-23 22:42:10 +0200
committerTom de Vries <tdevries@suse.de>2021-09-23 22:42:10 +0200
commit6ef69a3ff3f5b2483893c6ce611977a1418de2f6 (patch)
tree8cf2492a9ecfff89d09cf3234281d9d00e27f235 /gdb/testsuite/gdb.base/reread.exp
parent508109612f99513f523e2295d86133a71418c010 (diff)
downloadgdb-6ef69a3ff3f5b2483893c6ce611977a1418de2f6.zip
gdb-6ef69a3ff3f5b2483893c6ce611977a1418de2f6.tar.gz
gdb-6ef69a3ff3f5b2483893c6ce611977a1418de2f6.tar.bz2
[gdb/testsuite] Use pie instead of -fPIE -pie
Replace {additional_flags=-fPIE ldflags=-pie} with {pie}. This makes sure that the test-cases properly error out when using target board unix/-fno-PIE/-no-pie. Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/gdb.base/reread.exp')
-rw-r--r--gdb/testsuite/gdb.base/reread.exp17
1 files changed, 5 insertions, 12 deletions
diff --git a/gdb/testsuite/gdb.base/reread.exp b/gdb/testsuite/gdb.base/reread.exp
index c74caf43..7ab30f2 100644
--- a/gdb/testsuite/gdb.base/reread.exp
+++ b/gdb/testsuite/gdb.base/reread.exp
@@ -14,9 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Build programs in PIE mode, to reproduce PR 21555.
-foreach_with_prefix opts {
- { "" "" }
- { "-fPIE" "ldflags=-pie" } } {
+foreach_with_prefix opts { "" "pie" } {
# build the first test case
@@ -25,9 +23,7 @@ foreach_with_prefix opts {
# Cygwin needs $EXEEXT.
set binfile1 [standard_output_file ${testfile1}$EXEEXT]
- set testfile1_opt [list debug nowarnings \
- additional_flags=[lindex $opts 0] \
- [lindex $opts 1] ]
+ set testfile1_opt [list debug nowarnings $opts]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" \
executable ${testfile1_opt}] != "" } {
untested "failed to compile first testcase"
@@ -40,12 +36,9 @@ foreach_with_prefix opts {
set srcfile2 ${testfile2}.c
set binfile2 [standard_output_file ${testfile2}$EXEEXT]
- set testfile2_opt1 [list debug nowarnings \
- additional_flags=[lindex $opts 0] \
- [lindex $opts 1]]
- set testfile2_op2 [list debug nowarnings \
- "additional_flags=-DNO_SECTIONS [lindex $opts 0]" \
- [lindex $opts 1]]
+ set testfile2_opt1 [list debug nowarnings $opts]
+ set testfile2_op2 [list debug nowarnings $opts \
+ "additional_flags=-DNO_SECTIONS"]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
executable ${testfile2_opt1}] != ""
&& [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \