Make check-libext2fs cross-friendly
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jan 2008 09:33:57 +0000 (09:33 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 28 Jan 2008 09:33:57 +0000 (09:33 +0000)
check-libext2fs was calling host gcc; pass $CC from Makefile
so it can call the cross-compiler instead.

Signed-off-by: Aron Griffis <aron@hp.com>
tools/libfsimage/Makefile
tools/libfsimage/check-libext2fs

index 5dc1e65f998bcba1bbe955d9f4286c122fee7b67..fd40686201ba08326f684b09a4d00d76d163ecfe 100644 (file)
@@ -2,7 +2,7 @@ XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 SUBDIRS-y = common ufs reiserfs iso9660 fat
-SUBDIRS-y += $(shell ./check-libext2fs)
+SUBDIRS-y += $(shell env CC="$(CC)" ./check-libext2fs)
 
 .PHONY: all
 all install clean:
index 2f654cc4af2c927a78e7aeefe017e381accb7aca..e6a8d186fcd9e5791a2ab7606711f64e645d65bd 100755 (executable)
@@ -9,7 +9,7 @@ int main()
 }
 EOF
 
-gcc -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1
+${CC:-gcc} -o ext2-test ext2-test.c -lext2fs >/dev/null 2>&1
 if [ $? = 0 ]; then
        echo ext2fs-lib
 else