ia64/xen-unstable

changeset 17999:5cd4fe68b6c2

stubdom: use a newlib snapshot instead of the slow cvs checkout.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jul 08 17:25:04 2008 +0100 (2008-07-08)
parents 6f30a7367fa7
children 3f23e01d3198
files stubdom/Makefile
line diff
     1.1 --- a/stubdom/Makefile	Tue Jul 08 17:15:23 2008 +0100
     1.2 +++ b/stubdom/Makefile	Tue Jul 08 17:25:04 2008 +0100
     1.3 @@ -10,7 +10,7 @@ include $(XEN_ROOT)/Config.mk
     1.4  IOEMU_OPTIONS=--disable-vnc-tls 
     1.5  ZLIB_VERSION=1.2.3
     1.6  LIBPCI_VERSION=2.2.9
     1.7 -NEWLIB_DATE=2008-01-01
     1.8 +NEWLIB_VERSION=1.16.0
     1.9  LWIP_DATE=2008-06-01
    1.10  GRUB_DATE=2008-06-01
    1.11  
    1.12 @@ -24,10 +24,12 @@ endif
    1.13  ifeq ($(GNU_TARGET_ARCH), i686)
    1.14  TARGET_CFLAGS=
    1.15  NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
    1.16 +STUBDOM_SUPPORTED=1
    1.17  endif
    1.18  ifeq ($(GNU_TARGET_ARCH), x86_64)
    1.19  TARGET_CFLAGS=-mno-red-zone
    1.20  NEWLIB_CFLAGS+=-D_I386MACH_ALLOW_HW_INTERRUPTS
    1.21 +STUBDOM_SUPPORTED=1
    1.22  endif
    1.23  ifeq ($(GNU_TARGET_ARCH), ia64)
    1.24  TARGET_CFLAGS=-mconstant-gp
    1.25 @@ -56,26 +58,34 @@ TARGET_LDFLAGS += -nostdlib -L$(CROSS_PR
    1.26  TARGETS=ioemu c caml grub
    1.27  
    1.28  .PHONY: all
    1.29 -all: ioemu-stubdom c-stubdom pv-grub
    1.30 +all: build
    1.31 +ifeq ($(STUBDOM_SUPPORTED),1)
    1.32 +build: ioemu-stubdom c-stubdom pv-grub
    1.33 +else
    1.34 +build:
    1.35 +endif
    1.36  
    1.37  ##############
    1.38  # Cross-newlib
    1.39  ##############
    1.40  
    1.41 -newlib-cvs:
    1.42 -	cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co -D $(NEWLIB_DATE) newlib
    1.43 -	mv src newlib-cvs
    1.44 +newlib-$(NEWLIB_VERSION).tar.gz:
    1.45 +	$(WGET) ftp://sources.redhat.com/pub/newlib/newlib-$(NEWLIB_VERSION).tar.gz
    1.46 +
    1.47 +newlib-$(NEWLIB_VERSION): newlib-$(NEWLIB_VERSION).tar.gz
    1.48 +	tar xzf $<
    1.49  	patch -d $@ -p0 < newlib.patch
    1.50 +	touch $@
    1.51  
    1.52  NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a
    1.53  .PHONY: cross-newlib
    1.54  cross-newlib: $(NEWLIB_STAMPFILE)
    1.55 -$(NEWLIB_STAMPFILE): newlib-cvs
    1.56 +$(NEWLIB_STAMPFILE): newlib-$(NEWLIB_VERSION)
    1.57  	mkdir -p newlib-build
    1.58  	( cd newlib-build && \
    1.59 -	  CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) RANLIB_FOR_TARGET=$(RANLIB) ../newlib-cvs/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \
    1.60 +	  CC_FOR_TARGET="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(NEWLIB_CFLAGS)" AR_FOR_TARGET=$(AR) LD_FOR_TARGET=$(LD) RANLIB_FOR_TARGET=$(RANLIB) ../newlib-$(NEWLIB_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long --disable-multilib && \
    1.61  	  $(MAKE) && \
    1.62 -	  $(MAKE) install )
    1.63 +	  DESTDIR= $(MAKE) install )
    1.64  
    1.65  ############
    1.66  # Cross-zlib
    1.67 @@ -236,14 +246,21 @@ pv-grub: mini-os-grub libxc grub
    1.68  # install
    1.69  #########
    1.70  
    1.71 +ifeq ($(STUBDOM_SUPPORTED),1)
    1.72  install: install-ioemu install-grub
    1.73 +else
    1.74 +install:
    1.75 +endif
    1.76  
    1.77 -install-ioemu: mini-os-ioemu/mini-os.gz
    1.78 +install-ioemu: ioemu-stubdom
    1.79 +	$(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/bin"
    1.80  	$(INSTALL_PROG) stubdom-dm "$(DESTDIR)/usr/lib/xen/bin"
    1.81 -	$(INSTALL_PROG) $< "$(DESTDIR)/usr/lib/xen/boot/ioemu-stubdom.gz"
    1.82 +	$(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
    1.83 +	$(INSTALL_PROG) mini-os-ioemu/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/ioemu-stubdom.gz"
    1.84  
    1.85 -install-grub: mini-os-grub/mini-os.gz
    1.86 -	$(INSTALL_PROG) $< "$(DESTDIR)/usr/lib/xen/boot/pv-grub.gz"
    1.87 +install-grub: pv-grub
    1.88 +	$(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
    1.89 +	$(INSTALL_PROG) mini-os-grub/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/pv-grub.gz"
    1.90  
    1.91  #######
    1.92  # clean
    1.93 @@ -271,13 +288,14 @@ crossclean: clean
    1.94  # clean patched sources
    1.95  .PHONY: patchclean
    1.96  patchclean: crossclean
    1.97 -	rm -fr newlib-cvs
    1.98 +	rm -fr newlib-$(NEWLIB_VERSION)
    1.99  	rm -fr lwip-cvs
   1.100  	rm -fr grub-cvs
   1.101  
   1.102  # clean downloads
   1.103  .PHONY: downloadclean
   1.104  downloadclean: patchclean
   1.105 +	rm -f newlib-$(ZLIB_VERSION).tar.gz
   1.106  	rm -f zlib-$(ZLIB_VERSION).tar.gz
   1.107  	rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
   1.108