[tog-pegasus] Add initial 64-bit ARM (Aarch64) support.
vcrhonek
vcrhonek at fedoraproject.org
Mon Jul 22 16:47:02 UTC 2013
commit 248ddffa7b5912d36f6d6fd4caa0b02bea09ab8c
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Mon Jul 22 18:46:45 2013 +0200
Add initial 64-bit ARM (Aarch64) support.
pegasus-2.12.1-aarch64.patch | 276 ++++++++++++++++++++++++++++++++++++++++++
tog-pegasus.spec | 12 ++-
2 files changed, 287 insertions(+), 1 deletions(-)
---
diff --git a/pegasus-2.12.1-aarch64.patch b/pegasus-2.12.1-aarch64.patch
new file mode 100644
index 0000000..f376da8
--- /dev/null
+++ b/pegasus-2.12.1-aarch64.patch
@@ -0,0 +1,276 @@
+diff -up pegasus/mak/platform_LINUX_AARCH64_GNU.mak.aarch64 pegasus/mak/platform_LINUX_AARCH64_GNU.mak
+--- pegasus/mak/platform_LINUX_AARCH64_GNU.mak.aarch64 2013-06-26 18:25:52.000000000 -0400
++++ pegasus/mak/platform_LINUX_AARCH64_GNU.mak 2013-06-26 18:25:52.000000000 -0400
+@@ -0,0 +1,72 @@
++#//%LICENSE////////////////////////////////////////////////////////////////
++#//
++#// Licensed to The Open Group (TOG) under one or more contributor license
++#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
++#// this work for additional information regarding copyright ownership.
++#// Each contributor licenses this file to you under the OpenPegasus Open
++#// Source License; you may not use this file except in compliance with the
++#// License.
++#//
++#// Permission is hereby granted, free of charge, to any person obtaining a
++#// copy of this software and associated documentation files (the "Software"),
++#// to deal in the Software without restriction, including without limitation
++#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++#// and/or sell copies of the Software, and to permit persons to whom the
++#// Software is furnished to do so, subject to the following conditions:
++#//
++#// The above copyright notice and this permission notice shall be included
++#// in all copies or substantial portions of the Software.
++#//
++#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#//
++#//////////////////////////////////////////////////////////////////////////
++# Platform Configuration for Linux on AARCH64
++# If you have generic Linux config options, please place them in config-linux.mak
++
++include $(ROOT)/mak/config-linux.mak
++
++ARCHITECTURE = AARCH64
++CXX_MACHINE_OPTIONS =
++LINK_MACHINE_OPTIONS =
++#//%LICENSE////////////////////////////////////////////////////////////////
++#//
++#// Licensed to The Open Group (TOG) under one or more contributor license
++#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
++#// this work for additional information regarding copyright ownership.
++#// Each contributor licenses this file to you under the OpenPegasus Open
++#// Source License; you may not use this file except in compliance with the
++#// License.
++#//
++#// Permission is hereby granted, free of charge, to any person obtaining a
++#// copy of this software and associated documentation files (the "Software"),
++#// to deal in the Software without restriction, including without limitation
++#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++#// and/or sell copies of the Software, and to permit persons to whom the
++#// Software is furnished to do so, subject to the following conditions:
++#//
++#// The above copyright notice and this permission notice shall be included
++#// in all copies or substantial portions of the Software.
++#//
++#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#//
++#//////////////////////////////////////////////////////////////////////////
++# Platform Configuration for Linux on AARCH64
++# If you have generic Linux config options, please place them in config-linux.mak
++
++include $(ROOT)/mak/config-linux.mak
++
++ARCHITECTURE = AARCH64
++CXX_MACHINE_OPTIONS =
++LINK_MACHINE_OPTIONS =
+diff -up pegasus/mak/SDKMakefile.aarch64 pegasus/mak/SDKMakefile
+--- pegasus/mak/SDKMakefile.aarch64 2013-06-26 18:25:51.000000000 -0400
++++ pegasus/mak/SDKMakefile 2013-06-26 18:25:52.000000000 -0400
+@@ -67,6 +67,7 @@ endif
+
+ ifeq ($(OS),linux)
+ PACKAGED_PLATFORM_FILES = \
++ LINUX_AARCH64_GNU \
+ LINUX_IA64_GNU \
+ LINUX_IX86_GNU \
+ LINUX_IX86_CLANG \
+@@ -436,6 +437,13 @@ createSDKEnvVarFile:
+ createConfigFile_setPegasusPlatform:
+ ifeq ($(RUNTIME_PLATFORM_TEST_NEEDED), true)
+ ifeq ($(OS),linux)
++ @$(ECHO-E) " ifeq (\044(shell uname -i),aarch64)" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++ @$(ECHO-E) " PEGASUS_PLATFORM = LINUX_AARCH64_GNU" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++ @$(ECHO-E) " endif" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++
+ @$(ECHO-E) " ifeq (\044(shell uname -i),ia64)" \
+ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
+ @$(ECHO-E) " PEGASUS_PLATFORM = LINUX_IA64_GNU" \
+@@ -527,6 +535,13 @@ endif
+ createConfigFile_setPlatformArchitecture:
+ ifeq ($(RUNTIME_PLATFORM_TEST_NEEDED), true)
+ ifeq ($(OS),linux)
++ @$(ECHO-E) "ifeq (\044(PEGASUS_PLATFORM),LINUX_AARCH64_GNU)" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++ @$(ECHO-E) " PEGASUS_ARCH_LIB = lib64" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++ @$(ECHO-E) "endif" \
++ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
++
+ @$(ECHO-E) "ifeq (\044(PEGASUS_PLATFORM),LINUX_IA64_GNU)" \
+ >> $(PEGASUS_STAGING_DIR)$(PEGASUS_SAMPLES_DIR)/mak/config.mak
+ @$(ECHO-E) " PEGASUS_ARCH_LIB = lib" \
+diff -up pegasus/src/Pegasus/Common/Config.h.aarch64 pegasus/src/Pegasus/Common/Config.h
+--- pegasus/src/Pegasus/Common/Config.h.aarch64 2013-06-26 18:25:51.000000000 -0400
++++ pegasus/src/Pegasus/Common/Config.h 2013-06-26 18:25:52.000000000 -0400
+@@ -100,6 +100,8 @@
+ # include <Pegasus/Common/Platform_VMS_IA64_DECCXX.h>
+ #elif defined (PEGASUS_PLATFORM_LINUX_XSCALE_GNU)
+ # include <Pegasus/Common/Platform_LINUX_XSCALE_GNU.h>
++#elif defined (PEGASUS_PLATFORM_LINUX_AARCH64_GNU)
++# include <Pegasus/Common/Platform_LINUX_AARCH64_GNU.h>
+ #elif defined (PEGASUS_PLATFORM_LINUX_X86_64_CLANG)
+ # include <Pegasus/Common/Platform_LINUX_X86_64_CLANG.h>
+ #elif defined (PEGASUS_PLATFORM_LINUX_IX86_CLANG)
+diff -up pegasus/src/Pegasus/Common/Platform_LINUX_AARCH64_GNU.h.aarch64 pegasus/src/Pegasus/Common/Platform_LINUX_AARCH64_GNU.h
+--- pegasus/src/Pegasus/Common/Platform_LINUX_AARCH64_GNU.h.aarch64 2013-06-26 18:25:52.000000000 -0400
++++ pegasus/src/Pegasus/Common/Platform_LINUX_AARCH64_GNU.h 2013-06-26 18:25:52.000000000 -0400
+@@ -0,0 +1,108 @@
++//%LICENSE////////////////////////////////////////////////////////////////
++//
++// Licensed to The Open Group (TOG) under one or more contributor license
++// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
++// this work for additional information regarding copyright ownership.
++// Each contributor licenses this file to you under the OpenPegasus Open
++// Source License; you may not use this file except in compliance with the
++// License.
++//
++// Permission is hereby granted, free of charge, to any person obtaining a
++// copy of this software and associated documentation files (the "Software"),
++// to deal in the Software without restriction, including without limitation
++// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++// and/or sell copies of the Software, and to permit persons to whom the
++// Software is furnished to do so, subject to the following conditions:
++//
++// The above copyright notice and this permission notice shall be included
++// in all copies or substantial portions of the Software.
++//
++// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++//
++//////////////////////////////////////////////////////////////////////////
++//
++//%/////////////////////////////////////////////////////////////////////////////
++
++/*****************************************************************************
++ The platform configuration files in pegasus/src/Pegasus/Common/Platform_*.h
++ are intended to normalize platform/compiler differences so that Pegasus code
++ can be written to work on all platforms without requiring platform ifdefs.
++ Since these files are part of the Pegasus SDK, their contents should be
++ the minimum that achieves the stated purpose.
++
++ Examples of differences that are normalized here are support for C++
++ namespaces, 64-bit integer type, support for C++ template specialization.
++
++ Examples of things that are not appropriate in these files are the enablement
++ of Pegasus features for a specific platform and other build configuration.
++******************************************************************************/
++
++#ifndef Pegasus_Platform_LINUX_AARCH64_GNU_h
++#define Pegasus_Platform_LINUX_AARCH64_GNU_h
++
++#include <stddef.h>
++
++#define PEGASUS_OS_TYPE_UNIX
++
++#ifndef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
++#define PEGASUS_PLATFORM_LINUX_GENERIC_GNU
++#endif
++
++#define PEGASUS_OS_LINUX
++
++#define PEGASUS_POINTER_64BIT
++
++#define PEGASUS_COMPILER_GNU
++
++#define PEGASUS_UINT64 unsigned long long
++
++#define PEGASUS_SINT64 long long
++
++#define PEGASUS_HAVE_NAMESPACES
++
++#define PEGASUS_HAVE_FOR_SCOPE
++
++#define PEGASUS_HAVE_TEMPLATE_SPECIALIZATION
++
++#ifndef _GNU_SOURCE
++#define _GNU_SOURCE
++#endif
++#ifndef _REENTRANT
++#define _REENTRANT
++#endif
++#define _THREAD_SAFE
++#include <features.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <sys/param.h> /* For MAXHOSTNAMELEN */
++#include <limits.h> /* _POSIX_HOST_NAME_MAX */
++
++#if (__GNUC__ >= 4)
++# define PEGASUS_EXPORT __attribute__ ((visibility("default")))
++# define PEGASUS_IMPORT __attribute__ ((visibility("default")))
++# define PEGASUS_HIDDEN_LINKAGE __attribute__((visibility("hidden")))
++#endif
++
++#define PEGASUS_HAVE_PTHREADS
++
++#define PEGASUS_HAVE_NANOSLEEP
++
++#define PEGASUS_HAS_SIGNALS
++
++#define PEGASUS_INTEGERS_BOUNDARY_ALIGNED
++
++/* getifaddrs() avilable in gcc version >= 3.4 */
++#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
++# define PEGASUS_HAS_GETIFADDRS
++#endif
++
++/* use POSIX read-write locks on this platform */
++#define PEGASUS_USE_POSIX_RWLOCK
++
++#endif /* Pegasus_Platform_LINUX_AARCH64_GNU_h */
+diff -up pegasus/src/SDK/samples/mak/platform_LINUX_AARCH64_GNU.mak.aarch64 pegasus/src/SDK/samples/mak/platform_LINUX_AARCH64_GNU.mak
+--- pegasus/src/SDK/samples/mak/platform_LINUX_AARCH64_GNU.mak.aarch64 2013-06-26 18:25:52.000000000 -0400
++++ pegasus/src/SDK/samples/mak/platform_LINUX_AARCH64_GNU.mak 2013-06-26 18:25:52.000000000 -0400
+@@ -0,0 +1,33 @@
++#//%LICENSE////////////////////////////////////////////////////////////////
++#//
++#// Licensed to The Open Group (TOG) under one or more contributor license
++#// agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
++#// this work for additional information regarding copyright ownership.
++#// Each contributor licenses this file to you under the OpenPegasus Open
++#// Source License; you may not use this file except in compliance with the
++#// License.
++#//
++#// Permission is hereby granted, free of charge, to any person obtaining a
++#// copy of this software and associated documentation files (the "Software"),
++#// to deal in the Software without restriction, including without limitation
++#// the rights to use, copy, modify, merge, publish, distribute, sublicense,
++#// and/or sell copies of the Software, and to permit persons to whom the
++#// Software is furnished to do so, subject to the following conditions:
++#//
++#// The above copyright notice and this permission notice shall be included
++#// in all copies or substantial portions of the Software.
++#//
++#// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
++#// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++#// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++#// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
++#// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
++#// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
++#// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
++#//
++#//////////////////////////////////////////////////////////////////////////
++
++CXX_MACHINE_OPTIONS =
++LINK_MACHINE_OPTIONS =
++
++include $(ROOT)/mak/platform_LINUX_GNU.mak
diff --git a/tog-pegasus.spec b/tog-pegasus.spec
index 20e406b..3a16a20 100644
--- a/tog-pegasus.spec
+++ b/tog-pegasus.spec
@@ -8,7 +8,7 @@
Name: tog-pegasus
Version: %{major_ver}.1
-Release: 5%{?dist}
+Release: 6%{?dist}
Epoch: 2
Summary: OpenPegasus WBEM Services for Linux
@@ -85,6 +85,8 @@ Patch27: pegasus-2.12.1-atomic-operations-on-arm.patch
Patch28: pegasus-2.12.1-python-reinit-workaround.patch
# 29: change root/PG_InterOp to root/interop
Patch29: pegasus-2.12.1-interop.patch
+# 30: Add Aarch64 support
+Patch30: pegasus-2.12.1-aarch64.patch
BuildRequires: bash, sed, grep, coreutils, procps, gcc, gcc-c++
BuildRequires: libstdc++, make, pam-devel
@@ -165,6 +167,9 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
%ifarch %{arm}
%global PEGASUS_HARDWARE_PLATFORM LINUX_XSCALE_GNU
%endif
+%ifarch aarch64
+%global PEGASUS_HARDWARE_PLATFORM LINUX_AARCH64_GNU
+%endif
%global PEGASUS_ARCH_LIB %{_lib}
%global OPENSSL_HOME /usr
@@ -219,6 +224,7 @@ yes | mak/CreateDmtfSchema 233 %{SOURCE9} cim_schema_2.33.0
%patch27 -p0 -b .atomic-operations-on-arm
%patch28 -p1 -b .python-reinit
%patch29 -p1 -b .interop
+%patch30 -p1 -b .aarch64
%build
@@ -485,6 +491,10 @@ fi
%changelog
+* Mon Jul 22 2013 D.Marlin <dmarlin at redhat.com> - 2:2.12.1-6
+- Add initial 64-bit ARM (Aarch64) support.
+ See http://bugzilla.openpegasus.org/show_bug.cgi?id=9663
+
* Thu Jul 18 2013 Vitezslav Crhonek <vcrhonek at redhat.com> - 2:2.12.1-5
- Change root/PG_InterOp to root/interop
More information about the scm-commits
mailing list