summaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2021-09-23 22:52:51 +0200
committerTom de Vries <tdevries@suse.de>2021-09-23 22:52:51 +0200
commit0086a91ceef5207463a10c875ed85c40eb066722 (patch)
tree144753b7444caa0e299bfd825f9accc64fac5973 /gdb/python/py-value.c
parent6ef69a3ff3f5b2483893c6ce611977a1418de2f6 (diff)
downloadbinutils-gdb-0086a91ceef5207463a10c875ed85c40eb066722.tar.gz
[gdb/testsuite] Support -fPIE/-fno-PIE/-pie/-no-pie in gdb_compile_rust
When running gdb.rust/*.exp test-cases with target board unix/-fPIE/-pie, I run into: ... builtin_spawn -ignore SIGHUP rustc --color never gdb.rust/watch.rs \ -g -lm -fPIE -pie -o outputs/gdb.rust/watch/watch^M error: Unrecognized option: 'f'^M ^M compiler exited with status 1 ... The problem is that -fPIE and -fpie are gcc options, but for rust we use rustc, which has different compilation options. Fix this by translating the gcc options to rustc options in gdb_compile_rust, similar to how that is done for ada in target_compile_ada_from_dir. Likewise for unix/-fno-PIE/-no-pie. Tested on x86_64-linux, with: - native - unix/-fPIE/-pie - unix/-fno-PIE/-no-pie specifically, on openSUSE Leap 15.2 both with package gcc-PIE: - installed (making gcc default to PIE) - uninstalled (making gcc default to non-PIE). and rustc 1.52.1.
Diffstat (limited to 'gdb/python/py-value.c')
0 files changed, 0 insertions, 0 deletions