From 884123a06954afaedff9e6b1f64a77d66d5ada08 Mon Sep 17 00:00:00 2001 From: eastb233 Date: Tue, 8 Aug 2023 20:15:22 +0800 Subject: [PATCH] [X86] Change -fpic to -fPIC in PICFLAG --- 0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch | 39 +++++++++++++++++++ binutils.spec | 9 ++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch diff --git a/0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch b/0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch new file mode 100644 index 0000000..3982dcc --- /dev/null +++ b/0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch @@ -0,0 +1,39 @@ +From 8fb95e58ea6b2c2fddd0b308acdc160dda217b7b Mon Sep 17 00:00:00 2001 +From: eastb233 +Date: Tue, 8 Aug 2023 20:05:24 +0800 +Subject: [PATCH] [X86] Change -fpic to -fPIC in PICFLAG + +--- + intl/configure | 2 +- + libiberty/configure | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/intl/configure b/intl/configure +index e75f072f..f8438526 100755 +--- a/intl/configure ++++ b/intl/configure +@@ -6867,7 +6867,7 @@ case "${host}" in + # Some targets support both -fPIC and -fpic, but prefer the latter. + # FIXME: Why? + i[34567]86-*-* | x86_64-*-*) +- PICFLAG=-fpic ++ PICFLAG=-fPIC + ;; + # FIXME: Override -fPIC default in libgcc only? + sh-*-linux* | sh[2346lbe]*-*-linux*) +diff --git a/libiberty/configure b/libiberty/configure +index 1ccfac9f..0b85f351 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5362,7 +5362,7 @@ case "${host}" in + # Some targets support both -fPIC and -fpic, but prefer the latter. + # FIXME: Why? + i[34567]86-*-* | x86_64-*-*) +- PICFLAG=-fpic ++ PICFLAG=-fPIC + ;; + # FIXME: Override -fPIC default in libgcc only? + sh-*-linux* | sh[2346lbe]*-*-linux*) +-- +2.19.1 + diff --git a/binutils.spec b/binutils.spec index 61de8e7..b665fac 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.40 -Release: 1 +Release: 2 License: GPL-3.0-or-later URL: https://sourceware.org/binutils @@ -279,6 +279,10 @@ Patch21: binutils-CVE-2023-1972.patch # Lifetime: Fixed in 2.41 (maybe) Patch22: binutils-gold-empty-dwp.patch + +#### Other patches +Patch23: 0001-X86-Change-fpic-to-fPIC-in-PICFLAG.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -1306,6 +1310,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue Aug 08 2023 eastb233 - 2.40-2 +- In X86, change -fpic to -fPIC in PICFLAG + * Wed Aug 02 2023 eastb233 - 2.40-1 - Init binutils 2.40 - Reference: https://gitlab.com/redhat/centos-stream/rpms/binutils/-/tree/c10s/ -- Gitee