aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-09-24 16:56:50 +0200
committerTom de Vries <tdevries@suse.de>2021-09-24 16:56:50 +0200
commit66484acafd396ecb9bffd9f00ff3c37aec549c83 (patch)
tree5f207c63b19f75b667ad862a2abe2805f98dc899
parent85a0bae983fc3d4fee7f1e64ec002dcfc873f966 (diff)
downloadgdb-66484acafd396ecb9bffd9f00ff3c37aec549c83.zip
gdb-66484acafd396ecb9bffd9f00ff3c37aec549c83.tar.gz
gdb-66484acafd396ecb9bffd9f00ff3c37aec549c83.tar.bz2
[gdb/testsuite] Use pie instead of -fpie/-pie
I noticed two test-cases where -fpie is used. Using the canonical pie option will usually get one -fPIE instead. That choice is justified here in gdb_compile: ... # For safety, use fPIE rather than fpie. On AArch64, m68k, PowerPC # and SPARC, fpie can cause compile errors due to the GOT exceeding # a maximum size. On other architectures the two flags are # identical (see the GCC manual). Note Debian9 and Ubuntu16.10 # onwards default GCC to using fPIE. If you do require fpie, then # it can be set using the pie_flag. set flag "additional_flags=-fPIE" ... There is no indication that using -fpie rather than -fPIE is on purpose, so use pie instead. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.base/gcore-relro-pie.exp3
-rw-r--r--gdb/testsuite/gdb.base/gcore-tls-pie.exp3
2 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/gcore-relro-pie.exp b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
index 5b25721..39142fe 100644
--- a/gdb/testsuite/gdb.base/gcore-relro-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-relro-pie.exp
@@ -19,7 +19,8 @@
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -Wl,-z,relro"}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+ {debug pie "ldflags=-Wl,-z,relro"}]} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/gcore-tls-pie.exp b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
index 3f42cb4..e514c42 100644
--- a/gdb/testsuite/gdb.base/gcore-tls-pie.exp
+++ b/gdb/testsuite/gdb.base/gcore-tls-pie.exp
@@ -23,7 +23,8 @@ if { [have_fuse_ld_gold] == 0} {
return -1
}
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-fpie "ldflags=-pie -fuse-ld=gold"}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
+ {debug pie "ldflags=-fuse-ld=gold"}]} {
return -1
}