|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
a8767b3 |
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f524ac5 |
From: Fedora GDB patches <invalid@email.com>
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f524ac5 |
Date: Fri, 27 Oct 2017 21:07:50 +0200
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f524ac5 |
Subject: gdb-runtest-pie-override.patch
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f524ac5 |
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
;; Hack for proper PIE run of the testsuite.
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
;;=fedoratest
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f524ac5 |
|
|
Jan Kratochvil |
7218d15 |
make check//unix/-fPIE/-pie RUNTESTFLAGS=solib-display.exp
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
gcc -fpic -c -fPIE -pie -o x.o x.c
|
|
Jan Kratochvil |
7218d15 |
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/../../../../lib64/Scrt1.o: In function `_start':
|
|
Jan Kratochvil |
7218d15 |
(.text+0x20): undefined reference to `main'
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
=> Change the order for overrides.
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
One has to also use -fPIC rather than -fPIE, -fPIC is stronger.
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
The correct way would be:
|
|
Jan Kratochvil |
7218d15 |
make check//unix RUNTESTFLAGS='CC_FOR_TARGET=gcc\ -fPIC\ -pie CXX_FOR_TARGET=g++\ -fPIC\ -pie solib-display.exp'
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
But there is a problem with testsuite.unix non-unique subdir name and also
|
|
Jan Kratochvil |
7218d15 |
a problem with make -j parallelization of the testsuite.
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
--- a/gdb/testsuite/lib/future.exp
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
f637971 |
+++ b/gdb/testsuite/lib/future.exp
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
654fb50 |
@@ -195,6 +195,10 @@ proc gdb_default_target_compile {source destfile type options} {
|
|
Jan Kratochvil |
7218d15 |
set ldflags ""
|
|
Jan Kratochvil |
7218d15 |
set dest [target_info name]
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
+ if {[board_info $dest exists multilib_flags]} {
|
|
Jan Kratochvil |
7218d15 |
+ append add_flags " [board_info $dest multilib_flags]"
|
|
Jan Kratochvil |
7218d15 |
+ }
|
|
Jan Kratochvil |
7218d15 |
+
|
|
Jan Kratochvil |
7218d15 |
if {[info exists CFLAGS_FOR_TARGET]} {
|
|
Jan Kratochvil |
7218d15 |
append add_flags " $CFLAGS_FOR_TARGET"
|
|
Jan Kratochvil |
7218d15 |
}
|
|
![](https://seccdn.libravatar.org/avatar/bee0eca29610d72ca79344b34ce0f74b372d02b144dd843591806047f3bfae96?s=16&d=retro) |
654fb50 |
@@ -529,10 +533,6 @@ proc gdb_default_target_compile {source destfile type options} {
|
|
Jan Kratochvil |
7218d15 |
}
|
|
Jan Kratochvil |
7218d15 |
}
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
- if {[board_info $dest exists multilib_flags]} {
|
|
Jan Kratochvil |
7218d15 |
- append add_flags " [board_info $dest multilib_flags]"
|
|
Jan Kratochvil |
7218d15 |
- }
|
|
Jan Kratochvil |
7218d15 |
-
|
|
Jan Kratochvil |
7218d15 |
verbose "doing compile"
|
|
Jan Kratochvil |
7218d15 |
|
|
Jan Kratochvil |
7218d15 |
set sources ""
|