This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

New OS port for GCC: 4.3BSD


Hi there,

The patch below adds a new OS port (host and target) to GCC: 4.3BSD. This
really is a new port, it relies on a change to config.guess that I made last
weekend (which Ben Elliston has already approved and checked into the master
version). config.guess now outputs vax-dec-bsd4.3 on the OS in question, which
it never did before. GNU software never previously supported 4.3BSD as an OS of
its own, it only tried to support "old VAX BSD systems in general". This
approach is not right and I doubt that it ever worked correctly. (I would not
be surprised if GNU software never worked on 4.3BSD correctly, not even in the
earliest days. The motive behind GNU was "UNIX is non-free", and since this is
true for non-free vendorised systems like SunOS and Ultrix, but not for the
free true original UNIX and BSD, I assume the GNU folks were using and assuming
the former, with the latter being conveniently side-stepped.) In any case this
old approach of treating 4.3BSD as "misc ancient UNIX" most certainly doesn't
work for the current GCC (and didn't work throughout all recent history). For
the current GCC 4.3BSD needs to be a port of its own, and I hereby add this new
port.

The new port is a full-blown hosted one. It bootstraps natively, 4.3BSD-hosted
cross-compilers can be built to other systems, and one can cross-compile for
4.3BSD from other systems. The new port bootstraps and works correctly with no
patches other than this one that adds it for C, FORTRAN 77, and ObjC. C++ has
no problems on 4.3BSD per se either, but it is currently broken on all systems
with static struct return ABIs (see my gcc list posts).

The patch below was originally intended to be quite a bit bigger and add the
4.3BSD-specific configury to libstdc++-v3 as well. I already have those bits,
but I'm not posting them yet as I think it's premature to deal with
libstdc++-v3 when the C++ front end is broken with no ETA. I would like to get
the 4.3BSD port in without C++ for now, and when/if C++ is fixed I'll add the
4.3BSD configury bits to libstd++-v3.

This being a new port and the tree currently being slushy and getting ready to
branch, I understand that I may have to delay until after the branch and not
have this port in GCC 3.0. However, if possible I would still like to get this
into 3.0, and I don't see how a new port can destabilise anything. (I remember
Mark saying no new CPU ports while slushy, but nothing about new OS ports on
existing CPUs, and David Edelsohn has just added AIX5 in this manner.)

-- 
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force

1351 VINE AVE APT 27		Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA	(home office)

E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)

top level ChangeLog:
2001-01-30  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* MAINTAINERS (4.3BSD): New port, add myself.
	* config.guess: Import from subversions.gnu.org (revision 1.181).
	* config.sub: Import from subversions.gnu.org (revision 1.199).

gcc/ChangeLog:
2001-01-30  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

	* config.gcc (vax-*-bsd4.3): Add new port.
	* config/vax/bsd43.h: New file.
	* config/vax/xm-bsd43.h: New file.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/gcc/egcs/MAINTAINERS,v
retrieving revision 1.137
diff -p -r1.137 MAINTAINERS
*** MAINTAINERS	2001/01/21 01:13:52	1.137
--- MAINTAINERS	2001/01/31 06:13:10
*************** c++ runtime libs        Gabriel Dos Reis
*** 81,86 ****
--- 81,87 ----
  *c-torture		Torbjorn Granlund	tege@swox.com
  *f-torture		Kate Hedstrom		kate@ahab.rutgers.edu
  sco5, unixware, sco udk	Robert Lipe		robertlipe@usa.net
+ 4.3BSD			Michael Sokolov		msokolov@ivan.Harhan.ORG
  fixincludes		Bruce Korb		bkorb@gnu.org
  gcse.c 			Jeff Law		law@redhat.com
  global opt framework	Jeff Law		law@redhat.com
Index: gcc/config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.25
diff -p -r1.25 config.gcc
*** config.gcc	2001/01/27 20:50:51	1.25
--- config.gcc	2001/01/31 06:13:20
*************** v850-*-*)
*** 3291,3296 ****
--- 3291,3302 ----
  	c_target_objs="v850-c.o"
  	cxx_target_objs="v850-c.o"
  	;;
+ vax-*-bsd4.3)			# vaxen running 4.3BSD
+ 	tm_file="${tm_file} vax/bsd43.h"
+ 	xm_file="${xm_file} vax/xm-bsd43.h"
+ 	use_collect2=yes
+ 	float_format=vax
+ 	;;
  vax-*-bsd*)			# vaxen running BSD
  	use_collect2=yes
  	float_format=vax
Index: gcc/config/vax/bsd43.h
===================================================================
RCS file: bsd43.h
diff -N bsd43.h
*** /dev/null	Tue May  5 13:32:27 1998
--- bsd43.h	Tue Jan 30 22:13:20 2001
***************
*** 0 ****
--- 1,22 ----
+ /* Additional VAX target macros specifically for 4.3BSD
+    Copyright (C) 2001 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ /* Pure BSD doesn't have atexit which we now require, so provide our own.  */
+ #define NEED_ATEXIT 1
Index: gcc/config/vax/xm-bsd43.h
===================================================================
RCS file: xm-bsd43.h
diff -N xm-bsd43.h
*** /dev/null	Tue May  5 13:32:27 1998
--- xm-bsd43.h	Tue Jan 30 22:13:20 2001
***************
*** 0 ****
--- 1,26 ----
+ /* Additional VAX host macros specifically for 4.3BSD
+    Copyright (C) 2001 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.  */
+ 
+ /* 4.3BSD's <sys/wait.h> is not POSIX-compliant (uses union wait instead of
+    int), but PCC hides this fact by allowing the dot operator on an int.  This
+    causes trouble for GCC during bootstrap as GCC definitely won't mirror this
+    bit of PCC's behavior, and in general we shouldn't be using native system
+    "features" that we dislike.  So, force no <sys/wait.h> on 4.3BSD.  */
+ #undef HAVE_SYS_WAIT_H

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]