[Rpm-maint] [PATCH] RISCV 64-bit (riscv64) support.
Richard W.M. Jones
rjones at redhat.com
Wed Aug 10 17:52:45 UTC 2016
On Wed, Aug 10, 2016 at 06:51:43PM +0100, Richard W.M. Jones wrote:
> So this sort of works.
>
> However %{_arch} is not defined, for reasons I don't understand.
>
> # uname -a
> Linux stage3 4.1.26-01508-g592a151 #1 Sat Aug 6 08:53:06 BST 2016 riscv GNU/Linux
>
> and according to
>
> http://www.rpm.org/max-rpm-snapshot/s1-rpm-multi-build-install-detection.html
>
> what I've done should map "riscv" from the kernel to "riscv64".
>
> /usr/lib/rpm/platform/riscv64-linux/macros is created (see attached)
> but apparently it is not read in by rpm.
With the attachment this time.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines. Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v
-------------- next part --------------
# Per-platform rpm configuration file.
#==============================================================================
# ---- per-platform macros.
#
%_arch riscv64
%_build_arch riscv64
%_vendor unknown
%_os linux
%_gnu -gnu
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}
%optflags -O2 -g
%__isa_name riscv
%__isa_bits 64
%__isa %{__isa_name}-%{__isa_bits}
# The default transaction color. This value is a set of bits to
# determine file and dependency affinity for this arch.
# 0 uncolored (i.e. use only arch as install hint)
# 1 Elf32 permitted
# 2 Elf64 permitted
%_transaction_color 3
#==============================================================================
# ---- configure macros.
#
%_prefix /usr
%_exec_prefix %{_prefix}
%_bindir %{_exec_prefix}/bin
%_sbindir %{_exec_prefix}/sbin
%_libexecdir %{_exec_prefix}/libexec
%_datarootdir %{_prefix}/share
%_datadir %{_datarootdir}
%_sysconfdir %{_prefix}/etc
%_sharedstatedir %{_prefix}/com
%_localstatedir %{_prefix}/var
%_lib lib64
%_libdir %{_prefix}/lib64
%_includedir %{_prefix}/include
%_oldincludedir /usr/include
%_infodir %{_datarootdir}/info
%_mandir %{_datarootdir}/man
%_initddir %{_sysconfdir}/rc.d/init.d
# Deprecated misspelling, present for backwards compatibility.
%_initrddir %{_initddir}
%_rundir /run
%_defaultdocdir %{_datadir}/doc
# Maximum number of CPU's to use when building, 0 for unlimited.
#%_smp_ncpus_max 0
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
ncpus_max=%{?_smp_ncpus_max}; \\\
if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)
#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
# Expanded at end of %install scriptlet.
#
%__arch_install_post %{nil}
%__os_install_post \
%{_rpmconfigdir}/brp-compress \
%{_rpmconfigdir}/brp-strip %{__strip} \
%{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
%{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
%{nil}
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
%{__arch_install_post}\
%{__os_install_post}\
%{nil}
More information about the Rpm-maint
mailing list