squashfs3-3.4-build-system-fix.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. [PATCH]: squashfs-tools: Handle user supplied CFLAGS/LDFLAGS
  2. Properly handle make CFLAGS=.. LDFLAGS=..
  3. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
  4. ---
  5. squashfs-tools/Makefile | 4 ++--
  6. 1 file changed, 2 insertions(+), 2 deletions(-)
  7. Index: squashfs3.4/squashfs-tools/Makefile
  8. ===================================================================
  9. --- squashfs3.4.orig/squashfs-tools/Makefile 2008-08-26 09:10:13.000000000 +0200
  10. +++ squashfs3.4/squashfs-tools/Makefile 2010-05-06 21:09:28.000000000 +0200
  11. @@ -2,12 +2,12 @@
  12. INCLUDEDIR = .
  13. -CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
  14. +override CFLAGS += -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
  15. all: mksquashfs unsquashfs
  16. mksquashfs: mksquashfs.o read_fs.o sort.o
  17. - $(CC) mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o $@
  18. + $(CC) $(LDFLAGS) mksquashfs.o read_fs.o sort.o -lz -lpthread -lm -o $@
  19. mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h
  20. @@ -16,7 +16,7 @@
  21. sort.o: sort.c squashfs_fs.h global.h sort.h
  22. unsquashfs: unsquashfs.o
  23. - $(CC) unsquashfs.o -lz -lpthread -lm -o $@
  24. + $(CC) $(LDFLAGS) unsquashfs.o -lz -lpthread -lm -o $@
  25. unsquashfs.o: unsquashfs.c squashfs_fs.h read_fs.h global.h