patch-Makefile 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- yaboot-1.3.17.orig/Makefile 2011-10-18 06:11:10.000000000 +0200
  2. +++ yaboot-1.3.17/Makefile 2018-06-08 23:26:05.000000000 +0200
  3. @@ -7,7 +7,7 @@ VERSION = 1.3.17
  4. DEBUG = 0
  5. # make install vars
  6. ROOT =
  7. -PREFIX = usr/local
  8. +PREFIX = usr
  9. MANDIR = man
  10. # command used to get root (needed for tarball creation)
  11. GETROOT = fakeroot
  12. @@ -25,7 +25,7 @@ KERNELADDR = 0x00000000
  13. # Set this to the prefix of your cross-compiler, if you have one.
  14. # Else leave it empty.
  15. #
  16. -CROSS =
  17. +CROSS ?=
  18. CC := $(CROSS)gcc
  19. LD := $(CROSS)ld
  20. @@ -39,7 +39,7 @@ YBCFLAGS += -DVERSION="\"${VERSION}${VER
  21. YBCFLAGS += -DTEXTADDR=$(TEXTADDR) -DDEBUG=$(DEBUG)
  22. YBCFLAGS += -DMALLOCADDR=$(MALLOCADDR) -DMALLOCSIZE=$(MALLOCSIZE)
  23. YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
  24. -YBCFLAGS += -Werror -fdiagnostics-show-option
  25. +YBCFLAGS += -fdiagnostics-show-option
  26. YBCFLAGS += -I ./include
  27. YBCFLAGS += -fno-strict-aliasing
  28. @@ -59,22 +59,18 @@ ifeq ($(CONFIG_FS_XFS),y)
  29. YBCFLAGS += -DCONFIG_FS_XFS
  30. endif
  31. -ifeq ($(CONFIG_FS_REISERFS),y)
  32. -YBCFLAGS += -DCONFIG_FS_REISERFS
  33. -endif
  34. -
  35. # Link flags
  36. #
  37. -LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
  38. +LFLAGS = -static -Ttext $(TEXTADDR) -melf32ppclinux
  39. # Libraries
  40. #
  41. -LLIBS = -lext2fs
  42. +#LLIBS = -lext2fs -static
  43. # For compiling userland utils
  44. #
  45. UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include
  46. -UCFLAGS += -Werror -fdiagnostics-show-option
  47. +UCFLAGS += -fdiagnostics-show-option
  48. # For compiling build-tools that run on the host.
  49. #
  50. @@ -85,7 +81,7 @@ HOSTCFLAGS = -O2 $(CFLAGS) -Wall -I/usr/
  51. OBJS = second/crt0.o second/yaboot.o second/cache.o second/prom.o second/file.o \
  52. second/partition.o second/fs.o second/cfg.o second/setjmp.o second/cmdline.o \
  53. - second/fs_of.o second/fs_ext2.o second/fs_iso.o second/fs_swap.o \
  54. + second/fs_of.o second/fs_iso.o second/fs_swap.o \
  55. second/iso_util.o \
  56. lib/nonstd.o \
  57. lib/nosys.o lib/string.o lib/strtol.o lib/vsprintf.o lib/ctype.o lib/malloc.o lib/strstr.o
  58. @@ -98,14 +94,10 @@ ifeq ($(CONFIG_FS_XFS),y)
  59. OBJS += second/fs_xfs.o
  60. endif
  61. -ifeq ($(CONFIG_FS_REISERFS),y)
  62. -OBJS += second/fs_reiserfs.o
  63. -endif
  64. -
  65. # compilation
  66. lgcc = `$(CC) -m32 -print-libgcc-file-name`
  67. -all: yaboot addnote mkofboot
  68. +all: yaboot
  69. yaboot: $(OBJS)
  70. $(LD) $(LFLAGS) $(OBJS) $(LLIBS) $(lgcc) -o second/$@
  71. @@ -181,13 +173,11 @@ strip: all
  72. strip util/addnote
  73. strip --remove-section=.comment --remove-section=.note util/addnote
  74. -install: all strip
  75. +install: all
  76. install -d -o root -g root -m 0755 ${ROOT}/etc/
  77. install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/sbin/
  78. install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib
  79. install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/lib/yaboot
  80. - install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man5/
  81. - install -d -o root -g root -m 0755 ${ROOT}/${PREFIX}/${MANDIR}/man8/
  82. install -o root -g root -m 0644 second/yaboot ${ROOT}/$(PREFIX)/lib/yaboot
  83. install -o root -g root -m 0755 util/addnote ${ROOT}/${PREFIX}/lib/yaboot/addnote
  84. install -o root -g root -m 0644 first/ofboot ${ROOT}/${PREFIX}/lib/yaboot/ofboot