_MINIX_SYSTEM - fixes for in-minix crossbuild

. define _MINIX_SYSTEM for all system code from minix.service.mk
	. hide some system-level declarations and definitions
	  behind _MINIX_SYSTEM to cleanly fix host tool build problems on
	  Minix (such as: NONE being defined and paddr_t being used but not
	  declared)
	. the similar definition _SYSTEM is unsuitable as it changes the
	  values of errno definitions

Change-Id: I407de79e2575115243a074b16e79546a279cfa3e
This commit is contained in:
Ben Gras
2014-03-05 12:21:55 +01:00
committed by Lionel Sambuc
parent aa6ee31737
commit 3f38115c7b
38 changed files with 63 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
# Makefile for the common audio framework
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
LIB= audiodriver
SRCS= audio_fw.c liveupdate.c

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libbdev
.include <bsd.own.mk>

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libblockdriver
.include <bsd.own.mk>

View File

@@ -1,4 +1,5 @@
#define _SYSTEM 1
#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>

View File

@@ -1,4 +1,5 @@
#define _SYSTEM 1
#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>

View File

@@ -1,5 +1,6 @@
#define __USE_MISC
#define _SYSTEM 1
#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>

View File

@@ -1,4 +1,5 @@
#define _SYSTEM 1
#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>

View File

@@ -1,4 +1,5 @@
#define _SYSTEM 1
#define _MINIX_SYSTEM 1
#include <sys/cdefs.h>
#include <lib.h>

View File

@@ -3,6 +3,8 @@
* Author: Lionel A. Sambuc.
*/
#define _MINIX_SYSTEM
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libchardriver
.include <bsd.own.mk>

View File

@@ -3,7 +3,7 @@ NOCLANGERROR=yes
#
# Makefile for libclkconf
CPPFLAGS+= -D_SYSTEM
CPPFLAGS+= -D_SYSTEM -D_MINIX_SYSTEM
LIB= clkconf

View File

@@ -7,7 +7,7 @@ VPATH = $(SRC_DIR)
SRCS = pci.c printf.c mem.c pgtab.c dde.c initcall.c thread.c condvar.c lock.c semaphore.c timer.c panic.c irq.c resource.c msg_queue.c
CFLAGS += -D_NETBSD_SOURCE
CPPFLAGS += -D_NETBSD_SOURCE -D_MINIX_SYSTEM
.include <bsd.lib.mk>

View File

@@ -1,6 +1,6 @@
# Makefile for libgpio
CPPFLAGS+= -D_SYSTEM
CPPFLAGS+= -D_SYSTEM -D_MINIX_SYSTEM
LIB= gpio

View File

@@ -1,6 +1,8 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+=-D_MINIX_SYSTEM
# Makefile for libi2cdriver
LIB= i2cdriver

View File

@@ -1,5 +1,6 @@
# Makefile for libinputdriver
.include <bsd.own.mk>
CPPFLAGS+= -D_MINIX_SYSTEM
LIB= inputdriver

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libminixfs
.include <bsd.own.mk>

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libnetdriver

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
LIB = netsock

View File

@@ -23,6 +23,7 @@ SRCS+= inode.c link.c misc.c mount.c open.c path.c path_puffs.c \
protect.c read.c stadir.c time.c utility.c table.c
CPFFLAGS+=-Dlchown=chown -Dlchmod=chmod
CPPFLAGS+= -D_MINIX_SYSTEM
NOGCCERROR=yes
NOCLANGERROR=yes

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libsffs
.include <bsd.own.mk>

View File

@@ -4,6 +4,8 @@ NOCLANGERROR=yes
# Makefile for libsys
.include <bsd.own.mk>
CPPFLAGS+= -D_MINIX_SYSTEM -D_SYSTEM
LIB= sys
CFLAGS+= -fno-builtin

View File

@@ -1,4 +1,3 @@
#define _SYSTEM 1
#include <minix/config.h>
#include <assert.h>

View File

@@ -1,7 +1,5 @@
/* syslib.h - System library common definitions. */
#define _SYSTEM
#include <lib.h>
#include <minix/com.h>
#include <minix/syslib.h>

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libvirtio
.include <bsd.own.mk>

View File

@@ -1,5 +1,6 @@
NOGCCERROR=yes
NOCLANGERROR=yes
CPPFLAGS+= -D_MINIX_SYSTEM
# Makefile for libvtreefs