tnintemann / rpms / boost

Forked from rpms/boost 4 years ago
Clone

Blame SOURCES/boost-1.66-build-s390x.patch

62e5e2
62e5e2
--- boost_1_66_0/boost/predef/architecture.h	2017-12-14 00:56:47.000000000 +0100
62e5e2
+++ boost_1_66_0-git/boost/predef/architecture.h	2020-03-23 11:37:30.289735409 +0100
62e5e2
@@ -21,6 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt)
62e5e2
 #include <boost/predef/architecture/ppc.h>
62e5e2
 #include <boost/predef/architecture/pyramid.h>
62e5e2
 #include <boost/predef/architecture/rs6k.h>
62e5e2
+#include <boost/predef/architecture/s390x.h>
62e5e2
 #include <boost/predef/architecture/sparc.h>
62e5e2
 #include <boost/predef/architecture/superh.h>
62e5e2
 #include <boost/predef/architecture/sys370.h>
62e5e2
--- boost_1_66_0/boost/predef/architecture/s390x.h	1970-01-01 01:00:00.000000000 +0100
62e5e2
+++ boost_1_66_0-git/boost/predef/architecture/s390x.h	2020-03-23 11:37:48.519735409 +0100
62e5e2
@@ -0,0 +1,42 @@
62e5e2
+/*
62e5e2
+Copyright Andreas Krebbel 2020
62e5e2
+Distributed under the Boost Software License, Version 1.0.
62e5e2
+(See accompanying file LICENSE_1_0.txt or copy at
62e5e2
+http://www.boost.org/LICENSE_1_0.txt)
62e5e2
+*/
62e5e2
+
62e5e2
+#ifndef BOOST_PREDEF_ARCHITECTURE_S390X_H
62e5e2
+#define BOOST_PREDEF_ARCHITECTURE_S390X_H
62e5e2
+
62e5e2
+#include <boost/predef/version_number.h>
62e5e2
+#include <boost/predef/make.h>
62e5e2
+
62e5e2
+/*`
62e5e2
+[heading `BOOST_ARCH_S390X`]
62e5e2
+
62e5e2
+[@http://en.wikipedia.org/wiki/System/390 System/390] architecture.
62e5e2
+
62e5e2
+[table
62e5e2
+    [[__predef_symbol__] [__predef_version__]]
62e5e2
+
62e5e2
+    [[`__s390x__`] [__predef_detection__]]
62e5e2
+    ]
62e5e2
+ */
62e5e2
+
62e5e2
+#define BOOST_ARCH_S390X BOOST_VERSION_NUMBER_NOT_AVAILABLE
62e5e2
+
62e5e2
+#if defined(__s390x__)
62e5e2
+#   undef BOOST_ARCH_S390X
62e5e2
+#   define BOOST_ARCH_S390X BOOST_VERSION_NUMBER_AVAILABLE
62e5e2
+#endif
62e5e2
+
62e5e2
+#if BOOST_ARCH_S390X
62e5e2
+#   define BOOST_ARCH_S390X_AVAILABLE
62e5e2
+#endif
62e5e2
+
62e5e2
+#define BOOST_ARCH_S390X_NAME "IBM Z"
62e5e2
+
62e5e2
+#endif
62e5e2
+
62e5e2
+#include <boost/predef/detail/test.h>
62e5e2
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_S390X,BOOST_ARCH_S390X_NAME)
62e5e2
--- boost_1_66_0/boostcpp.jam	2017-12-14 00:56:35.000000000 +0100
62e5e2
+++ boost_1_66_0-git/boostcpp.jam	2020-03-23 11:37:35.829735409 +0100
62e5e2
@@ -678,7 +678,7 @@ rule address-model ( )
62e5e2
     return <conditional>@boostcpp.deduce-address-model ;
62e5e2
 }
62e5e2
 
62e5e2
-local deducable-architectures = arm mips1 power sparc x86 combined ;
62e5e2
+local deducable-architectures = arm mips1 power s390x sparc x86 combined ;
62e5e2
 feature.feature deduced-architecture : $(deducable-architectures) : propagated optional composite hidden ;
62e5e2
 for a in $(deducable-architectures)
62e5e2
 {
62e5e2
@@ -701,6 +701,10 @@ rule deduce-architecture ( properties *
62e5e2
     {
62e5e2
         result = power ;
62e5e2
     }
62e5e2
+    else if [ configure.builds /boost/architecture//s390x : $(filtered) : s390x ]
62e5e2
+    {
62e5e2
+        result = s390x ;
62e5e2
+    }
62e5e2
     else if [ configure.builds /boost/architecture//sparc : $(filtered) : sparc ]
62e5e2
     {
62e5e2
         result = sparc ;
62e5e2
--- boost_1_66_0/libs/config/checks/architecture/Jamroot.jam	2017-12-14 00:56:42.000000000 +0100
62e5e2
+++ boost_1_66_0-git/libs/config/checks/architecture/Jamroot.jam	2020-03-23 11:37:35.829735409 +0100
62e5e2
@@ -19,5 +19,6 @@ obj arm      : arm.cpp ;
62e5e2
 obj combined : combined.cpp ;
62e5e2
 obj mips1    : mips1.cpp ;
62e5e2
 obj power    : power.cpp ;
62e5e2
+obj s390x    : s390x.cpp ;
62e5e2
 obj sparc    : sparc.cpp ;
62e5e2
 obj x86      : x86.cpp ;
62e5e2
--- boost_1_66_0/libs/config/checks/architecture/s390x.cpp	1970-01-01 01:00:00.000000000 +0100
62e5e2
+++ boost_1_66_0-git/libs/config/checks/architecture/s390x.cpp	2020-03-23 11:37:35.829735409 +0100
62e5e2
@@ -0,0 +1,11 @@
62e5e2
+// s390x.cpp
62e5e2
+//
62e5e2
+// Copyright (c) 2020 Andreas Krebbel
62e5e2
+//
62e5e2
+// Distributed under the Boost Software License Version 1.0. (See
62e5e2
+// accompanying file LICENSE_1_0.txt or copy at
62e5e2
+// http://www.boost.org/LICENSE_1_0.txt)
62e5e2
+
62e5e2
+#if !defined(__s390x__)
62e5e2
+#error "Not IBM Z"
62e5e2
+#endif
62e5e2
--- boost_1_66_0/tools/build/src/tools/builtin.py	2017-12-14 00:56:50.000000000 +0100
62e5e2
+++ boost_1_66_0-git/tools/build/src/tools/builtin.py	2020-03-23 11:37:35.829735409 +0100
62e5e2
@@ -250,6 +250,9 @@ def register_globals ():
62e5e2
         # ia64
62e5e2
         'ia64',
62e5e2
 
62e5e2
+        # IBM Z
62e5e2
+        's390x',
62e5e2
+
62e5e2
         # Sparc
62e5e2
         'sparc',
62e5e2
 
62e5e2
--- boost_1_66_0/tools/build/src/tools/features/architecture-feature.jam	2017-12-14 00:56:50.000000000 +0100
62e5e2
+++ boost_1_66_0-git/tools/build/src/tools/features/architecture-feature.jam	2020-03-23 11:37:35.829735409 +0100
62e5e2
@@ -15,6 +15,9 @@ feature.feature architecture
62e5e2
         # ia64
62e5e2
         ia64
62e5e2
 
62e5e2
+	# IBM Z
62e5e2
+	s390x
62e5e2
+
62e5e2
         # Sparc
62e5e2
         sparc
62e5e2