Skip to contentSkip to conversation

Make check-libext2fs cross-friendly

PATCH New Aron Griffis 1 participant 1 message Jan 27, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Make check-libext2fs cross-friendly

Hi,

I found this while cross-compiling for ia64 on x86_64. The script would detect the libext2fs version on the host rather in the sys-root, then the build would fail.

Thanks,
Aron

# HG changeset patch
# User Aron Griffis <[email protected]>
# Date 1201468421 18000
# Node ID 32d4dda41994b04fcf233e9020bfd1e6d59d4552 # Parent b79802517a75a23abb88eda900ff802810a6add6 Make check-libext2fs cross-friendly

check-libext2fs was calling host gcc; pass $CC from Makefile so it can call the cross-compiler instead.

tools/libfsimage/Makefile +1 -1
diff -r b79802517a75 -r 32d4dda41994 tools/libfsimage/Makefile
@@ -2,7 +2,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 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:
tools/libfsimage/check-libext2fs +1 -1
diff -r b79802517a75 -r 32d4dda41994 tools/libfsimage/check-libext2fs
@@ -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