mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
[MINIOS] Allows the use of a C library without modifying Mini-OS source files.
From: John Ramsdell Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
1fa74a12d2
commit
165bf6f0bd
3 files changed
+12
-5
No files matched your search
@@ -13,6 +13,7 @@ CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
|
||||
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 @@ default: $(TARGET)
|
||||
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
|
||||
|
||||
@@ -54,6 +54,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>
|
||||
#include <hypervisor.h>
|
||||
@@ -789,4 +791,4 @@ int sscanf(const char * buf, const char * fmt, ...)
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -18,6 +18,8 @@
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#if !defined HAVE_LIBC
|
||||
|
||||
#include <os.h>
|
||||
#include <types.h>
|
||||
#include <lib.h>
|
||||
@@ -153,3 +155,5 @@ char * strstr(const char * s1,const char * s2)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||