91 lines
3.4 KiB
Diff
91 lines
3.4 KiB
Diff
Subject: Define e2k architecture
|
|
Bug: 154008
|
|
Tags: e2k
|
|
|
|
diff -rupN a/boostcpp.jam b/boostcpp.jam
|
|
--- a/boostcpp.jam 2023-11-27 05:06:36.524442681 +0300
|
|
+++ b/boostcpp.jam 2023-11-27 05:28:01.988833858 +0300
|
|
@@ -636,7 +636,7 @@ rule address-model ( )
|
|
return <conditional>@boostcpp.deduce-address-model ;
|
|
}
|
|
|
|
-local deducable-architectures = arm loongarch mips power riscv s390x sparc x86 combined ;
|
|
+local deducable-architectures = arm e2k loongarch mips power riscv s390x sparc x86 combined ;
|
|
feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
|
|
for a in $(deducable-architectures)
|
|
{
|
|
@@ -647,9 +647,10 @@ rule deduce-architecture ( properties *
|
|
{
|
|
local result ;
|
|
local filtered = [ toolset-properties $(properties) ] ;
|
|
- local names = arm loongarch mips power riscv s390x sparc x86 combined ;
|
|
+ local names = arm e2k loongarch mips power riscv s390x sparc x86 combined ;
|
|
local idx = [ configure.find-builds "default architecture" : $(filtered)
|
|
: /boost/architecture//arm
|
|
+ : /boost/architecture//e2k
|
|
: /boost/architecture//loongarch
|
|
: /boost/architecture//mips
|
|
: /boost/architecture//power
|
|
diff -rupN a/libs/config/checks/architecture/e2k.cpp b/libs/config/checks/architecture/e2k.cpp
|
|
--- a/libs/config/checks/architecture/e2k.cpp 1970-01-01 03:00:00.000000000 +0300
|
|
+++ b/libs/config/checks/architecture/e2k.cpp 2023-11-27 05:23:16.468934907 +0300
|
|
@@ -0,0 +1,11 @@
|
|
+// e2k.cpp
|
|
+//
|
|
+// Copyright (c) 2023 Elena Chernikova
|
|
+//
|
|
+// 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)
|
|
+
|
|
+#if !defined(__e2k__)
|
|
+#error "Not E2K"
|
|
+#endif
|
|
diff -rupN a/libs/config/checks/architecture/Jamfile.jam b/libs/config/checks/architecture/Jamfile.jam
|
|
--- a/libs/config/checks/architecture/Jamfile.jam 2023-11-27 05:20:13.373888576 +0300
|
|
+++ b/libs/config/checks/architecture/Jamfile.jam 2023-11-27 05:27:17.799683205 +0300
|
|
@@ -18,6 +18,7 @@ obj 64 : 64.cpp ;
|
|
|
|
obj arm : arm.cpp ;
|
|
obj combined : combined.cpp ;
|
|
+obj e2k : e2k.cpp ;
|
|
obj loongarch : loongarch.cpp ;
|
|
obj mips : mips.cpp ;
|
|
alias mips1 : mips ; # Backwards compatibility
|
|
diff -rupN a/tools/build/src/engine/jam.h b/tools/build/src/engine/jam.h
|
|
--- a/tools/build/src/engine/jam.h 2023-11-23 00:57:26.339317362 +0300
|
|
+++ b/tools/build/src/engine/jam.h 2023-11-23 00:58:21.435791668 +0300
|
|
@@ -442,6 +442,10 @@
|
|
#define OSPLAT "OSPLAT=PARISC"
|
|
#endif
|
|
|
|
+#ifdef __e2k__
|
|
+ #define OSPLAT "OSPLAT=E2K"
|
|
+#endif
|
|
+
|
|
#ifndef OSPLAT
|
|
#define OSPLAT ""
|
|
#endif
|
|
diff -rupN a/tools/build/src/tools/features/architecture-feature.jam b/tools/build/src/tools/features/architecture-feature.jam
|
|
--- a/tools/build/src/tools/features/architecture-feature.jam 2023-11-22 23:56:37.894927068 +0300
|
|
+++ b/tools/build/src/tools/features/architecture-feature.jam 2023-11-22 23:58:31.437055397 +0300
|
|
@@ -10,7 +10,7 @@ import feature ;
|
|
[[bbv2.builtin.features.architecture]]`architecture`::
|
|
*Allowed values:* `x86`, `ia64`, `sparc`, `power`, `mips`, `mips1`, `mips2`,
|
|
`mips3`, `mips4`, `mips32`, `mips32r2`, `mips64`, `parisc`, `arm`,
|
|
-`s390x`, `loongarch`.
|
|
+`s390x`, `loongarch`, `e2k`.
|
|
+
|
|
Specifies the general processor family to generate code for.
|
|
|
|
@@ -48,6 +48,9 @@ feature.feature architecture
|
|
# z Systems (aka s390x)
|
|
s390x
|
|
|
|
+ # Elbrus
|
|
+ e2k
|
|
+
|
|
# Combined architecture(s)
|
|
arm+x86
|
|
:
|