Accepting request 732120 from openSUSE:Factory:RISCV

- Enable context on riscv64
- riscv-support.patch: Add missing bits for riscv support

OBS-URL: https://build.opensuse.org/request/show/732120
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/boost?expand=0&rev=237
This commit is contained in:
Adam Majer 2019-09-20 10:15:02 +00:00 committed by Git OBS Bridge
parent ac5f7f256e
commit 181191f0d1
3 changed files with 97 additions and 1 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 19 15:34:53 UTC 2019 - Andreas Schwab <schwab@suse.de>
- Enable context on riscv64
- riscv-support.patch: Add missing bits for riscv support
-------------------------------------------------------------------
Wed Sep 18 15:38:24 UTC 2019 - Andreas Schwab <schwab@suse.de>

View File

@ -130,7 +130,7 @@ ExcludeArch: s390x %{ix86} ppc64 ppc64le
%bcond_with python_numpy
%endif
# context hasn't been ported to most architectures yet
%ifarch %{ix86} x86_64 %{arm} aarch64 mips ppc ppc64 ppc64le
%ifarch %{ix86} x86_64 %{arm} aarch64 mips ppc ppc64 ppc64le riscv64
%bcond_without build_context
%else
%bcond_with build_context
@ -197,6 +197,7 @@ Patch17: python_mpi.patch
Patch18: dynamic_linking.patch
Patch20: python_library_name.patch
Patch23: 3ecbf83f.patch
Patch24: riscv-support.patch
BuildRequires: fdupes
BuildRequires: libbz2-devel
BuildRequires: libexpat-devel
@ -1230,6 +1231,7 @@ find -type f ! \( -name \*.sh -o -name \*.py -o -name \*.pl \) -exec chmod -x {}
%patch18 -p1
%patch20 -p1
%patch23 -p1
%patch24 -p1
%build
find . -type f -exec chmod u+w {} +

88
riscv-support.patch Normal file
View File

@ -0,0 +1,88 @@
https://github.com/boostorg/boost/commit/5c8898af4
https://github.com/boostorg/predef/commit/fc99bc2
Index: boost_1_71_0/boost/predef/architecture.h
===================================================================
--- boost_1_71_0.orig/boost/predef/architecture.h
+++ boost_1_71_0/boost/predef/architecture.h
@@ -21,6 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt)
#include <boost/predef/architecture/ppc.h>
#include <boost/predef/architecture/ptx.h>
#include <boost/predef/architecture/pyramid.h>
+#include <boost/predef/architecture/riscv.h>
#include <boost/predef/architecture/rs6k.h>
#include <boost/predef/architecture/sparc.h>
#include <boost/predef/architecture/superh.h>
Index: boost_1_71_0/boost/predef/architecture/riscv.h
===================================================================
--- /dev/null
+++ boost_1_71_0/boost/predef/architecture/riscv.h
@@ -0,0 +1,41 @@
+/*
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_ARCHITECTURE_RISCV_H
+#define BOOST_PREDEF_ARCHITECTURE_RISCV_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_ARCH_RISCV`]
+
+[@http://en.wikipedia.org/wiki/RISC-V] architecture.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__riscv`] [__predef_detection__]]
+ ]
+ */
+
+#define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if defined(__riscv)
+# undef BOOST_ARCH_RISCV
+# define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_AVAILABLE
+#endif
+
+#if BOOST_ARCH_RISCV
+# define BOOST_ARCH_RISCV_AVAILABLE
+#endif
+
+#define BOOST_ARCH_RISCV_NAME "RISC-V"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RISCV,BOOST_ARCH_RISCV_NAME)
Index: boost_1_71_0/boostcpp.jam
===================================================================
--- boost_1_71_0.orig/boostcpp.jam
+++ boost_1_71_0/boostcpp.jam
@@ -607,7 +607,7 @@ rule address-model ( )
return <conditional>@boostcpp.deduce-address-model ;
}
-local deducable-architectures = arm mips1 power sparc x86 combined ;
+local deducable-architectures = arm mips1 power riscv sparc x86 combined ;
feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
for a in $(deducable-architectures)
{
@@ -618,11 +618,12 @@ rule deduce-architecture ( properties *
{
local result ;
local filtered = [ toolset-properties $(properties) ] ;
- local names = arm mips1 power sparc x86 combined ;
+ local names = arm mips1 power riscv sparc x86 combined ;
local idx = [ configure.find-builds "default architecture" : $(filtered)
: /boost/architecture//arm
: /boost/architecture//mips1
: /boost/architecture//power
+ : /boost/architecture//riscv
: /boost/architecture//sparc
: /boost/architecture//x86
: /boost/architecture//combined ] ;