aboutsummaryrefslogtreecommitdiff
path: root/gdb/utils.h
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2020-12-16 18:18:40 +0100
committerTom de Vries <tdevries@suse.de>2020-12-16 18:18:40 +0100
commit1e61189d0ab0905178002120eb0a380858ed6dc0 (patch)
tree1e8cd234d0a30f2da93257d1e8d5d932d1cb599f /gdb/utils.h
parentbfbe4b84606cb9b8ac6f51b473b1d351924080aa (diff)
downloadbinutils-1e61189d0ab0905178002120eb0a380858ed6dc0.zip
binutils-1e61189d0ab0905178002120eb0a380858ed6dc0.tar.gz
binutils-1e61189d0ab0905178002120eb0a380858ed6dc0.tar.bz2
[gdb/testsuite] Fix shlib compilation with target board unix/-pie/-fPIE
When running test-case gdb.base/info-shared.exp with target board unix/-pie/-fPIE, we run into: ... spawn -ignore SIGHUP gcc -fno-stack-protector \ outputs/gdb.base/info-shared/info-shared-solib1.c.o \ -fdiagnostics-color=never -fPIC -shared -Wl,-soname,info-shared-solib1.so \ -lm -fPIE -pie -o outputs/gdb.base/info-shared/info-shared-solib1.so^M ld: Scrt1.o: in function `_start':^M start.S:104: undefined reference to `main'^M collect2: error: ld returned 1 exit status^M compiler exited with status 1 ... The intention of the -pie/-fPIE flags is to build and test PIE executables on platforms where that is not the default. However, the flags clash with the flags required to build shared libraries. Fix this by filtering out PIE-related flags out of the multilib_flags settings in compile_shared_lib. Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2020-12-16 Tom de Vries <tdevries@suse.de> * lib/gdb.exp (gdb_compile_shlib_1): Factor out of ... (gdb_compile_shlib): ... here. Filter out PIE-related flags.
Diffstat (limited to 'gdb/utils.h')
0 files changed, 0 insertions, 0 deletions