public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Fix PIE testsuite run; new lib/future.exp hack and use -fPIC instead of -fPIE.
Date: Sat, 27 Jun 2026 23:55:15 GMT	[thread overview]
Message-ID: <178260451575.1.13628188371680255894.rpms-gdb-7218d159e36f@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 7218d159e36f6513ec61ce2d2878d60e2b5ea462
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2011-10-11T17:11:36+02:00
Stats  : +50/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/7218d159e36f6513ec61ce2d2878d60e2b5ea462?branch=gdb-17.2-rebase-f44

Log:
Fix PIE testsuite run; new lib/future.exp hack and use -fPIC instead of -fPIE.

---
diff --git a/gdb-runtest-pie-override.patch b/gdb-runtest-pie-override.patch
new file mode 100644
index 0000000..dc54494
--- /dev/null
+++ b/gdb-runtest-pie-override.patch
@@ -0,0 +1,40 @@
+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.
+
+--- gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp	2011-10-11 16:44:05.000000000 +0200
++++ gdb-7.3.50.20110722/gdb/testsuite/lib/future.exp2	2011-10-11 16:44:10.000000000 +0200
+@@ -77,6 +77,10 @@ proc gdb_default_target_compile {source
+     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"
+     }
+@@ -333,10 +337,6 @@ proc gdb_default_target_compile {source
+ 	}
+     }
+ 
+-    if {[board_info $dest exists multilib_flags]} {
+-	append add_flags " [board_info $dest multilib_flags]"
+-    }
+-
+     verbose "doing compile"
+ 
+     set sources ""

diff --git a/gdb.spec b/gdb.spec
index 502b161..269c63f 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.3.50.20110722
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 7%{?_with_upstream:.upstream}%{?dist}
+Release: 8%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain
 Group: Development/Debuggers
@@ -553,6 +553,9 @@ Patch631: gdb-implptr-64bit-2of2.patch
 # Fix internal error on some optimized-out values.
 Patch632: gdb-optimized-out-internal-error.patch
 
+# Hack for proper PIE run of the testsuite.
+Patch634: gdb-runtest-pie-override.patch
+
 BuildRequires: ncurses-devel%{?_isa} texinfo gettext flex bison expat-devel%{?_isa}
 # --without-system-readline
 # Requires: readline%{?_isa}
@@ -825,6 +828,7 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c
 %patch630 -p1
 %patch631 -p1
 %patch632 -p1
+%patch634 -p1
 
 %patch393 -p1
 %patch335 -p1
@@ -1064,7 +1068,8 @@ gcc -o ./orphanripper %{SOURCE2} -Wall -lutil -ggdb2
 %if 0%{!?_with_upstream:1}
   # Run all the scheduled testsuite runs also in the PIE mode.
   # Upstream GDB would lock up the testsuite run for too long on its failures.
-  CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIE/-pie#g')"
+  # See also: gdb-runtest-pie-override.exp
+  CHECK="$(echo $CHECK|sed 's#check//unix/[^ ]*#& &/-fPIC/-pie#g')"
 %endif # 0%{!?_with_upstream:1}
 
   ./orphanripper make %{?_smp_mflags} -k $CHECK \
@@ -1247,6 +1252,9 @@ fi
 %{_infodir}/gdb.info*
 
 %changelog
+* Tue Oct 11 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3.50.20110722-8.fc16
+- Fix PIE testsuite run; new lib/future.exp hack and use -fPIC instead of -fPIE.
+
 * Mon Sep 26 2011 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.3.50.20110722-7.fc16
 - [vla] Fix VLA arrays displayed in `bt full' (BZ 738482).
 - Fix DW_OP_GNU_implicit_pointer for DWARF32 v3+ on 64-bit arches.

                 reply	other threads:[~2026-06-27 23:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260451575.1.13628188371680255894.rpms-gdb-7218d159e36f@fedoraproject.org \
    --to=jan.kratochvil@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox