Skip to content

Commit 39ce60c

Browse files
ivanivanov884jeffmahoney
authored andcommitted
gdb-runtest-pie-override.patch
;; Hack for proper PIE run of the testsuite. ;;=fedoratest make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp gcc -fpic -c -fPIE -pie -o x.o x.c /usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start': (.text+0x20): undefined reference to `main' => Change the order for overrides. One has to also use -fPIC rather than -fPIE, -fPIC is stronger. The correct way would be: make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp' But there is a problem with testsuite.unix non-unique subdir name and also a problem with make -j parallelization of the testsuite.
1 parent 19451bb commit 39ce60c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gdb/testsuite/lib/future.exp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,10 @@ proc gdb_default_target_compile {source destfile type options} {
185185
set ldflags ""
186186
set dest [target_info name]
187187

188+
if {[board_info $dest exists multilib_flags]} {
189+
append add_flags " [board_info $dest multilib_flags]"
190+
}
191+
188192
if {[info exists CFLAGS_FOR_TARGET]} {
189193
append add_flags " $CFLAGS_FOR_TARGET"
190194
}
@@ -519,10 +523,6 @@ proc gdb_default_target_compile {source destfile type options} {
519523
}
520524
}
521525

522-
if {[board_info $dest exists multilib_flags]} {
523-
append add_flags " [board_info $dest multilib_flags]"
524-
}
525-
526526
verbose "doing compile"
527527

528528
set sources ""

0 commit comments

Comments
 (0)