aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-03-04 09:40:33 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-03-04 09:40:33 +0000
commit7965184842db8889354f11ec2e207a0e5b4d26b3 (patch)
tree287bbe2facec8efcffb5e00df406a55cd4b3f856 /usr.bin
parent259f01e88327ec067b4f80f64823603ab63920e5 (diff)
downloadsrc-7965184842db8889354f11ec2e207a0e5b4d26b3.tar.gz
src-7965184842db8889354f11ec2e207a0e5b4d26b3.zip
MFC: CPUTYPE infrastructure, modulo IA64 support
Notes
Notes: svn path=/stable/4/; revision=73502
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/main.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index d8ed082b29b9..c256b2f17e98 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -480,6 +480,7 @@ main(argc, argv)
char cdpath[MAXPATHLEN + 1];
char *machine = getenv("MACHINE");
char *machine_arch = getenv("MACHINE_ARCH");
+ char *machine_cpu = getenv("MACHINE_CPU");
Lst sysMkPath; /* Path of sys.mk */
char *cp = NULL, *start;
/* avoid faults on read-only strings */
@@ -572,6 +573,19 @@ main(argc, argv)
}
/*
+ * Set machine_cpu to the minumum supported CPU revision based
+ * on the target architecture, if not already set.
+ */
+ if (!machine_cpu) {
+ if (!strcmp(machine_arch, "i386"))
+ machine_cpu = "i386";
+ else if (!strcmp(machine_arch, "alpha"))
+ machine_cpu = "ev4";
+ else
+ machine_cpu = "unknown";
+ }
+
+ /*
* The object directory location is determined using the
* following order of preference:
*
@@ -673,6 +687,7 @@ main(argc, argv)
Var_Set("MFLAGS", "", VAR_GLOBAL);
Var_Set("MACHINE", machine, VAR_GLOBAL);
Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL);
+ Var_Set("MACHINE_CPU", machine_cpu, VAR_GLOBAL);
/*
* First snag any flags out of the MAKE environment variable.