Skip to contentSkip to conversation

A patch for cross compiling

PATCH New INAKOSHI Hiroya 1 participant 2 messages Jul 31, 2006 – Aug 16, 2006

lore
Share & tools
lore
#0 lore raw

It seems that new Qemu needs this patch for cross compiling some objects under tools/ directory.

Tested by compiling (and booting Domain-0, just in case.)

tools/blktap/lib/Makefile +1 -1
diff -r 2d73714911c2 tools/blktap/lib/Makefile
@@ -57,7 +57,7 @@ libblktap: $(OBJS)
 	      -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
 	ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
 	ln -sf libblktap.so.$(MAJOR) [email protected]
-	ar rc libblktap.a [email protected]
+	$(AR) rc libblktap.a [email protected]
 
 .PHONY: TAGS all build clean install libblktap
 
tools/libaio/src/Makefile +5 -2
diff -r 2d73714911c2 tools/libaio/src/Makefile
@@ -1,3 +1,6 @@ prefix=/usr
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
 prefix=/usr
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
@@ -44,8 +47,8 @@ libaio_sobjs := $(patsubst %.c,%.os,$(li
 
 libaio.a: $(libaio_objs)
 	rm -f libaio.a
-	ar r libaio.a $^
-	ranlib libaio.a
+	$(AR) r libaio.a $^
+	$(RANLIB) libaio.a
 
 $(libname): $(libaio_sobjs) libaio.map
 	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
tools/xenstore/Makefile +1 -1
diff -r 2d73714911c2 tools/xenstore/Makefile
@@ -98,7 +98,7 @@ libxenstore.so.$(MAJOR).$(MINOR): xs.opi
 	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) -shared -o $@ $^ -lpthread
 
 libxenstore.a: xs.o xs_lib.o
-	ar rcs libxenstore.a $^
+	$(AR) rcs libxenstore.a $^
 
 .PHONY: clean
 clean: testsuite-clean

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

PATCH 1/1 For cross compiler

This is a small patch that makes a cross compiler successfully compile the sources under the tools directory. This patch became necessary after qemu-dm is updated to a newer version.

Tested by compiling on x86 and ia64.

tools/blktap/lib/Makefile +1 -1
diff -r befab551b0e1 tools/blktap/lib/Makefile
@@ -61,7 +61,7 @@ libblktap.a: $(OBJS)
 	      -o libblktap.so.$(MAJOR).$(MINOR) $^ $(LIBS)
 	ln -sf libblktap.so.$(MAJOR).$(MINOR) libblktap.so.$(MAJOR)
 	ln -sf libblktap.so.$(MAJOR) libblktap.so
-	ar rc $@ libblktap.so
+	$(AR) rc $@ libblktap.so
 
 .PHONY: TAGS all build clean install libblktap
 
tools/libaio/src/Makefile +5 -2
diff -r befab551b0e1 tools/libaio/src/Makefile
@@ -1,3 +1,6 @@ prefix=/usr
+XEN_ROOT = ../../..
+include $(XEN_ROOT)/tools/Rules.mk
+
 prefix=/usr
 includedir=$(prefix)/include
 libdir=$(prefix)/lib
@@ -44,8 +47,8 @@ libaio_sobjs := $(patsubst %.c,%.os,$(li
 
 libaio.a: $(libaio_objs)
 	rm -f libaio.a
-	ar r libaio.a $^
-	ranlib libaio.a
+	$(AR) r libaio.a $^
+	$(RANLIB) libaio.a
 
 $(libname): $(libaio_sobjs) libaio.map
 	$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
tools/xenstore/Makefile +1 -1
diff -r befab551b0e1 tools/xenstore/Makefile
@@ -98,7 +98,7 @@ libxenstore.so.$(MAJOR).$(MINOR): xs.opi
 	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so.$(MAJOR) -shared -o $@ $^ -lpthread
 
 libxenstore.a: xs.o xs_lib.o
-	ar rcs libxenstore.a $^
+	$(AR) rcs libxenstore.a $^
 
 .PHONY: clean
 clean: testsuite-clean

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel