aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/jit-reader-simple.exp
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-12-14 18:16:40 +0100
committerTom de Vries <tdevries@suse.de>2020-12-14 18:16:40 +0100
commit2f4132646d8dbf8c1a82d63cacbb36ee46a289bb (patch)
tree07f08e58b9b458cf56003a2ecc0c50e0d8b5f1f7 /gdb/testsuite/gdb.base/jit-reader-simple.exp
parenta6f3c8a1a8353424f00946f073e11c321119a719 (diff)
downloadgdb-2f4132646d8dbf8c1a82d63cacbb36ee46a289bb.zip
gdb-2f4132646d8dbf8c1a82d63cacbb36ee46a289bb.tar.gz
gdb-2f4132646d8dbf8c1a82d63cacbb36ee46a289bb.tar.bz2
[gdb/testsuite] Don't pass -fPIC to gdb_compile_shlib
When running test-case gdb.base/info-shared.exp, I see in gdb.log: ... Executing on host: \ gcc ... -fPIC -fpic -c -o info-shared-solib1.c.o info-shared-solib1.c ... The -fPIC comes from the test-case: ... if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 \ [list additional_flags=-fPIC]] != "" } { ... but the -fpic, which overrides the -fPIC comes from gdb_compile_shlib. The proc gdb_compile_shlib adds the -fpic or similar dependent on platform and compiler. However, in some cases it doesn't add anything, which is probably why all those test-case pass -fPIC. Fix this by removing -fPIC from all the calls to gdb_compile_shlib, and ensuring that gdb_compile_shlib takes care of adding it, if required. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-14 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (gdb_compile_shlib): Make sure it's not necessary to pass -fPIC. * gdb.ada/catch_ex_std.exp: Don't pass -fPIC to gdb_compile_shlib. * gdb.base/break-probes.exp: Same. * gdb.base/ctxobj.exp: Same. * gdb.base/dso2dso.exp: Same. * gdb.base/global-var-nested-by-dso.exp: Same. * gdb.base/info-shared.exp: Same. * gdb.base/jit-reader-simple.exp: Same. * gdb.base/print-file-var.exp: Same. * gdb.base/skip-solib.exp: Same. * gdb.btrace/dlopen.exp: Same.
Diffstat (limited to 'gdb/testsuite/gdb.base/jit-reader-simple.exp')
-rw-r--r--gdb/testsuite/gdb.base/jit-reader-simple.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/jit-reader-simple.exp b/gdb/testsuite/gdb.base/jit-reader-simple.exp
index a8f33c6..99c4dcf 100644
--- a/gdb/testsuite/gdb.base/jit-reader-simple.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-simple.exp
@@ -56,7 +56,7 @@ proc build_shared_jit {{options ""}} {
global testfile
global srcfile_lib binfile_lib binfile_lib2
- lappend options "debug additional_flags=-fPIC"
+ lappend options "debug"
if { [gdb_compile_shlib $srcfile_lib $binfile_lib $options] != "" } {
return -1
}