[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [MINIOS] Allows the use of a C library without modifying Mini-OS source files.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID b049fb947f2a5c5674febc175f0c30a81239224d # Parent 96ce5961b5eb06cfb37caefb2458e7cd20d60fe3 [MINIOS] Allows the use of a C library without modifying Mini-OS source files. From: John Ramsdell Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- extras/mini-os/Makefile | 9 +++++---- extras/mini-os/lib/printf.c | 4 +++- extras/mini-os/lib/string.c | 4 ++++ 3 files changed, 12 insertions(+), 5 deletions(-) diff -r 96ce5961b5eb -r b049fb947f2a extras/mini-os/Makefile --- a/extras/mini-os/Makefile Fri May 26 11:23:55 2006 +0100 +++ b/extras/mini-os/Makefile Fri May 26 13:23:18 2006 +0100 @@ -13,6 +13,7 @@ override CPPFLAGS := -Iinclude $(CPPFLAG override CPPFLAGS := -Iinclude $(CPPFLAGS) ASFLAGS = -D__ASSEMBLY__ +LDLIBS = -L. -lminios LDFLAGS := -N -T minios-$(TARGET_ARCH).lds ifeq ($(TARGET_ARCH),x86_32) @@ -55,11 +56,11 @@ links: links: [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen -libminios.a: $(OBJS) $(HEAD) - ar r libminios.a $(HEAD) $(OBJS) +libminios.a: links $(OBJS) $(HEAD) + $(AR) r libminios.a $(HEAD) $(OBJS) -$(TARGET): links libminios.a $(HEAD) - $(LD) $(LDFLAGS) $(HEAD) -L. -lminios -o $@.elf +$(TARGET): libminios.a $(HEAD) + $(LD) $(LDFLAGS) $(HEAD) $(LDLIBS) -o $@.elf gzip -f -9 -c $@.elf >$@.gz .PHONY: clean diff -r 96ce5961b5eb -r b049fb947f2a extras/mini-os/lib/printf.c --- a/extras/mini-os/lib/printf.c Fri May 26 11:23:55 2006 +0100 +++ b/extras/mini-os/lib/printf.c Fri May 26 13:23:18 2006 +0100 @@ -53,6 +53,8 @@ * * $FreeBSD: src/sys/libkern/divdi3.c,v 1.6 1999/08/28 00:46:31 peter Exp $ */ + +#if !defined HAVE_LIBC #include <os.h> #include <types.h> @@ -789,4 +791,4 @@ int sscanf(const char * buf, const char return i; } - +#endif diff -r 96ce5961b5eb -r b049fb947f2a extras/mini-os/lib/string.c --- a/extras/mini-os/lib/string.c Fri May 26 11:23:55 2006 +0100 +++ b/extras/mini-os/lib/string.c Fri May 26 13:23:18 2006 +0100 @@ -17,6 +17,8 @@ * $Id: c-insert.c,v 1.7 2002/11/08 16:04:34 rn Exp $ **************************************************************************** */ + +#if !defined HAVE_LIBC #include <os.h> #include <types.h> @@ -153,3 +155,5 @@ char * strstr(const char * s1,const char } return NULL; } + +#endif _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |