WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [MINIOS] Allows the use of a C library without modifying

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [MINIOS] Allows the use of a C library without modifying Mini-OS source files.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 26 May 2006 14:02:12 +0000
Delivery-date: Fri, 26 May 2006 07:03:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [MINIOS] Allows the use of a C library without modifying Mini-OS source files., Xen patchbot-unstable <=