Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37533592
en ru br
Репозитории ALT
S:13.2.0.43.854f46b6377-alt2
5.1: 6.6-alt3
4.1: 6.6-alt3
4.0: 6.6-alt2
3.0: 6.3-alt2
www.altlinux.org/Changes

Группа :: Разработка/Отладчики
Пакет: gdb

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: gdb-runtest-pie-override.patch
Скачать


From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Fedora GDB patches <invalid@email.com>
Date: Fri, 27 Oct 2017 21:07:50 +0200
Subject: 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.
diff --git a/gdb/testsuite/lib/future.exp b/gdb/testsuite/lib/future.exp
--- a/gdb/testsuite/lib/future.exp
+++ b/gdb/testsuite/lib/future.exp
@@ -197,6 +197,10 @@ proc gdb_default_target_compile_1 {source destfile type options} {
     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"
     }
@@ -531,10 +535,6 @@ proc gdb_default_target_compile_1 {source destfile type options} {
 	}
     }
 
-    if {[board_info $dest exists multilib_flags]} {
-	append add_flags " [board_info $dest multilib_flags]"
-    }
-
     verbose "doing compile"
 
     set sources ""
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin