diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2010-02-26 10:31:41 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-02-26 10:31:41 +0100 |
commit | 51a5b44461f5a8076fc78c2a49d2e98320e4d047 (patch) | |
tree | e4fdb434e79a2d45cd3ca33c0969d13aba2b383a /target | |
parent | 0f40a46a54a3620c88fbd52e38a0f29c6aedb9a0 (diff) | |
parent | 1d7b6f65c633865b25c8603975f9aec88e4e1275 (diff) |
Merge branch 'misc-fixes' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'target')
-rw-r--r-- | target/cramfs/cramfs.mk | 4 | ||||
-rw-r--r-- | target/squashfs/squashfs-4.0-build-system-fix.patch | 65 | ||||
-rw-r--r-- | target/squashfs/squashfsroot.mk | 4 |
3 files changed, 69 insertions, 4 deletions
diff --git a/target/cramfs/cramfs.mk b/target/cramfs/cramfs.mk index 79353b5ca..e6d63ed01 100644 --- a/target/cramfs/cramfs.mk +++ b/target/cramfs/cramfs.mk @@ -20,10 +20,10 @@ $(CRAMFS_DIR): $(DL_DIR)/$(CRAMFS_SOURCE) toolchain/patch-kernel.sh $(CRAMFS_DIR) target/cramfs/ cramfs\*.patch $(CRAMFS_DIR)/mkcramfs: $(CRAMFS_DIR) - $(MAKE) CFLAGS="-Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" -C $(CRAMFS_DIR) + $(MAKE) CFLAGS="$(HOST_CFLAGS) -Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS="$(HOST_LDFLAGS)" -C $(CRAMFS_DIR) touch -c $@ -cramfs: $(CRAMFS_DIR)/mkcramfs +cramfs: host-zlib $(CRAMFS_DIR)/mkcramfs cramfs-source: $(DL_DIR)/$(CRAMFS_SOURCE) diff --git a/target/squashfs/squashfs-4.0-build-system-fix.patch b/target/squashfs/squashfs-4.0-build-system-fix.patch new file mode 100644 index 000000000..7ba0ab94a --- /dev/null +++ b/target/squashfs/squashfs-4.0-build-system-fix.patch @@ -0,0 +1,65 @@ +Fix the build system so that CFLAGS can be overriden on the command +line to pass additionnal -I options. + +Patch borrowed from OpenEmbedded. + +Index: squashfs-4.0/squashfs-tools/Makefile +=================================================================== +--- squashfs-4.0.orig/squashfs-tools.orig/Makefile 2009-04-19 01:47:43.000000000 +0200 ++++ squashfs-4.0/squashfs-tools/Makefile 2009-04-19 01:52:36.000000000 +0200 +@@ -1,36 +1,48 @@ + INSTALL_DIR = /usr/local/bin + + INCLUDEDIR = . ++CFLAGS_R = -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE ++LIBS = -lz -lpthread + + CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 + + all: mksquashfs unsquashfs + + mksquashfs: mksquashfs.o read_fs.o sort.o swap.o pseudo.o +- $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o -lz -lpthread -lm -o $@ ++ $(CC) $(LDFLAGS) mksquashfs.o read_fs.o sort.o swap.o pseudo.o -lz -lpthread -lm -o $@ + + mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h squashfs_swap.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h squashfs_swap.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + sort.o: sort.c squashfs_fs.h global.h sort.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + swap.o: swap.c Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + pseudo.o: pseudo.c pseudo.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + unsquashfs: unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o +- $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o -lz -lpthread -lm -o $@ ++ $(CC) $(LDFLAGS) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o -lz -lpthread -lm -o $@ + +-unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h Makefile ++unsquashfs.o: unsquashfs.c unsquashfs.h squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + +-unsquash-1.o: unsquashfs.h unsquash-1.c squashfs_fs.h squashfs_compat.h global.h Makefile ++unsquash-1.o: unsquash-1.c unsquashfs.h squashfs_fs.h squashfs_compat.h global.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + +-unsquash-2.o: unsquashfs.h unsquash-2.c unsquashfs.h squashfs_fs.h squashfs_compat.h global.h Makefile ++unsquash-2.o: unsquash-2.c unsquashfs.h unsquashfs.h squashfs_fs.h squashfs_compat.h global.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + +-unsquash-3.o: unsquashfs.h unsquash-3.c squashfs_fs.h squashfs_compat.h global.h Makefile ++unsquash-3.o: unsquash-3.c unsquashfs.h squashfs_fs.h squashfs_compat.h global.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + +-unsquash-4.o: unsquashfs.h unsquash-4.c squashfs_fs.h squashfs_swap.h global.h Makefile ++unsquash-4.o: unsquash-4.c unsquashfs.h squashfs_fs.h squashfs_swap.h global.h Makefile ++ $(CC) $(CFLAGS_R) $(CFLAGS) -c -o $@ $< + + clean: + -rm -f *.o mksquashfs unsquashfs diff --git a/target/squashfs/squashfsroot.mk b/target/squashfs/squashfsroot.mk index ebb0cd2bd..63adc5c36 100644 --- a/target/squashfs/squashfsroot.mk +++ b/target/squashfs/squashfsroot.mk @@ -18,9 +18,9 @@ $(SQUASHFS_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFS_SOURCE) #$(SQUASHFS_PATCH) touch $@ $(SQUASHFS_DIR)/squashfs-tools/mksquashfs: $(SQUASHFS_DIR)/.unpacked - $(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools + $(MAKE) CFLAGS="$(HOST_CFLAGS)" LDFLAGS="$(HOST_LDFLAGS)" -C $(SQUASHFS_DIR)/squashfs-tools -squashfs: $(SQUASHFS_DIR)/squashfs-tools/mksquashfs +squashfs: host-zlib $(SQUASHFS_DIR)/squashfs-tools/mksquashfs squashfs-source: $(DL_DIR)/$(SQUASHFS_SOURCE) |