From owner-p4-projects Thu Oct 17 14:15:36 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D44AB37B406; Thu, 17 Oct 2002 14:15:30 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 429B337B401 for ; Thu, 17 Oct 2002 14:15:30 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E79AB43E65 for ; Thu, 17 Oct 2002 14:15:29 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id g9HLFKmV086651 for ; Thu, 17 Oct 2002 14:15:20 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id g9HLFJLD086648 for perforce@freebsd.org; Thu, 17 Oct 2002 14:15:19 -0700 (PDT) Date: Thu, 17 Oct 2002 14:15:19 -0700 (PDT) Message-Id: <200210172115.g9HLFJLD086648@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 19489 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=19489 Change 19489 by jmallett@jmallett_luna on 2002/10/17 14:15:03 Add a platform symlink, a close cousin to the machine symlink, except it points to superconfiguration information, say we want to do something like: :: \#include \#if _BYTE_ORDER == _BIG_ENDIAN .... :: machine mips platform sgimips \#define _BYTE_ORDER _BIG_ENDIAN To pull in information specific to a platform under a given machine architecture. Affected files ... .. //depot/projects/mips/sys/conf/kmod.mk#2 edit .. //depot/projects/mips/sys/mips/conf/GENERIC#2 edit .. //depot/projects/mips/usr.sbin/config/config.h#2 edit .. //depot/projects/mips/usr.sbin/config/config.y#2 edit .. //depot/projects/mips/usr.sbin/config/lang.l#2 edit .. //depot/projects/mips/usr.sbin/config/main.c#2 edit Differences ... ==== //depot/projects/mips/sys/conf/kmod.mk#2 (text+ko) ==== @@ -145,7 +145,7 @@ .endif .endif -_ILINKS=@ machine +_ILINKS=@ machine platform all: objwarn ${PROG} @@ -174,6 +174,8 @@ @case ${.TARGET} in \ machine) \ path=${SYSDIR}/${MACHINE_ARCH}/include ;; \ + platform) \ + path=${SYSDIR}/${MACHINE_ARCH}/${MACHINE} ;; \ @) \ path=${SYSDIR} ;; \ esac ; \ ==== //depot/projects/mips/sys/mips/conf/GENERIC#2 (text+ko) ==== @@ -11,6 +11,7 @@ makeoptions WERROR=-Wno-error #XXX: We don't want -Werror just now # Platform support +platform sgimips #SGI MIPS guts options SGI #SGI MIPS hardware # Hardware support ==== //depot/projects/mips/usr.sbin/config/config.h#2 (text+ko) ==== @@ -91,9 +91,11 @@ * being used. It uses the name of the machine in choosing * files and directories. Thus if the name of the machine is ``i386'', * it will build from ``Makefile.i386'' and use ``../i386/inline'' - * in the makerules, etc. + * in the makerules, etc. It also *may* know about a platform, which + * is a superconfiguration of a given machine. */ char *machinename; +char *platformname; /* * For each machine, a set of CPU's may be specified as supported. ==== //depot/projects/mips/usr.sbin/config/config.y#2 (text+ko) ==== @@ -14,6 +14,7 @@ %token HINTS %token IDENT %token MAXUSERS +%token PLATFORM %token PROFILE %token OPTIONS %token MAKEOPTIONS @@ -136,6 +137,10 @@ cp->cpu_next = cputype; cputype = cp; } | + PLATFORM Save_id + = { + platformname = $2; + } | OPTIONS Opt_list | MAKEOPTIONS Mkopt_list ==== //depot/projects/mips/usr.sbin/config/lang.l#2 (text+ko) ==== @@ -73,6 +73,7 @@ { "machine", ARCH }, /* MACHINE is defined in /sys/param.h */ { "makeoptions", MAKEOPTIONS }, { "maxusers", MAXUSERS }, + { "platform", PLATFORM }, { "profile", PROFILE }, { "option", OPTIONS }, { "options", OPTIONS }, ==== //depot/projects/mips/usr.sbin/config/main.c#2 (text+ko) ==== @@ -164,6 +164,19 @@ srcdir, machinename); (void) unlink(path("machine")); (void) symlink(xxx, path("machine")); + /* + * make symbolic link for the platform, if we have one. + */ + if (platformname != NULL) { + if (*srcdir == '\0') + (void)snprintf(xxx, sizeof(xxx), "../../%s", + platformname); + else + (void)snprintf(xxx, sizeof(xxx), "%s/%s/%s", + srcdir, machinename, platformname); + } + (void) unlink(path("platform")); + (void) symlink(xxx, path("platform")); options(); /* make options .h files */ makefile(); /* build Makefile */ headers(); /* make a lot of .h files */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message