Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Allow use of traditional CPP to be set on a per platform bas...
details: https://anonhg.NetBSD.org/src/rev/c0e1d50950d9
branches: trunk
changeset: 760776:c0e1d50950d9
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Jan 12 23:12:10 2011 +0000
description:
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.
diffstat:
common/lib/libc/arch/i386/atomic/atomic.S | 4 ++--
common/lib/libc/arch/x86_64/atomic/atomic.S | 4 ++--
lib/libc/compat/arch/i386/sys/compat___sigreturn14.S | 6 +++---
lib/libc/compat/arch/i386/sys/compat_sigreturn.S | 6 +++---
share/mk/bsd.dep.mk | 5 ++---
share/mk/sys.mk | 9 +++++++--
sys/arch/amd64/amd64/lock_stubs.S | 6 +++---
sys/arch/amd64/amd64/vector.S | 16 ++++++++--------
sys/arch/amd64/conf/Makefile.amd64 | 4 ++--
sys/arch/amd64/include/frameasm.h | 18 +++++++++---------
sys/arch/i386/conf/Makefile.i386 | 4 ++--
sys/arch/i386/i386/lock_stubs.S | 8 ++++----
sys/arch/i386/i386/vector.S | 20 ++++++++++----------
sys/arch/xen/conf/Makefile.xen | 4 ++--
14 files changed, 59 insertions(+), 55 deletions(-)
diffs (truncated from 399 to 300 lines):
diff -r 7e484b9e6f94 -r c0e1d50950d9 common/lib/libc/arch/i386/atomic/atomic.S
--- a/common/lib/libc/arch/i386/atomic/atomic.S Wed Jan 12 23:05:31 2011 +0000
+++ b/common/lib/libc/arch/i386/atomic/atomic.S Wed Jan 12 23:12:10 2011 +0000
@@ -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
diff -r 7e484b9e6f94 -r c0e1d50950d9 common/lib/libc/arch/x86_64/atomic/atomic.S
--- a/common/lib/libc/arch/x86_64/atomic/atomic.S Wed Jan 12 23:05:31 2011 +0000
+++ b/common/lib/libc/arch/x86_64/atomic/atomic.S Wed Jan 12 23:12:10 2011 +0000
@@ -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
diff -r 7e484b9e6f94 -r c0e1d50950d9 lib/libc/compat/arch/i386/sys/compat___sigreturn14.S
--- a/lib/libc/compat/arch/i386/sys/compat___sigreturn14.S Wed Jan 12 23:05:31 2011 +0000
+++ b/lib/libc/compat/arch/i386/sys/compat___sigreturn14.S Wed Jan 12 23:12:10 2011 +0000
@@ -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 */
diff -r 7e484b9e6f94 -r c0e1d50950d9 lib/libc/compat/arch/i386/sys/compat_sigreturn.S
--- a/lib/libc/compat/arch/i386/sys/compat_sigreturn.S Wed Jan 12 23:05:31 2011 +0000
+++ b/lib/libc/compat/arch/i386/sys/compat_sigreturn.S Wed Jan 12 23:12:10 2011 +0000
@@ -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 */
diff -r 7e484b9e6f94 -r c0e1d50950d9 share/mk/bsd.dep.mk
--- a/share/mk/bsd.dep.mk Wed Jan 12 23:05:31 2011 +0000
+++ b/share/mk/bsd.dep.mk Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
# 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/}
diff -r 7e484b9e6f94 -r c0e1d50950d9 share/mk/sys.mk
--- a/share/mk/sys.mk Wed Jan 12 23:05:31 2011 +0000
+++ b/share/mk/sys.mk Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
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
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/amd64/amd64/lock_stubs.S
--- a/sys/arch/amd64/amd64/lock_stubs.S Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/amd64/amd64/lock_stubs.S Wed Jan 12 23:12:10 2011 +0000
@@ -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
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/amd64/amd64/vector.S
--- a/sys/arch/amd64/amd64/vector.S Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/amd64/amd64/vector.S Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
/* 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 @@
*/
#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 @@
#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 ;\
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/amd64/conf/Makefile.amd64
--- a/sys/arch/amd64/conf/Makefile.amd64 Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/amd64/conf/Makefile.amd64 Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
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
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/amd64/include/frameasm.h
--- a/sys/arch/amd64/include/frameasm.h Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/amd64/include/frameasm.h Wed Jan 12 23:12:10 2011 +0000
@@ -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
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/i386/conf/Makefile.i386
--- a/sys/arch/i386/conf/Makefile.i386 Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/i386/conf/Makefile.i386 Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
## (2) compile settings
##
CPPFLAGS+= -Di386
-AFLAGS+= -x assembler-with-cpp -traditional-cpp
+AFLAGS+= -x assembler-with-cpp
##
## (3) libkern and compat
diff -r 7e484b9e6f94 -r c0e1d50950d9 sys/arch/i386/i386/lock_stubs.S
--- a/sys/arch/i386/i386/lock_stubs.S Wed Jan 12 23:05:31 2011 +0000
+++ b/sys/arch/i386/i386/lock_stubs.S Wed Jan 12 23:12:10 2011 +0000
@@ -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 @@
#define ALIGN64 .align 64
Home |
Main Index |
Thread Index |
Old Index