diff options
author | Phil Sutter <phil.sutter@viprinet.com> | 2011-01-19 11:46:28 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-01-20 14:00:28 +0100 |
commit | 438b1f972d897987ce95cdd28bcab264b9d820c4 (patch) | |
tree | e9e79a7ec9126cc2e2f030e943d2fd02e748a7af /package/libhugetlbfs | |
parent | 9739631579b741dabcaf335ee3657913bb5324c2 (diff) |
port libhugetlbfs
Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Diffstat (limited to 'package/libhugetlbfs')
-rw-r--r-- | package/libhugetlbfs/Makefile | 36 | ||||
-rw-r--r-- | package/libhugetlbfs/patches/patch-Makefile | 67 |
2 files changed, 103 insertions, 0 deletions
diff --git a/package/libhugetlbfs/Makefile b/package/libhugetlbfs/Makefile new file mode 100644 index 000000000..600d154e9 --- /dev/null +++ b/package/libhugetlbfs/Makefile @@ -0,0 +1,36 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(TOPDIR)/rules.mk + +PKG_NAME:= libhugetlbfs +PKG_VERSION:= 2.6 +PKG_RELEASE:= 1 +PKG_MD5SUM:= cda489010e5bb89eb59994f689f8693e +PKG_DESCR:= easy hugepage access +PKG_SECTION:= libs +PKG_URL:= http://libhugetlbfs.ozlabs.org/ +PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libhugetlbfs/} + +include $(TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,LIBHUGETLBFS,$(PKG_NAME),$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual +XAKE_FLAGS+= PREFIX=/usr DESTDIR=${WRKINST} ADK_ARCH=${CPU_ARCH} +ALL_TARGET:= libs tools + +post-install: + $(INSTALL_DIR) $(IDIR_LIBHUGETLBFS)/usr/{bin,lib,share/libhugetlbfs/ldscripts} + $(INSTALL_BIN) $(WRKINST)/usr/bin/{cpupcstat,huge{adm,ctl,edit},pagesize} \ + $(IDIR_LIBHUGETLBFS)/usr/bin + ${INSTALL_DATA} ${WRKINST}/usr/lib/libhugetlbfs* \ + ${IDIR_LIBHUGETLBFS}/usr/lib + ${INSTALL_BIN} ${WRKINST}/usr/share/libhugetlbfs/ld.hugetlbfs \ + ${IDIR_LIBHUGETLBFS}/usr/share/libhugetlbfs + ${INSTALL_DATA} ${WRKINST}/usr/share/libhugetlbfs/ldscripts/* \ + ${IDIR_LIBHUGETLBFS}/usr/share/libhugetlbfs/ldscripts + ${CP} ${WRKINST}/usr/share/libhugetlbfs/ld \ + ${IDIR_LIBHUGETLBFS}/usr/share/libhugetlbfs + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/libhugetlbfs/patches/patch-Makefile b/package/libhugetlbfs/patches/patch-Makefile new file mode 100644 index 000000000..44deaba1d --- /dev/null +++ b/package/libhugetlbfs/patches/patch-Makefile @@ -0,0 +1,67 @@ + - do not call uname -m, use passed ${ADK_ARCH} variable + - use ${CC} instead of hard-coded gcc +--- libhugetlbfs-2.6.orig/Makefile 2009-08-24 14:56:07.000000000 +0200 ++++ libhugetlbfs-2.6/Makefile 2011-01-17 15:17:03.942093253 +0100 +@@ -30,51 +30,51 @@ CFLAGS ?= -O2 -g + CFLAGS += -Wall -fPIC + CPPFLAGS += -D__LIBHUGETLBFS__ + +-ARCH = $(shell uname -m | sed -e s/i.86/i386/) ++ARCH = $(shell echo ${ADK_ARCH} | sed -e s/i.86/i386/) + + ifeq ($(ARCH),ppc64) +-CC64 = gcc -m64 ++CC64 = ${CC} -m64 + ELF64 = elf64ppc + TMPLIB64 = lib64 + TMPLIB32 = lib + ifneq ($(BUILDTYPE),NATIVEONLY) +-CC32 = gcc -m32 ++CC32 = ${CC} -m32 + ELF32 = elf32ppclinux + endif + else + ifeq ($(ARCH),ppc) +-CC32 = gcc -m32 ++CC32 = ${CC} -m32 + ELF32 = elf32ppclinux + TMPLIB32 = lib + else + ifeq ($(ARCH),i386) +-CC32 = gcc ++CC32 = ${CC} + ELF32 = elf_i386 + TMPLIB32 = lib + else + ifeq ($(ARCH),x86_64) +-CC64 = gcc -m64 ++CC64 = ${CC} -m64 + ELF64 = elf_x86_64 + TMPLIB64 = lib64 + TMPLIB32 = lib + ifneq ($(BUILDTYPE),NATIVEONLY) +-CC32 = gcc -m32 ++CC32 = ${CC} -m32 + ELF32 = elf_i386 + endif + else + ifeq ($(ARCH),ia64) +-CC64 = gcc ++CC64 = ${CC} + TMPLIB64 = lib64 + CFLAGS += -DNO_ELFLINK + else + ifeq ($(ARCH),sparc64) +-CC64 = gcc -m64 ++CC64 = ${CC} -m64 + TMPLIB64 = lib64 + CFLAGS += -DNO_ELFLINK + else + ifeq ($(ARCH),s390x) +-CC64 = gcc -m64 +-CC32 = gcc -m31 ++CC64 = ${CC} -m64 ++CC32 = ${CC} -m31 + TMPLIB64 = lib64 + TMPLIB32 = lib + CFLAGS += -DNO_ELFLINK |