debuggers.hg
changeset 17071:2424c6a3a0ed
stubdom: Rename stubdom/*.build into stubdom/*-build, newlib into
newlib-cvs, lwip into lwip-cvs. Fix .hgignore to ignore only them and
not the patches.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
newlib-cvs, lwip into lwip-cvs. Fix .hgignore to ignore only them and
not the patches.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Tue Feb 12 16:46:23 2008 +0000 (2008-02-12) |
parents | 7e91007fa727 |
children | e85399173769 |
files | .hgignore stubdom/Makefile stubdom/binutils.patch stubdom/gcc.patch stubdom/newlib.patch |
line diff
1.1 --- a/.hgignore Tue Feb 12 15:03:07 2008 +0000 1.2 +++ b/.hgignore Tue Feb 12 16:46:23 2008 +0000 1.3 @@ -80,17 +80,17 @@ 1.4 ^pristine-.*$ 1.5 ^ref-.*$ 1.6 ^tmp-.*$ 1.7 -^stubdom/binutils.*$ 1.8 -^stubdom/cross-root.*$ 1.9 -^stubdom/gcc.*$ 1.10 -^stubdom/include.*$ 1.11 -^stubdom/ioemu.*$ 1.12 -^stubdom/libxc.*$ 1.13 -^stubdom/lwip.*$ 1.14 -^stubdom/mini-os.*$ 1.15 -^stubdom/newlib.*$ 1.16 -^stubdom/pciutils.*$ 1.17 -^stubdom/zlib.*$ 1.18 +^stubdom/binutils-.*$ 1.19 +^stubdom/cross-root-.*$ 1.20 +^stubdom/gcc-.*$ 1.21 +^stubdom/include$ 1.22 +^stubdom/ioemu$ 1.23 +^stubdom/libxc$ 1.24 +^stubdom/lwip-.*$ 1.25 +^stubdom/mini-os$ 1.26 +^stubdom/newlib-.*$ 1.27 +^stubdom/pciutils-.*$ 1.28 +^stubdom/zlib-.*$ 1.29 ^tools/.*/TAGS$ 1.30 ^tools/.*/build/lib.*/.*\.py$ 1.31 ^tools/blktap/Makefile\.smh$
2.1 --- a/stubdom/Makefile Tue Feb 12 15:03:07 2008 +0000 2.2 +++ b/stubdom/Makefile Tue Feb 12 16:46:23 2008 +0000 2.3 @@ -54,8 +54,8 @@ BINUTILS_STAMPFILE=$(CROSS_ROOT)/bin/$(G 2.4 .PHONY: cross-binutils 2.5 cross-binutils: $(BINUTILS_STAMPFILE) 2.6 $(BINUTILS_STAMPFILE): binutils-$(BINUTILS_VERSION) 2.7 - mkdir -p binutils.build 2.8 - ( cd binutils.build && \ 2.9 + mkdir -p binutils-build 2.10 + ( cd binutils-build && \ 2.11 ../binutils-$(BINUTILS_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf && \ 2.12 $(MAKE) && \ 2.13 $(MAKE) check && \ 2.14 @@ -76,8 +76,8 @@ GCC_STAMPFILE=$(CROSS_ROOT)/bin/$(GNU_TA 2.15 .PHONY: cross-gcc 2.16 cross-gcc: $(GCC_STAMPFILE) 2.17 $(GCC_STAMPFILE): gcc-$(GCC_VERSION) $(BINUTILS_STAMPFILE) 2.18 - mkdir -p gcc.build 2.19 - ( cd gcc.build && \ 2.20 + mkdir -p gcc-build 2.21 + ( cd gcc-build && \ 2.22 ../gcc-$(GCC_VERSION)/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-languages=c --disable-libssp --with-gnu-as --with-gnu-ld && \ 2.23 $(MAKE) GCC_FOR_TARGET='$$$$r/gcc/xgcc -B$$$$r/gcc/ '"$(TARGET_CFLAGS)"' $$(FLAGS_FOR_TARGET)' && \ 2.24 $(MAKE) install ) 2.25 @@ -88,16 +88,16 @@ cross-gcc: $(GCC_STAMPFILE) 2.26 2.27 newlib: 2.28 cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co -D $(NEWLIB_DATE) newlib 2.29 - mv src newlib 2.30 - ( cd newlib && patch -p0 < ../newlib.patch) 2.31 + mv src newlib-cvs 2.32 + ( cd newlib-cvs && patch -p0 < ../newlib.patch) 2.33 2.34 NEWLIB_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libc.a 2.35 .PHONY: cross-newlib 2.36 cross-newlib: $(NEWLIB_STAMPFILE) 2.37 $(NEWLIB_STAMPFILE): newlib $(GCC_STAMPFILE) 2.38 - mkdir -p newlib.build 2.39 - ( cd newlib.build && \ 2.40 - CC_FOR_TARGET="$(GNU_TARGET_ARCH)-xen-elf-gcc $(TARGET_CFLAGS)" ../newlib/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long && \ 2.41 + mkdir -p newlib-build 2.42 + ( cd newlib-build && \ 2.43 + CC_FOR_TARGET="$(GNU_TARGET_ARCH)-xen-elf-gcc $(TARGET_CFLAGS)" ../newlib-cvs/configure --prefix=$(CROSS_PREFIX) --verbose --target=$(GNU_TARGET_ARCH)-xen-elf --enable-newlib-io-long-long && \ 2.44 $(MAKE) && \ 2.45 $(MAKE) install ) 2.46 2.47 @@ -144,8 +144,9 @@ cross-libpci: $(LIBPCI_STAMPFILE) 2.48 # lwIP 2.49 ###### 2.50 2.51 -lwip: 2.52 +lwip-cvs: 2.53 cvs -z 9 -d :pserver:anonymous@cvs.savannah.nongnu.org:/sources/lwip co -D $(LWIP_DATE) lwip 2.54 + mv lwip lwip-cvs 2.55 2.56 ####### 2.57 # Links 2.58 @@ -190,7 +191,7 @@ libxc: cross-zlib mk-symlinks 2.59 ioemu: cross-zlib cross-libpci mk-symlinks libxc 2.60 [ -f ioemu/config-host.mak ] || \ 2.61 ( cd ioemu ; XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure --prefix=/usr --enable-stubdom $(IOEMU_OPTIONS)) 2.62 - $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip 2.63 + $(MAKE) -C ioemu LWIPDIR=$(CURDIR)/lwip-cvs 2.64 2.65 ###### 2.66 # caml 2.67 @@ -205,12 +206,12 @@ caml: 2.68 ######## 2.69 2.70 .PHONY: qemu-stubdom 2.71 -qemu-stubdom: mk-symlinks lwip libxc ioemu 2.72 - $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip QEMUDIR=$(CURDIR)/ioemu 2.73 +qemu-stubdom: mk-symlinks lwip-cvs libxc ioemu 2.74 + $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs QEMUDIR=$(CURDIR)/ioemu 2.75 2.76 .PHONY: caml-stubdom 2.77 -caml-stubdom: mk-symlinks lwip libxc cross-libpci caml 2.78 - $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip CAMLDIR=$(CURDIR)/caml 2.79 +caml-stubdom: mk-symlinks lwip-cvs libxc cross-libpci caml 2.80 + $(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwia-cvs CAMLDIR=$(CURDIR)/caml 2.81 2.82 ######### 2.83 # install 2.84 @@ -227,7 +228,7 @@ install: mini-os/mini-os.gz 2.85 # Only clean the libxc/ioemu/mini-os part 2.86 .PHONY: clean 2.87 clean: 2.88 - -$(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip clean 2.89 + -$(MAKE) -C mini-os LWIPDIR=$(CURDIR)/lwip-cvs clean 2.90 $(MAKE) -C caml clean 2.91 rm -fr libxc ioemu mini-os include 2.92 2.93 @@ -235,7 +236,7 @@ clean: 2.94 .PHONY: crossclean 2.95 crossclean: clean 2.96 rm -fr $(CROSS_ROOT) 2.97 - rm -fr binutils.build gcc.build newlib.build 2.98 + rm -fr binutils-build gcc-build newlib-build 2.99 rm -fr zlib-$(ZLIB_VERSION) pciutils-$(LIBPCI_VERSION) 2.100 2.101 # clean patched sources 2.102 @@ -243,8 +244,8 @@ crossclean: clean 2.103 patchclean: crossclean 2.104 rm -fr binutils-$(BINUTILS_VERSION) 2.105 rm -fr gcc-$(GCC_VERSION) 2.106 - rm -fr newlib 2.107 - rm -fr lwip 2.108 + rm -fr newlib-cvs 2.109 + rm -fr lwip-cvs 2.110 2.111 # clean downloads 2.112 .PHONY: downloadclean
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/stubdom/binutils.patch Tue Feb 12 16:46:23 2008 +0000 3.3 @@ -0,0 +1,14 @@ 3.4 +It looks like binutils has troubles with makeinfo and the doc generation. 3.5 +We don't need it anyway 3.6 + 3.7 +--- binutils-2.18/bfd/Makefile.inorig 2008-01-16 16:17:43.004484000 +0000 3.8 ++++ binutils-2.18/bfd/Makefile.in 2008-01-16 16:17:50.505526000 +0000 3.9 +@@ -271,7 +271,7 @@ 3.10 + INCDIR = $(srcdir)/../include 3.11 + CSEARCH = -I. -I$(srcdir) -I$(INCDIR) 3.12 + MKDEP = gcc -MM 3.13 +-SUBDIRS = doc po 3.14 ++SUBDIRS = po 3.15 + bfddocdir = doc 3.16 + bfdlib_LTLIBRARIES = libbfd.la 3.17 + AM_CFLAGS = $(WARN_CFLAGS)
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/stubdom/gcc.patch Tue Feb 12 16:46:23 2008 +0000 4.3 @@ -0,0 +1,31 @@ 4.4 +Backported from later versions 4.5 + 4.6 +--- gcc-4.2.2/gcc/config.gcc 2007-11-22 16:27:45.000000000 +0000 4.7 ++++ gcc-4.2.2/gcc/config.gcc 2007-11-22 16:23:00.000000000 +0000 4.8 +@@ -1033,6 +1033,11 @@ 4.9 + tmake_file="i386/t-i386elf t-svr4" 4.10 + use_fixproto=yes 4.11 + ;; 4.12 ++x86_64-*-elf*) 4.13 ++ tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/x86-64.h" 4.14 ++ tmake_file="i386/t-i386elf t-svr4" 4.15 ++ use_fixproto=yes 4.16 ++ ;; 4.17 + i[34567]86-sequent-ptx4* | i[34567]86-sequent-sysv4*) 4.18 + if test x$gas = xyes 4.19 + then 4.20 + 4.21 +We don't have a libc yet at this stage. Unused anyway 4.22 + 4.23 +--- gcc-4.2.2/gcc/unwind-generic.h.orig 2008-01-11 18:54:40.000000000 +0100 4.24 ++++ gcc-4.2.2/gcc/unwind-generic.h 2008-01-11 18:54:31.000000000 +0100 4.25 +@@ -203,7 +203,6 @@ 4.26 + compatible with the standard ABI for IA-64, we inline these. */ 4.27 + 4.28 + #ifdef __ia64__ 4.29 +-#include <stdlib.h> 4.30 + 4.31 + static inline _Unwind_Ptr 4.32 + _Unwind_GetDataRelBase (struct _Unwind_Context *_C) 4.33 +Backported from later versions 4.34 +
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/stubdom/newlib.patch Tue Feb 12 16:46:23 2008 +0000 5.3 @@ -0,0 +1,203 @@ 5.4 +There is a mix between longs and long longs. 5.5 + 5.6 +Index: newlib/libc/include/inttypes.h 5.7 +=================================================================== 5.8 +RCS file: /cvs/src/src/newlib/libc/include/inttypes.h,v 5.9 +retrieving revision 1.3 5.10 +diff -u -p -r1.3 inttypes.h 5.11 +--- newlib/libc/include/inttypes.h 16 Dec 2005 19:03:12 -0000 1.3 5.12 ++++ newlib/libc/include/inttypes.h 8 Nov 2007 16:32:44 -0000 5.13 +@@ -163,12 +163,12 @@ 5.14 + 5.15 + 5.16 + /* 64-bit types */ 5.17 +-#if __have_longlong64 5.18 +-#define __PRI64(x) __STRINGIFY(ll##x) 5.19 +-#define __SCN64(x) __STRINGIFY(ll##x) 5.20 +-#elif __have_long64 5.21 ++#if __have_long64 5.22 + #define __PRI64(x) __STRINGIFY(l##x) 5.23 + #define __SCN64(x) __STRINGIFY(l##x) 5.24 ++#elif __have_longlong64 5.25 ++#define __PRI64(x) __STRINGIFY(ll##x) 5.26 ++#define __SCN64(x) __STRINGIFY(ll##x) 5.27 + #else 5.28 + #define __PRI64(x) __STRINGIFY(x) 5.29 + #define __SCN64(x) __STRINGIFY(x) 5.30 +@@ -217,12 +217,12 @@ 5.31 + #endif 5.32 + 5.33 + /* max-bit types */ 5.34 +-#if __have_longlong64 5.35 +-#define __PRIMAX(x) __STRINGIFY(ll##x) 5.36 +-#define __SCNMAX(x) __STRINGIFY(ll##x) 5.37 +-#elif __have_long64 5.38 ++#if __have_long64 5.39 + #define __PRIMAX(x) __STRINGIFY(l##x) 5.40 + #define __SCNMAX(x) __STRINGIFY(l##x) 5.41 ++#elif __have_longlong64 5.42 ++#define __PRIMAX(x) __STRINGIFY(ll##x) 5.43 ++#define __SCNMAX(x) __STRINGIFY(ll##x) 5.44 + #else 5.45 + #define __PRIMAX(x) __STRINGIFY(x) 5.46 + #define __SCNMAX(x) __STRINGIFY(x) 5.47 +@@ -242,12 +242,12 @@ 5.48 + #define SCNxMAX __SCNMAX(x) 5.49 + 5.50 + /* ptr types */ 5.51 +-#if __have_longlong64 5.52 +-#define __PRIPTR(x) __STRINGIFY(ll##x) 5.53 +-#define __SCNPTR(x) __STRINGIFY(ll##x) 5.54 +-#elif __have_long64 5.55 ++#if __have_long64 5.56 + #define __PRIPTR(x) __STRINGIFY(l##x) 5.57 + #define __SCNPTR(x) __STRINGIFY(l##x) 5.58 ++#elif __have_longlong64 5.59 ++#define __PRIPTR(x) __STRINGIFY(ll##x) 5.60 ++#define __SCNPTR(x) __STRINGIFY(ll##x) 5.61 + #else 5.62 + #define __PRIPTR(x) __STRINGIFY(x) 5.63 + #define __SCNPTR(x) __STRINGIFY(x) 5.64 + 5.65 +We don't want u?int32_t to be long as our code assume in a lot of places to be 5.66 +int. 5.67 + 5.68 +Index: newlib/libc/include/stdint.h 5.69 +=================================================================== 5.70 +RCS file: /cvs/src/src/newlib/libc/include/stdint.h,v 5.71 +retrieving revision 1.10 5.72 +diff -u -p -r1.10 stdint.h 5.73 +--- newlib/libc/include/stdint.h 16 Aug 2006 21:39:43 -0000 1.10 5.74 ++++ newlib/libc/include/stdint.h 12 Feb 2008 13:07:52 -0000 5.75 +@@ -38,7 +38,7 @@ extern "C" { 5.76 + #if __STDINT_EXP(LONG_MAX) > 0x7fffffff 5.77 + #define __have_long64 1 5.78 + #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) 5.79 +-#define __have_long32 1 5.80 ++/* #define __have_long32 1 */ 5.81 + #endif 5.82 + 5.83 + #if __STDINT_EXP(SCHAR_MAX) == 0x7f 5.84 + 5.85 +Define the basic ia64 jump buffer 5.86 + 5.87 +Index: newlib/libc/include/machine/setjmp.h 5.88 +=================================================================== 5.89 +RCS file: /cvs/src/src/newlib/libc/include/machine/setjmp.h,v 5.90 +retrieving revision 1.34 5.91 +diff -u -p -r1.34 setjmp.h 5.92 +--- newlib/libc/include/machine/setjmp.h 7 Nov 2007 21:42:24 -0000 1.34 5.93 ++++ newlib/libc/include/machine/setjmp.h 11 Jan 2008 18:10:43 -0000 5.94 +@@ -72,6 +72,11 @@ _BEGIN_STD_C 5.95 + #define _JBLEN 8 5.96 + #endif 5.97 + 5.98 ++#ifdef __ia64__ 5.99 ++#define _JBTYPE long 5.100 ++#define _JBLEN 70 5.101 ++#endif 5.102 ++ 5.103 + #ifdef __i960__ 5.104 + #define _JBLEN 35 5.105 + #endif 5.106 + 5.107 +In mini-os we use a dynamic reentrency buffer. 5.108 + 5.109 +Index: newlib/libc/include/sys/config.h 5.110 +=================================================================== 5.111 +RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v 5.112 +retrieving revision 1.47 5.113 +diff -u -p -r1.47 config.h 5.114 +--- newlib/libc/include/sys/config.h 15 Mar 2007 21:32:12 -0000 1.47 5.115 ++++ newlib/libc/include/sys/config.h 8 Nov 2007 16:32:44 -0000 5.116 +@@ -71,6 +71,10 @@ 5.117 + #endif 5.118 + #endif 5.119 + 5.120 ++#ifndef __DYNAMIC_REENT__ 5.121 ++#define __DYNAMIC_REENT__ 5.122 ++#endif 5.123 ++ 5.124 + #ifdef __mn10200__ 5.125 + #define __SMALL_BITFIELDS 5.126 + #endif 5.127 + 5.128 +Dynamic pointer to our reentrancy zone 5.129 + 5.130 +Index: newlib/libc/reent/getreent.c 5.131 +=================================================================== 5.132 +RCS file: /cvs/src/src/newlib/libc/reent/getreent.c,v 5.133 +retrieving revision 1.2 5.134 +diff -u -p -r1.2 getreent.c 5.135 +--- newlib/libc/reent/getreent.c 7 Sep 2007 00:45:55 -0000 1.2 5.136 ++++ newlib/libc/reent/getreent.c 8 Nov 2007 16:32:44 -0000 5.137 +@@ -3,12 +3,20 @@ 5.138 + #include <_ansi.h> 5.139 + #include <reent.h> 5.140 + 5.141 ++#define weak_alias(name, aliasname) \ 5.142 ++ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); 5.143 ++ 5.144 + #ifdef __getreent 5.145 + #undef __getreent 5.146 + #endif 5.147 ++#ifdef __libc_getreent 5.148 ++#undef __libc_getreent 5.149 ++#endif 5.150 + 5.151 + struct _reent * 5.152 +-_DEFUN_VOID(__getreent) 5.153 ++__libc_getreent (void) 5.154 + { 5.155 + return _impure_ptr; 5.156 + } 5.157 ++weak_alias(__libc_getreent,__getreent) 5.158 ++ 5.159 + 5.160 +We can't provide a red zone in mini-os. 5.161 + 5.162 +Index: newlib/libc/machine/x86_64/memcpy.S 5.163 +=================================================================== 5.164 +RCS file: /cvs/src/src/newlib/libc/machine/x86_64/memcpy.S,v 5.165 +retrieving revision 1.1 5.166 +diff -u -p -r1.1 memcpy.S 5.167 +--- newlib/libc/machine/x86_64/memcpy.S 28 Aug 2007 21:56:49 -0000 1.1 5.168 ++++ newlib/libc/machine/x86_64/memcpy.S 8 Nov 2007 16:32:44 -0000 5.169 +@@ -30,10 +30,18 @@ quadword_aligned: 5.170 + cmpq $256, rdx 5.171 + jb quadword_copy 5.172 + 5.173 ++#if 1 5.174 ++ subq $32, rsp 5.175 ++ movq rax, 24 (rsp) 5.176 ++ movq r12, 16 (rsp) 5.177 ++ movq r13, 8 (rsp) 5.178 ++ movq r14, 0 (rsp) 5.179 ++#else 5.180 + movq rax, -8 (rsp) 5.181 + movq r12, -16 (rsp) 5.182 + movq r13, -24 (rsp) 5.183 + movq r14, -32 (rsp) 5.184 ++#endif 5.185 + 5.186 + movq rdx, rcx /* Copy 128 bytes at a time with minimum cache polution */ 5.187 + shrq $7, rcx 5.188 +@@ -89,10 +97,18 @@ loop: 5.189 + movq rdx, rcx 5.190 + andq $127, rcx 5.191 + rep movsb 5.192 ++#if 1 5.193 ++ movq 24 (rsp), rax 5.194 ++ movq 16 (rsp), r12 5.195 ++ movq 8 (rsp), r13 5.196 ++ movq 0 (rsp), r14 5.197 ++ addq $32, rsp 5.198 ++#else 5.199 + movq -8 (rsp), rax 5.200 + movq -16 (rsp), r12 5.201 + movq -24 (rsp), r13 5.202 + movq -32 (rsp), r14 5.203 ++#endif 5.204 + ret 5.205 + 5.206 +