Allow use of traditional CPP to be set on a per platform base in sys.mk.
Honour this for dependency processing in bsd.dep.mk. Switch i386 and amd64 assembly to use ISO C90 preprocessor concat and drop the -traditional-cpp on this platform.
This commit is contained in:
parent
681aec7b5a
commit
d3a052c472
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atomic.S,v 1.18 2009/11/26 07:40:34 pooka Exp $ */
|
||||
/* $NetBSD: atomic.S,v 1.19 2011/01/12 23:12:10 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef _HARDKERNEL
|
||||
#define LOCK(n) .Lpatch/**/n: lock
|
||||
#define LOCK(n) .Lpatch ## n: lock
|
||||
#define ENDLABEL(a) _ALIGN_TEXT; LABEL(a)
|
||||
#else
|
||||
#define LOCK(n) lock
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atomic.S,v 1.15 2009/11/26 07:40:34 pooka Exp $ */
|
||||
/* $NetBSD: atomic.S,v 1.16 2011/01/12 23:12:10 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#endif
|
||||
|
||||
#ifdef _HARDKERNEL
|
||||
#define LOCK(n) .Lpatch/**/n: lock
|
||||
#define LOCK(n) .Lpatch ## n: lock
|
||||
#define ENDLABEL(a) _ALIGN_TEXT; LABEL(a)
|
||||
#else
|
||||
#define LOCK(n) lock
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat___sigreturn14.S,v 1.1 2005/09/13 01:44:08 christos Exp $ */
|
||||
/* $NetBSD: compat___sigreturn14.S,v 1.2 2011/01/12 23:12:11 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: compat___sigreturn14.S,v 1.1 2005/09/13 01:44:08 christos Exp $")
|
||||
RCSID("$NetBSD: compat___sigreturn14.S,v 1.2 2011/01/12 23:12:11 joerg Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
@ -52,7 +52,7 @@
|
|||
#define MCOUNT_SYMBOL mcount
|
||||
#endif
|
||||
#define ENTRY(x) \
|
||||
.globl _/**/x; _ALIGN_TEXT; _/**/x: pusha ; \
|
||||
.globl _ ## x; _ALIGN_TEXT; _ ## x: pusha ; \
|
||||
.data; 1:; .long 0; .text; movl $1b,%eax; call MCOUNT_SYMBOL; popa ; nop
|
||||
#endif /* GPROF */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: compat_sigreturn.S,v 1.1 2005/09/13 01:44:08 christos Exp $ */
|
||||
/* $NetBSD: compat_sigreturn.S,v 1.2 2011/01/12 23:12:11 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -36,7 +36,7 @@
|
|||
|
||||
#include <machine/asm.h>
|
||||
#if defined(SYSLIBC_SCCS) && !defined(lint)
|
||||
RCSID("$NetBSD: compat_sigreturn.S,v 1.1 2005/09/13 01:44:08 christos Exp $")
|
||||
RCSID("$NetBSD: compat_sigreturn.S,v 1.2 2011/01/12 23:12:11 joerg Exp $")
|
||||
#endif /* SYSLIBC_SCCS and not lint */
|
||||
|
||||
#include "SYS.h"
|
||||
|
@ -52,7 +52,7 @@
|
|||
#define MCOUNT_SYMBOL mcount
|
||||
#endif
|
||||
#define ENTRY(x) \
|
||||
.globl _/**/x; _ALIGN_TEXT; _/**/x: pusha ; \
|
||||
.globl _ ## x; _ALIGN_TEXT; _ ## x: pusha ; \
|
||||
.data; 1:; .long 0; .text; movl $1b,%eax; call MCOUNT_SYMBOL; popa ; nop
|
||||
#endif /* GPROF */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: bsd.dep.mk,v 1.69 2010/01/25 00:43:00 christos Exp $
|
||||
# $NetBSD: bsd.dep.mk,v 1.70 2011/01/12 23:12:11 joerg Exp $
|
||||
|
||||
##### Basic targets
|
||||
cleandir: cleandepend
|
||||
|
@ -15,8 +15,7 @@ MKDEP_SUFFIXES?= .o
|
|||
# some of the rules involve .h sources, so remove them from mkdep line
|
||||
|
||||
.if defined(SRCS) # {
|
||||
_TRADITIONAL_CPP?=-traditional-cpp
|
||||
__acpp_flags= ${_TRADITIONAL_CPP}
|
||||
__acpp_flags= ${_ASM_TRADITIONAL_CPP}
|
||||
|
||||
__DPSRCS.all= ${SRCS:C/\.(c|m|s|S|C|cc|cpp|cxx)$/.d/} \
|
||||
${DPSRCS:C/\.(c|m|s|S|C|cc|cpp|cxx)$/.d/}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: sys.mk,v 1.100 2010/03/02 20:49:18 darran Exp $
|
||||
# $NetBSD: sys.mk,v 1.101 2011/01/12 23:12:11 joerg Exp $
|
||||
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
|
||||
|
||||
unix?= We run NetBSD.
|
||||
|
@ -15,7 +15,12 @@ AS?= as
|
|||
AFLAGS?=
|
||||
COMPILE.s?= ${CC} ${AFLAGS} -c
|
||||
LINK.s?= ${CC} ${AFLAGS} ${LDFLAGS}
|
||||
COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} -c -traditional-cpp
|
||||
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
|
||||
_ASM_TRADITIONAL_CPP= -x assembler-with-cpp
|
||||
.else
|
||||
_ASM_TRADITIONAL_CPP= -traditional-cpp
|
||||
.endif
|
||||
COMPILE.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${_ASM_TRADITIONAL_CPP} -c
|
||||
LINK.S?= ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
|
||||
|
||||
CC?= cc
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lock_stubs.S,v 1.23 2009/04/24 18:26:51 ad Exp $ */
|
||||
/* $NetBSD: lock_stubs.S,v 1.24 2011/01/12 23:12:11 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -47,8 +47,8 @@
|
|||
#include "assym.h"
|
||||
|
||||
#define ENDLABEL(name,a) .align a; LABEL(name)
|
||||
#define LOCK(num) .Lpatch/**/num: lock
|
||||
#define RET(num) .Lret/**/num: ret; nop; nop; ret
|
||||
#define LOCK(num) .Lpatch ## num: lock
|
||||
#define RET(num) .Lret ## num: ret; nop; nop; ret
|
||||
|
||||
#ifndef LOCKDEBUG
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vector.S,v 1.35 2010/12/20 00:25:24 matt Exp $ */
|
||||
/* $NetBSD: vector.S,v 1.36 2011/01/12 23:12:11 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -392,9 +392,9 @@ calltrap:
|
|||
|
||||
/* XXX See comment in locore.s */
|
||||
#ifdef __ELF__
|
||||
#define XINTR(name,num) Xintr_/**/name/**/num
|
||||
#define XINTR(name,num) Xintr_ ## name ## num
|
||||
#else
|
||||
#define XINTR(name,num) _Xintr_/**/name/**/num
|
||||
#define XINTR(name,num) _Xintr_ ## name ## num
|
||||
#endif
|
||||
|
||||
#if NLAPIC > 0
|
||||
|
@ -646,18 +646,18 @@ IDTVEC(intr_lapic_tlb_bcast)
|
|||
*/
|
||||
|
||||
#define INTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \
|
||||
IDTVEC(recurse_/**/name/**/num) ;\
|
||||
IDTVEC(recurse_ ## name ## num) ;\
|
||||
INTR_RECURSE_HWFRAME ;\
|
||||
subq $8,%rsp ;\
|
||||
pushq $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
IDTVEC(resume_/**/name/**/num) \
|
||||
IDTVEC(resume_ ## name ## num) \
|
||||
movq $IREENT_MAGIC,TF_ERR(%rsp) ;\
|
||||
movl %ebx,%r13d ;\
|
||||
movq CPUVAR(ISOURCES) + (num) * 8, %r14 ;\
|
||||
movl IS_MAXLEVEL(%r14),%ebx ;\
|
||||
jmp 1f ;\
|
||||
IDTVEC(intr_/**/name/**/num) ;\
|
||||
IDTVEC(intr_ ## name ## num) ;\
|
||||
pushq $0 /* dummy error code */ ;\
|
||||
pushq $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
|
@ -995,12 +995,12 @@ _C_LABEL(ioapic_level_stubs):
|
|||
#else /* !XEN */
|
||||
/* Resume/recurse procedures for spl() */
|
||||
#define XENINTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \
|
||||
IDTVEC(recurse_/**/name/**/num) ;\
|
||||
IDTVEC(recurse_ ## name ## num) ;\
|
||||
INTR_RECURSE_HWFRAME ;\
|
||||
subq $8,%rsp ;\
|
||||
pushq $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
IDTVEC(resume_/**/name/**/num) \
|
||||
IDTVEC(resume_ ## name ## num) \
|
||||
movq $IREENT_MAGIC,TF_ERR(%rsp) ;\
|
||||
movl %ebx,%r13d ;\
|
||||
movq CPUVAR(ISOURCES) + (num) * 8, %r14 ;\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.amd64,v 1.29 2009/11/25 17:08:08 tron Exp $
|
||||
# $NetBSD: Makefile.amd64,v 1.30 2011/01/12 23:12:11 joerg Exp $
|
||||
|
||||
# Makefile for NetBSD
|
||||
#
|
||||
|
@ -37,7 +37,7 @@ DEFCOPTS= -O2
|
|||
CPPFLAGS+= -Damd64 -Dx86_64
|
||||
CFLAGS+= -mcmodel=kernel
|
||||
CFLAGS+= -mno-red-zone
|
||||
AFLAGS+= -x assembler-with-cpp -traditional-cpp
|
||||
AFLAGS+= -x assembler-with-cpp
|
||||
|
||||
##
|
||||
## (3) libkern and compat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: frameasm.h,v 1.14 2010/07/07 01:14:52 chs Exp $ */
|
||||
/* $NetBSD: frameasm.h,v 1.15 2011/01/12 23:12:11 joerg Exp $ */
|
||||
|
||||
#ifndef _AMD64_MACHINE_FRAMEASM_H
|
||||
#define _AMD64_MACHINE_FRAMEASM_H
|
||||
|
@ -132,15 +132,15 @@
|
|||
|
||||
#ifdef XEN
|
||||
#define CLI(temp_reg) \
|
||||
movl CPUVAR(CPUID),%e/**/temp_reg ; \
|
||||
shlq $6,%r/**/temp_reg ; \
|
||||
addq CPUVAR(VCPU),%r/**/temp_reg ; \
|
||||
movb $1,EVTCHN_UPCALL_MASK(%r/**/temp_reg)
|
||||
movl CPUVAR(CPUID),%e ## temp_reg ; \
|
||||
shlq $6,%r ## temp_reg ; \
|
||||
addq CPUVAR(VCPU),%r ## temp_reg ; \
|
||||
movb $1,EVTCHN_UPCALL_MASK(%r ## temp_reg)
|
||||
#define STI(temp_reg) \
|
||||
movl CPUVAR(CPUID),%e/**/temp_reg ; \
|
||||
shlq $6,%r/**/temp_reg ; \
|
||||
addq CPUVAR(VCPU),%r/**/temp_reg ; \
|
||||
movb $0,EVTCHN_UPCALL_MASK(%r/**/temp_reg)
|
||||
movl CPUVAR(CPUID),%e ## temp_reg ; \
|
||||
shlq $6,%r ## temp_reg ; \
|
||||
addq CPUVAR(VCPU),%r ## temp_reg ; \
|
||||
movb $0,EVTCHN_UPCALL_MASK(%r ## temp_reg)
|
||||
#else /* XEN */
|
||||
#define CLI(temp_reg) cli
|
||||
#define STI(temp_reg) sti
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.i386,v 1.167 2010/07/06 05:59:59 mrg Exp $
|
||||
# $NetBSD: Makefile.i386,v 1.168 2011/01/12 23:12:12 joerg Exp $
|
||||
|
||||
# Makefile for NetBSD
|
||||
#
|
||||
|
@ -34,7 +34,7 @@ GENASSYM_CONF= ${I386}/i386/genassym.cf
|
|||
## (2) compile settings
|
||||
##
|
||||
CPPFLAGS+= -Di386
|
||||
AFLAGS+= -x assembler-with-cpp -traditional-cpp
|
||||
AFLAGS+= -x assembler-with-cpp
|
||||
|
||||
##
|
||||
## (3) libkern and compat
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: lock_stubs.S,v 1.24 2010/04/07 11:16:30 pooka Exp $ */
|
||||
/* $NetBSD: lock_stubs.S,v 1.25 2011/01/12 23:12:12 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lock_stubs.S,v 1.24 2010/04/07 11:16:30 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lock_stubs.S,v 1.25 2011/01/12 23:12:12 joerg Exp $");
|
||||
|
||||
#include "opt_lockdebug.h"
|
||||
|
||||
|
@ -45,8 +45,8 @@ __KERNEL_RCSID(0, "$NetBSD: lock_stubs.S,v 1.24 2010/04/07 11:16:30 pooka Exp $"
|
|||
|
||||
#define ALIGN64 .align 64
|
||||
#define ALIGN32 .align 32
|
||||
#define LOCK(num) .Lpatch/**/num: lock
|
||||
#define RET(num) .Lret/**/num: ret; nop; nop; ret
|
||||
#define LOCK(num) .Lpatch ## num: lock
|
||||
#define RET(num) .Lret ## num: ret; nop; nop; ret
|
||||
#define ENDLABEL(name,a) .align a; LABEL(name)
|
||||
|
||||
#if !defined(LOCKDEBUG)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vector.S,v 1.55 2010/12/20 00:25:35 matt Exp $ */
|
||||
/* $NetBSD: vector.S,v 1.56 2011/01/12 23:12:12 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 (c) Wasabi Systems, Inc.
|
||||
|
@ -65,7 +65,7 @@
|
|||
*/
|
||||
|
||||
#include <machine/asm.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.55 2010/12/20 00:25:35 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vector.S,v 1.56 2011/01/12 23:12:12 joerg Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
|
@ -402,22 +402,22 @@ IDTVEC_END(intr_lapic_ltimer)
|
|||
*/
|
||||
|
||||
#define INTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \
|
||||
IDTVEC(recurse_/**/name/**/num) ;\
|
||||
IDTVEC(recurse_ ## name ## num) ;\
|
||||
pushfl ;\
|
||||
pushl %cs ;\
|
||||
pushl %esi ;\
|
||||
subl $4,%esp ;\
|
||||
pushl $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
IDTVEC_END(recurse_/**/name/**/num) ;\
|
||||
IDTVEC(resume_/**/name/**/num) \
|
||||
IDTVEC_END(recurse_ ## name ## num) ;\
|
||||
IDTVEC(resume_ ## name ## num) \
|
||||
movl $IREENT_MAGIC,TF_ERR(%esp) ;\
|
||||
movl %ebx,%esi ;\
|
||||
movl CPUVAR(ISOURCES) + (num) * 4, %ebp ;\
|
||||
movl IS_MAXLEVEL(%ebp),%ebx ;\
|
||||
jmp 1f ;\
|
||||
IDTVEC_END(resume_/**/name/**/num) ;\
|
||||
IDTVEC(intr_/**/name/**/num) ;\
|
||||
IDTVEC_END(resume_ ## name ## num) ;\
|
||||
IDTVEC(intr_ ## name ## num) ;\
|
||||
pushl $0 /* dummy error code */ ;\
|
||||
pushl $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
|
@ -473,7 +473,7 @@ IDTVEC(intr_/**/name/**/num) ;\
|
|||
late_ack(num) ;\
|
||||
addl $4,%esp ;\
|
||||
INTRFASTEXIT ;\
|
||||
IDTVEC_END(intr_/**/name/**/num)
|
||||
IDTVEC_END(intr_ ## name ## num)
|
||||
|
||||
#define ICUADDR IO_ICU1
|
||||
|
||||
|
@ -757,7 +757,7 @@ _C_LABEL(ioapic_level_stubs):
|
|||
#define voidop(num)
|
||||
|
||||
#define XENINTRSTUB(name, num, early_ack, late_ack, mask, unmask, level_mask) \
|
||||
IDTVEC(recurse_/**/name/**/num) ;\
|
||||
IDTVEC(recurse_ ## name ## num) ;\
|
||||
pushfl ;\
|
||||
pushl %cs ;\
|
||||
pushl %esi ;\
|
||||
|
@ -765,7 +765,7 @@ IDTVEC(recurse_/**/name/**/num) ;\
|
|||
pushl $T_ASTFLT /* trap # for doing ASTs */ ;\
|
||||
INTRENTRY ;\
|
||||
movl $_C_LABEL(Xdoreti), %esi; /* we now have a trap frame, so loop using doreti instead */ ;\
|
||||
IDTVEC(resume_/**/name/**/num) \
|
||||
IDTVEC(resume_ ## name ## num) \
|
||||
movl $IREENT_MAGIC,TF_ERR(%esp) ;\
|
||||
pushl %ebx ;\
|
||||
movl CPUVAR(ISOURCES) + (num) * 4, %ebp ;\
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.xen,v 1.30 2010/07/06 06:00:02 mrg Exp $
|
||||
# $NetBSD: Makefile.xen,v 1.31 2011/01/12 23:12:12 joerg Exp $
|
||||
# NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp
|
||||
|
||||
# Makefile for NetBSD
|
||||
|
@ -40,7 +40,7 @@ ARCH_INC= $S/arch/xen/include/${XEN_BUILD}
|
|||
##
|
||||
DEFCOPTS= -O2
|
||||
CPPFLAGS+= -D${XEN_BUILD}
|
||||
AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG} -D__XEN__
|
||||
AFLAGS+= -x assembler-with-cpp ${DBG} -D__XEN__
|
||||
EXTRA_INCLUDES= -I${.CURDIR}/xen-ma
|
||||
|
||||
.if ${XEN_BUILD} == "amd64"
|
||||
|
|
Loading…
Reference in New Issue