Adam Majer
181191f0d1
- 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
89 lines
2.9 KiB
Diff
89 lines
2.9 KiB
Diff
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 ] ;
|