void-packages/srcpkgs/xfsprogs/patches/cross_compile.patch

23 lines
757 B
Diff

--- libxfs/Makefile.orig 2014-09-08 15:26:46.443766634 +0200
+++ libxfs/Makefile 2014-09-08 15:27:31.618767187 +0200
@@ -66,8 +66,8 @@
default: crc32selftest ltdepend $(LTLIBRARY)
crc32table.h: gen_crc32table.c
- @echo " [CC] gen_crc32table"
- $(Q) $(CC) $(CFLAGS) -o gen_crc32table $<
+ @echo " [BUILD_CC] gen_crc32table"
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
@echo " [GENERATE] $@"
$(Q) ./gen_crc32table > crc32table.h
@@ -78,7 +78,7 @@
# disk.
crc32selftest: gen_crc32table.c crc32table.h crc32.c
@echo " [TEST] CRC32"
- $(Q) $(CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -I. -I../include -D CRC32_SELFTEST=1 crc32.c -o $@
$(Q) ./$@
include $(BUILDRULES)