patch-Makefile 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. - do not call uname -m, use passed ${ADK_ARCH} variable
  2. - use ${CC} instead of hard-coded gcc
  3. --- libhugetlbfs-2.11.orig/Makefile 2010-12-16 18:38:22.000000000 +0100
  4. +++ libhugetlbfs-2.11/Makefile 2011-01-22 21:09:48.008659615 +0100
  5. @@ -31,51 +31,51 @@ CFLAGS ?= -O2 -g
  6. CFLAGS += -Wall -fPIC
  7. CPPFLAGS += -D__LIBHUGETLBFS__
  8. -ARCH = $(shell uname -m | sed -e s/i.86/i386/)
  9. +ARCH = $(shell echo ${ADK_ARCH} | sed -e s/i.86/i386/)
  10. ifeq ($(ARCH),ppc64)
  11. -CC64 = gcc -m64
  12. +CC64 = ${CC} -m64
  13. ELF64 = elf64ppc
  14. TMPLIB64 = lib64
  15. TMPLIB32 = lib
  16. ifneq ($(BUILDTYPE),NATIVEONLY)
  17. -CC32 = gcc -m32
  18. +CC32 = ${CC} -m32
  19. ELF32 = elf32ppclinux
  20. endif
  21. else
  22. ifeq ($(ARCH),ppc)
  23. -CC32 = gcc -m32
  24. +CC32 = ${CC} -m32
  25. ELF32 = elf32ppclinux
  26. TMPLIB32 = lib
  27. else
  28. ifeq ($(ARCH),i386)
  29. -CC32 = gcc
  30. +CC32 = ${CC}
  31. ELF32 = elf_i386
  32. TMPLIB32 = lib
  33. else
  34. ifeq ($(ARCH),x86_64)
  35. -CC64 = gcc -m64
  36. +CC64 = ${CC} -m64
  37. ELF64 = elf_x86_64
  38. TMPLIB64 = lib64
  39. TMPLIB32 = lib
  40. ifneq ($(BUILDTYPE),NATIVEONLY)
  41. -CC32 = gcc -m32
  42. +CC32 = ${CC} -m32
  43. ELF32 = elf_i386
  44. endif
  45. else
  46. ifeq ($(ARCH),ia64)
  47. -CC64 = gcc
  48. +CC64 = ${CC}
  49. TMPLIB64 = lib64
  50. CFLAGS += -DNO_ELFLINK
  51. else
  52. ifeq ($(ARCH),sparc64)
  53. -CC64 = gcc -m64
  54. +CC64 = ${CC} -m64
  55. TMPLIB64 = lib64
  56. CFLAGS += -DNO_ELFLINK
  57. else
  58. ifeq ($(ARCH),s390x)
  59. -CC64 = gcc -m64
  60. -CC32 = gcc -m31
  61. +CC64 = ${CC} -m64
  62. +CC32 = ${CC} -m31
  63. TMPLIB64 = lib64
  64. TMPLIB32 = lib
  65. CFLAGS += -DNO_ELFLINK