Subject: pkg/22470: gcc3-ada won't build under CURRENT when Ada compiler was built without threads
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <john@johnrshannon.com>
List: netbsd-bugs
Date: 08/13/2003 19:39:20
>Number: 22470
>Category: pkg
>Synopsis: gcc3-ada won't build under CURRENT when Ada compiler was built without threads
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Aug 13 19:40:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: John R. Shannon
>Release: CURRENT (as of 13 Aug 03)
>Organization:
>Environment:
NetBSD laptop.mobile.johnrshannon.com 1.6W NetBSD 1.6W (KERNEL) #0: Tue Aug 12 00:01:06 MDT 2003 root@laptop.mobile.johnrshannon.com:/usr/obj/sys/arch/i386/compile.i386/KERNEL i386
>Description:
The Ada language front-end is written in Ada. Building it requires an Ada compiler. For bootstrapping, only a partial compiler is required. The gcc3-ada package uses the ADA_BOOT compiler to compile everything when only the GNAT binary gnat1, a copy of gnatbind, and a compiler driver which can deal with Ada input are required. A minor change to the Makefile allows this to be accomplished (patch provided).
>How-To-Repeat:
Build ADA_BOOT compiler under 1.6.1-STABLE and try to build package using it under CURRENT.
>Fix:
--- Makefile.orig 2003-08-13 13:21:52.000000000 -0600
+++ Makefile 2003-08-13 13:07:13.000000000 -0600
@@ -17,15 +17,23 @@
# To make things more interesting, we need a gcc with ada support to build
# ada support.
# The ADA_BOOT definition is used if the system compiler is not sufficient.
+# "You do not need a full installation of GNAT, just the GNAT binary gnat1,
+# a copy of gnatbind, and a compiler driver which can deal with Ada input
+# (by invoking the gnat1 binary)."
# For pkg bootstrap, the ada capable gcc (probably cross-compiled)
# can be anywhere.
# GNATGCC_PREFIX assumes a standard gcc install tree layout.
-#GNATGCC_PREFIX= /usr/pkg/gcc3
+GNATGCC_PREFIX= /usr/pkg/gcc31
# Use this if a special compiler driver is needed to compile ada programs
# (as seen in linux installations).
#GNATGCC_ADA_DRIVER= gnatgcc
+
+# "You still need a working C compiler (the compiler driver can be different or
+# not).
+GCC_PREFIX= /usr/pkg/gcc3
+
.if defined(GNATGCC_PREFIX)
ADA_BOOT= yes
ADA_BOOT_CC= ${GNATGCC_PREFIX}/bin/gcc
@@ -42,13 +50,13 @@
# probably some overkill here...
-CC= ${ADA_BOOT_CC}
-CPP= ${ADA_BOOT_CPP}
+CC= ${GCC_PREFIX}/bin/cc
+CPP= ${GCC_PREFIX}/bin/cpp
PATH:= ${ADA_BOOT_PATH}:${PATH}
-EXTRA_ENV= CC=${ADA_BOOT_CC:Q}
-EXTRA_ENV= CC_FOR_BUILD=${ADA_BOOT_CC:Q}
-EXTRA_ENV+= CPP=${ADA_BOOT_CPP:Q}
+EXTRA_ENV= CC=${CC:Q}
+EXTRA_ENV= CC_FOR_BUILD=${CC:Q}
+EXTRA_ENV+= CPP=${CPP:Q}
EXTRA_ENV+= ADAC=${ADA_BOOT_ADAC:Q}
EXTRA_ENV+= PATH=${ADA_BOOT_PATH}:${PATH}
>Release-Note:
>Audit-Trail:
>Unformatted: