Hesham ALMatary 183626a1d4 Add support for building bare-metal or1ksim.
This patch adds support to enable RSB to build or1ksim emulator
(the main OpenRISC 1000 simulator) from latest or1ksim github repo.
2014-08-29 11:51:39 +10:00

58 lines
1003 B
INI

#
# or1ksim 1.x.x Version 1.
#
# This configuration file configure's, make's and install's or1ksim.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: or1ksim-1.1.0
Summary: or1ksim-github
Version: %{or1ksim_version}
Release: %{release}
URL: https://github.com/openrisc/or1ksim
BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
#
# Source
#
%source set or1ksim https://github.com/openrisc/or1ksim/archive/or1k-master.zip
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
%source setup or1ksim -q -n or1ksim-or1k-master
cd ${build_top}
%build
build_top=$(pwd)
cd or1ksim-or1k-master/
../or1ksim-or1k-master/configure \
--target=or1k-elf \
--prefix=%{_prefix} \
CFLAGS="-O0 -DINLINE=static -DNO_SOFTFLOAT_UNUSED"
%{__make} %{?_smp_mflags} all$
cd ${build_top}
%install
build_top=$(pwd)
rm -rf $SB_BUILD_ROOT
cd or1ksim-or1k-master
%{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
cd ${build_top}