[libhugetlbfs] - Fix build on s390/s390x (patch by aarapov at rh.c) - Use Fedora CFLAGS for build

Dan Horák sharkcz at fedoraproject.org
Thu Jul 25 12:33:32 UTC 2013


commit b0cc4da6563e25010ddc7fffed003831fba8887f
Author: Dan Horák <dan at danny.cz>
Date:   Thu Jul 25 14:33:20 2013 +0200

    - Fix build on s390/s390x (patch by aarapov at rh.c)
    - Use Fedora CFLAGS for build

 libhugetlbfs-2.16-s390.patch |   32 ++++++++++++++++++++++++++++++++
 libhugetlbfs.spec            |   12 ++++++++----
 2 files changed, 40 insertions(+), 4 deletions(-)
---
diff --git a/libhugetlbfs-2.16-s390.patch b/libhugetlbfs-2.16-s390.patch
new file mode 100644
index 0000000..1523468
--- /dev/null
+++ b/libhugetlbfs-2.16-s390.patch
@@ -0,0 +1,32 @@
+diff -up libhugetlbfs-2.16/Makefile.s390 libhugetlbfs-2.16/Makefile
+--- libhugetlbfs-2.16/Makefile.s390	2013-05-12 08:49:28.160883455 +0200
++++ libhugetlbfs-2.16/Makefile	2013-05-12 08:49:39.586906994 +0200
+@@ -84,17 +84,26 @@ CFLAGS += -DNO_ELFLINK
+ else
+ ifeq ($(ARCH),s390x)
+ CC64 = gcc -m64
+-CC32 = gcc -m31
+-ELF32 = elf_s390
+ ELF64 = elf64_s390
+ TMPLIB64 = lib64
+ TMPLIB32 = lib
+ CUSTOM_LDSCRIPTS = no
++ifneq ($(BUILDTYPE),NATIVEONLY)
++CC32 = gcc -m31
++ELF32 = elf_s390
++endif
++else
++ifeq ($(ARCH),s390)
++CC32 = gcc -m31
++ELF32 = elf_s390
++TMPLIB32 = lib
++CUSTOM_LDSCRIPTS = no
+ else
+ $(error "Unrecognized architecture ($(ARCH))")
+ endif
+ endif
+ endif
++endif
+ endif
+ endif
+ endif
diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec
index 4421639..0a6e169 100644
--- a/libhugetlbfs.spec
+++ b/libhugetlbfs.spec
@@ -1,13 +1,13 @@
 Name: libhugetlbfs
 Version: 2.16
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: A library which provides easy access to huge pages of memory
 
 Group: System Environment/Libraries
 License: LGPLv2+
 URL: http://libhugetlbfs.sourceforge.net/
 Source0: http://downloads.sourceforge.net/libhugetlbfs/%{name}-%{version}.tar.gz
-#Patch0: libhugetlbfs-2.13-s390x-build.patch
+Patch0: libhugetlbfs-2.16-s390.patch
 
 BuildRequires: glibc-devel
 BuildRequires: glibc-static
@@ -41,11 +41,11 @@ pool size control. pagesize lists page sizes available on the machine.
 
 %prep
 %setup -q -n %{name}-%{version}
-#%patch0 -p1 -b .s390x-build
+%patch0 -p1 -b .s390
 
 %build
 # Parallel builds are not reliable
-make BUILDTYPE=NATIVEONLY
+CFLAGS="%{optflags}" make BUILDTYPE=NATIVEONLY
 
 %install
 make install PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT LDSCRIPTDIR=%{ldscriptdir} BUILDTYPE=NATIVEONLY
@@ -103,6 +103,10 @@ rm -fr $RPM_BUILD_ROOT/%{_sbindir}/
 %exclude /usr/lib/perl5/TLBC
 
 %changelog
+* Thu Jul 25 2013 Dan Horák <dan[at]danny.cz> - 2.16-2
+- Fix build on s390/s390x (patch by aarapov at rh.c)
+- Use Fedora CFLAGS for build
+
 * Mon Apr 29 2013 Peter Robinson <pbrobinson at fedoraproject.org> 2.16-1
 - Upstream 2.16 release (adds ARM support)
 


More information about the scm-commits mailing list