Add riscv64 modifications for Fedora RISC-V bootstrap

Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
David Abdurachmanov 2018-05-05 19:30:21 +02:00
parent f7e8f73ead
commit 15f1929445
3 changed files with 26 additions and 3 deletions

15
macros
View File

@ -207,7 +207,7 @@
# Add extra information to binary objects created by gcc for Fedora 28:
# https://pagure.io/fesco/issue/1780 (accepted on 2017-10-30)
# Use "%undefine _annotated_build" to disable.
%_annotated_build 1
#_annotated_build 1
%_annotated_cflags %{?_annotated_build:%{_annobin_cflags}}
# Fail linking if there are undefined symbols. Required for proper
@ -250,3 +250,16 @@
%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
}
# override %check sections and disable them (exit 0) while we are
# bootstrapping Fedora RISC-V
%__spec_check_pre exit 0
# disable annonbin for Fedora RISC-V until we test and provide support
#undefine _annotated_build
# this is actually done above, but this is left as reminder/TODO
# disable debug packages as we don't have gdb-add-index
# GDB is not yet ported on RISC-V to support Linux targets
%_enable_debug_packages 0
%debug_package %{nil}

View File

@ -7,7 +7,7 @@
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
Version: 111
Release: 1%{?dist}
Release: 1.0.riscv64%{?dist}
# No version specified.
License: GPL+
Group: Development/System
@ -97,7 +97,9 @@ Requires: qt5-srpm-macros
Requires: rpm >= 4.11.0
Requires: dwz >= 0.4
Requires: zip
%ifnarch riscv64
Requires: (annobin if gcc)
%endif
# for brp-mangle-shebangs
Requires: %{_bindir}/find
@ -184,6 +186,14 @@ install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
%{_rpmconfigdir}/macros.d/macros.kmp
%changelog
* Sat May 05 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 111-1.0.riscv64
- Disable %check for riscv64
- Disable debug packages for riscv64 (still don't have GDB, which is needed
for debug packages)
- Disable annotated builds for riscv64 (untested)
- Add -fasynchronous-unwind-tables -fstack-clash-protection to riscv64 (other
arches seem to have them now)
* Wed May 02 2018 Peter Jones <pjones@redhat.com> - 111-1
- brp-mangle-shebangs: add %%{__brp_mangle_shebangs_exclude_file} and
%%{__brp_mangle_shebangs_exclude_from_file} to allow you to specify files

2
rpmrc
View File

@ -76,7 +76,7 @@ optflags: s390x %{__global_compiler_flags} -m64 -march=zEC12 -mtune=z13 -fasynch
optflags: aarch64 %{__global_compiler_flags} -fasynchronous-unwind-tables -fstack-clash-protection
optflags: riscv64 %{__global_compiler_flags}
optflags: riscv64 %{__global_compiler_flags} -fasynchronous-unwind-tables -fstack-clash-protection
# set build arch to fedora buildarches on hardware capable of running it
# saves having to do rpmbuild --target=