Do not enable relro by default for the PowerPC64 architecture.

Relates: #1523946
This commit is contained in:
Nick Clifton 2017-12-11 12:57:47 +00:00
parent 9d3e1de5e1
commit 2e86afa036

View File

@ -54,7 +54,7 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.29
Release: 9%{?dist}
Release: 10%{?dist}
License: GPLv3+
Group: Development/Tools
URL: http://sources.redhat.com/binutils
@ -350,6 +350,20 @@ case %{binutils_target} in x86_64*|i?86*|arm*|aarch64*)
;;
esac
%if %{default_relro}
# BZ 1523946: PowerPC64 is not ready for relro.
case %{binutils_target} in
ppc64*)
CARGS="$CARGS --enable-relro=no"
;;
*)
CARGS="$CARGS --enable-relro=yes"
;;
esac
%else
CARGS="$CARGS --enable-relro=no"
%endif
%if 0%{?_with_debug:1}
CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0"
%define enable_shared 0
@ -392,11 +406,6 @@ CFLAGS="$CFLAGS -O0 -ggdb2 -Wno-error -D_FORTIFY_SOURCE=0"
--enable-compressed-debug-sections=all \
%else
--enable-compressed-debug-sections=none \
%endif
%if %{default_relro}
--enable-relro=yes \
%else
--enable-relro=no \
%endif
$CARGS \
--enable-plugins \
@ -667,6 +676,9 @@ exit 0
#---------------------------------------------------------------------------------
%changelog
* Mon Dec 11 2017 Nick Clifton <nickc@redhat.com> 2.29.1-10
- Do not enable relro by default for the PowerPC64 architecture. (#1523946)
* Fri Dec 08 2017 Nick Clifton <nickc@redhat.com> 2.29-9
- Stop strip from crashing when deleteing relocs in a file with annobin notes. (#1520805)