summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-02-03 20:46:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-02-03 20:46:32 +0000
commit7dfb23e53684ac495a4cf9a6a5188a1f91d5885a (patch)
treef5a4547243adcab0320523019ac31f84f76d1f91 /usr.bin/xlint
parent242a685bbe8387eac874059ec9de2cbbe38353d1 (diff)
If MACHINE_CPU != MACHINE_ARCH, pass -D__${MACHINE_CPU}__ to the preprocessor.
ok kettenis@
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/xlint/xlint.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/xlint/xlint/xlint.c b/usr.bin/xlint/xlint/xlint.c
index 07191aba921..71e53bd93db 100644
--- a/usr.bin/xlint/xlint/xlint.c
+++ b/usr.bin/xlint/xlint/xlint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xlint.c,v 1.33 2007/03/20 16:16:44 jmc Exp $ */
+/* $OpenBSD: xlint.c,v 1.34 2010/02/03 20:46:31 miod Exp $ */
/* $NetBSD: xlint.c,v 1.3 1995/10/23 14:29:30 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: xlint.c,v 1.33 2007/03/20 16:16:44 jmc Exp $";
+static char rcsid[] = "$OpenBSD: xlint.c,v 1.34 2010/02/03 20:46:31 miod Exp $";
#endif
#include <sys/param.h>
@@ -334,6 +334,12 @@ main(int argc, char *argv[])
appstrg(&lcppflgs, concat2("-D", un.machine));
#ifdef MACHINE_ARCH
+#ifdef MACHINE_CPU
+ if (strcmp(MACHINE_ARCH, MACHINE_CPU) != 0) {
+ appdef(&cppflags, MACHINE_CPU);
+ appstrg(&lcppflgs, concat2("-D", MACHINE_CPU));
+ }
+#endif
if (strcmp(un.machine, MACHINE_ARCH) != 0) {
appdef(&cppflags, MACHINE_ARCH);
appstrg(&lcppflgs, concat2("-D", MACHINE_ARCH));