summaryrefslogtreecommitdiff
path: root/package/libhugetlbfs/patches/patch-Makefile
blob: 42ae93bc2fdb617f168dc90da7bb07d740fa4dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
	- do not call uname -m, use passed ${ADK_ARCH} variable
	- use ${CC} instead of hard-coded gcc
--- libhugetlbfs-2.11.orig/Makefile	2010-12-16 18:38:22.000000000 +0100
+++ libhugetlbfs-2.11/Makefile	2011-02-27 18:58:07.000000000 +0100
@@ -31,51 +31,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
@@ -370,7 +370,7 @@ install-libs: libs $(OBJDIRS:%=%/install
 	$(INSTALL) -d $(DESTDIR)$(HEADERDIR)
 	$(INSTALL) -d $(DESTDIR)$(LDSCRIPTDIR)
 	$(INSTALL) -d $(DESTDIR)$(BINDIR)
-	$(INSTALL) -m 644 -t $(DESTDIR)$(HEADERDIR) $(INSTALL_HEADERS)
+	$(INSTALL) -m 644 $(INSTALL_HEADERS) $(DESTDIR)$(HEADERDIR)
 	$(INSTALL) -m 644 $(INSTALL_LDSCRIPTS:%=ldscripts/%) $(DESTDIR)$(LDSCRIPTDIR)
 	for x in $(INSTALL_OBJSCRIPT); do \
 		$(INSTALL) -m 755 objscript.$$x $(DESTDIR)$(BINDIR)/$$x; done