From phobos.walker.org!root@tau-ceti.isc-br.com  Sat Dec 14 15:49:43 1996
Received: from tau-ceti.isc-br.com (root@tau-ceti.isc-br.com [129.189.2.133])
          by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id PAA00517
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 14 Dec 1996 15:49:42 -0800 (PST)
Received: by tau-ceti.isc-br.com (Smail3.1.28.1 #13)
	id m0vZ3mc-0003D6C; Sat, 14 Dec 96 15:46 PST
Received: (from root@localhost) by phobos.walker.org (8.8.4/8.7.3) id PAA14526; Sat, 14 Dec 1996 15:10:54 -0800 (PST)
Message-Id: <199612142310.PAA14526@phobos.walker.org>
Date: Sat, 14 Dec 1996 15:10:54 -0800 (PST)
From: kew@timesink.spk.wa.us
Reply-To: kew@timesink.spk.wa.us
To: FreeBSD-gnats-submit@freebsd.org
Subject: Ada specs not being compiled into cc/gcc
X-Send-Pr-Version: 3.2

>Number:         2216
>Category:       bin
>Synopsis:       [PATCH] Ada specs not being compiled into cc/gcc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kan
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 14 15:50:01 PST 1996
>Closed-Date:    Mon Dec 09 11:16:15 PST 2002
>Last-Modified:  Mon Dec 09 11:16:15 PST 2002
>Originator:     Keith Walker
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Home User.
>Environment:

	3.0 current, but as I remember, I had to fix this on 2.2 as well.
	My memory fails me on whether I fixed this on 2.1.5???

>Description:

	The current version of cc/gcc does not have the Ada specs
	compiled in. This poses a problem if the GNAT-Ada port is
	installed as the driver program will not recognize any of
	the ".ad[bs]" files.

>How-To-Repeat:

	Install GNAT Ada. Attempt to compile any ada program consisting
	of .adb and .ads files.

>Fix:
	
	Change /usr/src/gnu/usr.bin/cc/cc_tools/Makefile with this patch:

--- Makefile.orig	Sat Dec 14 15:03:36 1996
+++ Makefile	Sat Dec 14 14:45:05 1996
@@ -129,6 +129,7 @@
 	echo '#include "cp/lang-options.h"'  > options.h
 	echo '#include "cp/lang-specs.h"'    > specs.h
 	echo '#include "f2c-specs.h"'        >> specs.h
+	echo '#include "ada-specs.h"'	     >> specs.h
 	@touch aout
 
 elf:
@@ -140,6 +141,7 @@
 	echo '#include "cp/lang-options.h"'  > options.h
 	echo '#include "cp/lang-specs.h"'    > specs.h
 	echo '#include "f2c-specs.h"'        >> specs.h
+	echo '#include "ada-specs.h"'	     >> specs.h
 	@touch elf
 
 CLEANFILES+=	config.h hconfig.h tconfig.h tm.h options.h specs.h elf aout


	Create the new file /usr/src/gnu/usr.bin/cc/cc/ada-specs.h:

/****************************************************************************/
/*                                                                          */
/*                         GNAT COMPILER COMPONENTS                         */
/*                                                                          */
/*                            L A N G - S P E C S                           */
/*                                                                          */
/*                              C Header File                               */
/*                                                                          */
/*                            $Revision: 1.6 $                              */
/*                                                                          */
/*    Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.   */
/*                                                                          */
/* GNAT is free software;  you can  redistribute it  and/or modify it under */
/* terms of the  GNU General Public License as published  by the Free Soft- */
/* ware  Foundation;  either version 2,  or (at your option) any later ver- */
/* sion.  GNAT is distributed in the hope that it will be useful, but WITH- */
/* OUT 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  distributed with GNAT;  see file COPYING.  If not, write */
/* to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, */
/* MA 02111-1307, USA.                                                      */
/*                                                                          */
/* GNAT was originally developed  by the GNAT team at  New York University. */
/* It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). */
/*                                                                          */
/****************************************************************************/

/* This is the contribution to the `default_compilers' array in gcc.c for
   GNAT.  */

  {".ads", "@ada"},
  {".adb", "@ada"},
  {".ada", "@ada"},
  {"@ada",
   "%{!M:%{!MM:%{!E:gnat1 %{I*} %{k8:-gnatk8} %{w:-gnatws} %{!Q:-quiet}\
			  -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}\
				%{!.adb:%{!.ads:%b.ada}}\
			  %{g*} %{O*} %{W*} %{w} %{p} %{pg:-p} %{m*}\
			  %{a} %{f*} %{d*}\
			  %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
			  %i %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
		    %{!S:%{!gnatc:%{!gnatz:%{!gnats:as %a %Y\
					      %{c:%W{o*}%{!o*:-o %w%b%O}}\
					      %{!c:-o %d%w%u%O} %{!pipe:%g.s} %A\n}}}}}}} "},

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended 
State-Changed-By: phk 
State-Changed-When: Sat May 23 02:17:13 PDT 1998 
State-Changed-Why:  
awaiting committer 
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Aug 11 09:01:38 PDT 2000 
Responsible-Changed-Why:  
David is our gcc maintainer, he can decide what to do with  
PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=2216 
Responsible-Changed-From-To: obrien->freebsd-bugs 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Mon Sep 10 09:28:03 PDT 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=2216 
Responsible-Changed-From-To: freebsd-bugs->kan 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Tue Nov 12 08:13:19 PST 2002 
Responsible-Changed-Why:  
Over to our new Mr. Gcc. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=2216 
State-Changed-From-To: suspended->closed 
State-Changed-By: kan 
State-Changed-When: Mon Dec 9 11:12:05 PST 2002 
State-Changed-Why:  
System C/C++ compiler will not compile Ada sources and 
it was never intended to do so. 

The port originator is advised to use /usr/ports/lang/gnat 
port for that purpose. 

The same applies for Java, Modula-2, chill and other GCC 
frontends. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=2216 
>Unformatted:
