cpu-8086: move the prototype code to gcc ia16
authorAlan Cox <alan@linux.intel.com>
Sun, 15 Oct 2017 17:25:28 +0000 (18:25 +0100)
committerAlan Cox <alan@linux.intel.com>
Sun, 15 Oct 2017 17:25:28 +0000 (18:25 +0100)
Kernel/cpu-8086/cpu.h
Kernel/cpu-8086/rules.mk

index 5e8fa98..62a1b2c 100644 (file)
@@ -4,7 +4,8 @@ typedef unsigned short uint16_t;
 typedef signed short int16_t;
 typedef unsigned char uint8_t;
 typedef signed char int8_t;
-typedef signed int size_t;
+typedef unsigned int size_t;
+typedef signed int ssize_t;
 
 typedef uint8_t irqflags_t;
 
@@ -20,7 +21,7 @@ typedef uint16_t uptr_t;              /* User pointer equivalent */
 #define uputi  uputw                   /* Copy user int type */
 #define ugeti  ugetw                   /* between user and kernel */
 
-extern void *  memcpy(void *, void *, size_t);
+extern void *  memcpy(void *, const void *, size_t);
 extern void *  memset(void *, int, size_t);
 extern size_t  strlen(const char *);
 
@@ -55,10 +56,4 @@ typedef union {            /* this structure is endian dependent */
 /* Sane behaviour for unused parameters */
 #define used(x)
 
-/* No inline or const */
-
-#define inline
-
-#define const
-
-#define CPUTYPE        CPU_8086
+#define CPUTYPE        CPUTYPE_8086
index 19b76bc..d65e56f 100644 (file)
@@ -1,6 +1,6 @@
-export CROSS_LD=ld86
-export CROSS_CC = bcc
-export CROSS_CCOPTS=-c -ansi -0 -O -I$(ROOT_DIR)/cpu-8086 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include
+export CROSS_LD=ia16-elf-ld
+export CROSS_CC = ia16-elf-gcc
+export CROSS_CCOPTS=-Os -I$(ROOT_DIR)/cpu-8086 -I$(ROOT_DIR)/platform-$(TARGET) -I$(ROOT_DIR)/include -c
 export CROSS_AS=$(CROSS_CC) $(CROSS_CCOPTS)
 export CROSS_CC_SEG1=
 export CROSS_CC_SEG2=