2017-12-10 22:00:49 +00:00
|
|
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
2017-12-04 19:24:00 +00:00
|
|
|
From: Fedora GDB patches <invalid@email.com>
|
|
|
|
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
|
|
Subject: gdb-runtest-pie-override.patch
|
|
|
|
|
|
|
|
FileName: gdb-runtest-pie-override.patch
|
|
|
|
|
2017-12-08 04:31:26 +00:00
|
|
|
;; Hack for proper PIE run of the testsuite.
|
|
|
|
;;=fedoratest
|
2017-12-04 19:24:00 +00:00
|
|
|
|
2011-10-11 15:11:36 +00:00
|
|
|
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.
|
2017-12-08 04:31:26 +00:00
|
|
|
---
|
|
|
|
gdb/testsuite/lib/future.exp | 8 ++++----
|
|
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
|
2018-01-10 19:21:10 +00:00
|
|
|
index 547ca5fb7b..93c770820c 100644
|
2017-12-08 04:31:26 +00:00
|
|
|
--- a/gdb/testsuite/lib/future.exp
|
|
|
|
+++ b/gdb/testsuite/lib/future.exp
|
|
|
|
@@ -185,6 +185,10 @@ proc gdb_default_target_compile {source destfile type options} {
|
2011-10-11 15:11:36 +00:00
|
|
|
set ldflags ""
|
|
|
|
set dest [target_info name]
|
|
|
|
|
|
|
|
+ if {[board_info $dest exists multilib_flags]} {
|
|
|
|
+ append add_flags " [board_info $dest multilib_flags]"
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
if {[info exists CFLAGS_FOR_TARGET]} {
|
|
|
|
append add_flags " $CFLAGS_FOR_TARGET"
|
|
|
|
}
|
2017-12-08 04:31:26 +00:00
|
|
|
@@ -519,10 +523,6 @@ proc gdb_default_target_compile {source destfile type options} {
|
2011-10-11 15:11:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- if {[board_info $dest exists multilib_flags]} {
|
|
|
|
- append add_flags " [board_info $dest multilib_flags]"
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
verbose "doing compile"
|
|
|
|
|
|
|
|
set sources ""
|
2017-12-08 04:31:26 +00:00
|
|
|
--
|
|
|
|
2.14.3
|
|
|
|
|