FW: [PATCH] Make tools/libxc arch dependent

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

FW: [PATCH] Make tools/libxc arch dependent

Tian, Kevin
(Resend the patch for comments...)

Hi, Ian/Keir,
        I sent out following patch several days ago without response. :(
Could you take some time to review it? Welcome comments, and I'd be
happy to enhance it. :)

=============================
        Libxc is the part coupling with platform context most tightly,
with some files which should be made arch dependent. Following patch is
trying to move those files into arch dependent directory. I only
addressed 7 files by far, because compilation succeeds on IPF simply
after solving them. Since there's no distinct boundary between them and
other common files, I'm lazy to add another Makefile under arch-dep
directory. Also no change to compile option
since they work fine on x86 and IPF currently.

        To reduce the size of patch, a trick is used to move files when
first compilation. After that, you can simply remove 8 lines leading by
"TEMP" comment. IPF related changes will be sent to Dan later.

Signed-off-by Kevin Tian ([hidden email])

--- trunk.org/tools/libxc/Makefile 2005-05-09 16:01:18.000000000
+0800
+++ trunk/tools/libxc/Makefile 2005-05-18 20:35:01.000000000 +0800
@@ -21,16 +21,13 @@ SRCS     += xc_domain.c
 SRCS     += xc_evtchn.c
 SRCS     += xc_gnttab.c
 SRCS     += xc_io.c
-SRCS     += xc_linux_build.c
-SRCS     += xc_plan9_build.c
-SRCS     += xc_linux_restore.c
-SRCS     += xc_linux_save.c
 SRCS     += xc_misc.c
 SRCS     += xc_physdev.c
 SRCS     += xc_private.c
-SRCS     += xc_ptrace.c
-SRCS     += xc_vmx_build.c
 
+SRCS     += $(wildcard $(COMPILE_ARCH)/*.c)
+
+vpath %.c $(COMPILE_ARCH)
 CFLAGS   += -Wall
 CFLAGS   += -Werror
 CFLAGS   += -O3
@@ -67,6 +64,15 @@ mk-symlinks:
    ln -sf ../../$(XEN_ROOT)/xen/include/public/io/*.h . )
  ( cd xen/linux >/dev/null ; \
   ln -sf ../../$(LINUX_ROOT)/include/asm-xen/linux-public/*.h .
)
+#TEMP: Please delete following lines after applying the patch
+ [ -e $(COMPILE_ARCH) ] || mkdir -p $(COMPILE_ARCH)/
+ [ ! -e xc_linux_build.c ] || mv xc_linux_build.c
$(COMPILE_ARCH)/
+ [ ! -e xc_plan9_build.c ] || mv xc_plan9_build.c
$(COMPILE_ARCH)/
+ [ ! -e xc_vmx_build.c ] || mv xc_vmx_build.c $(COMPILE_ARCH)/
+ [ ! -e xc_linux_save.c ] || mv xc_linux_save.c $(COMPILE_ARCH)/
+ [ ! -e xc_linux_restore.c ] || mv xc_linux_restore.c
$(COMPILE_ARCH)/
+ [ ! -e xc_ptrace.c ] || mv xc_ptrace.c $(COMPILE_ARCH)/
+ [ ! -e linux_boot_params.h ] || mv linux_boot_params.h
$(COMPILE_ARCH)/
 
 install: build
  [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR)
$(DESTDIR)/usr/$(LIBDIR)
@@ -83,7 +89,7 @@ TAGS:
  etags -t $(SRCS) *.h
 
 clean:
- rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
+ rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
$(COMPILE_ARCH)/*.o $(COMPILE_ARCH)/*.opic
 
 rpm: build
  rm -rf staging

Thanks,
Kevin

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

patch_libxc_arch_dep (2K) Download Attachment