Remove gcc3-ada-devel, gcc3-c-devel, and gcc3-c++-devel:

johnrshannon says they've been superseded by the gcc34 packages.
This commit is contained in:
Thomas Klausner 2004-05-14 14:38:31 +00:00
parent 1af5c7b21d
commit 33571bdb33
48 changed files with 2 additions and 4814 deletions

View file

@ -1,5 +1,5 @@
# $Id: Makefile,v 1.1277 2004/05/14 00:58:37 minskim Exp $
# $NetBSD: Makefile,v 1.1277 2004/05/14 00:58:37 minskim Exp $
# $Id: Makefile,v 1.1278 2004/05/14 14:38:31 thomasklausner Exp $
# $NetBSD: Makefile,v 1.1278 2004/05/14 14:38:31 thomasklausner Exp $
COMMENT= WIP pkgsrc packages
@ -155,9 +155,6 @@ SUBDIR+= gDesklets-rssgrab
SUBDIR+= gDesklets-starterbar
SUBDIR+= galib
SUBDIR+= gcc-3.4-ada
SUBDIR+= gcc3-ada-devel
SUBDIR+= gcc3-c++-devel
SUBDIR+= gcc3-c-devel
#SUBDIR+= gcl # see TODO
#SUBDIR+= gcl-nox11 # see gcl/TODO
SUBDIR+= gcompris

View file

@ -1,12 +0,0 @@
This pkg builds the GNU Compiler Collection (GCC) version 3.4 Ada compiler.
This is a devepmental release.
The pkg works with the other pkgs in the gcc3-*-devel set of packages to
support a number of languages using multiple language front-ends and a
common compiler back-end. The gcc3-c-devel pkg provides the common
components and is required by all the other gcc3-*-devel pkgs.
This package was created for the rather large task of bringing the
Ada compiler into compiliance with the Ada Compiler Validation
Suite (ACATS). Once that work is completed, and gcc 3.4 is released,
this package can be merged into gcc3-ada.

View file

@ -1,7 +0,0 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2003/12/12 10:52:46 johnrshannon Exp $
To use ${PKGNAME} include "${GCC_PREFIX}/mk/ada.mk" in your
BSD style makefile.
===========================================================================

View file

@ -1,92 +0,0 @@
# $NetBSD: Makefile,v 1.6 2003/12/24 18:56:07 johnrshannon Exp $
#
PKGNAME= gcc3${GCC3_PKGMODIF}-ada-${GCC_VERSION}-devel
COMMENT= GNU Compiler Collection, version 3-${SNAPDATE}, Ada compiler
.include "../gcc3-c-devel/buildaddon.mk"
PTHREAD_OPTS+= require native
CONFIGURE_ARGS+= --enable-languages="ada"
#
# Bootstrap section. Define something to make the pkg usable.
#
# To make things more interesting, we need a gcc with ada support to build
# ada support.
# A gcc tree with compiler driver and gnatbind should be in ADA_BOOT_PATH.
ADA_BOOT_PATH= /usr/pkg/gcc3bootstrap
# Use this if a special compiler driver is needed to compile ada programs
# (as seen in linux installations).
#GNATGCC_ADA_DRIVER= gnatgcc
.if defined(ADA_BOOT_PATH)
.if defined(GNATGCC_ADA_DRIVER)
ADA_BOOT_ADAC= ${ADA_BOOT_PATH}/bin/${GNATGCC_ADA_DRIVER}
.else
ADA_BOOT_ADAC= ${ADA_BOOT_PATH}/bin/gcc
.endif
ADA_BOOT_GNATBIND= ${ADA_BOOT_PATH}/bin/gnatbind
EXTRA_ENV+= ADAC=${ADA_BOOT_ADAC:Q}
CONFIGURE_ENV+= ${EXTRA_ENV}
MAKE_ENV+= ${EXTRA_ENV}
.else # !ADA_BOOT_PATH
# XXX No known system has ada in the main tree.
ONLY_FOR_PLATFORM= sorry_need_ada_compiler
.endif # ADA_BOOT_PATH
#
# End of bootstrap section
#
post-patch:
(cd files; \
${CP} adasignal.c ${WRKSRC}/gcc/ada; \
${CP} ada_lwp_self.c ${WRKSRC}/gcc/ada; \
${CP} dummy_pthreads.c ${WRKSRC}/gcc/ada; \
for i in *.adb *.ads ; do \
${CP} $$i ${WRKSRC}/gcc/ada; \
done )
post-buildlink:
${LN} -sf ${ADA_BOOT_GNATBIND} ${BUILDLINK_DIR}/bin
post-configure:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} configure-host)
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} configure-target)
${TEST} -f ${WRKSRC}/gcc/ada/Makefile \
|| ${FALSE} # no ada bootstrap found by configure
do-build:
(cd ${WRKSRC}/intl && ${SETENV} ${MAKE_ENV} ${GMAKE})
(cd ${WRKSRC}/gcc && ${GMAKE} ada)
# XXX avoid some VPATH related lossage
(cd ${WRKSRC}/gcc/ada && ${MV} targtyps.o targtyps.o.sav)
(cd ${WRKSRC}/gcc/ada && ${RM} -f *.o *.ali)
(cd ${WRKSRC}/gcc/ada && ${MV} targtyps.o.sav targtyps.o)
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} gnatlib_and_tools)
pre-install:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
${ECHO} "ADA_INCLUDE_PATH+=${GCC_ARCHDIR}/adainclude" >> ${WRKDIR}/gcc3.mk
do-test:
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} check-ada)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gcc/gnat1 ${GCC_ARCHDIR}
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} \
ada.install-common install-gnatlib)
${RM} -f ${GCC_ARCHDIR}/adalib/lib*.so
post-install:
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${GCC_PREFIX}/mk/ada.mk
.include "../../mk/pthread.buildlink2.mk"
.include "../../mk/bsd.pkg.mk"

File diff suppressed because it is too large Load diff

View file

@ -1,4 +0,0 @@
- There is an incomplete change in the gcc source
tree changing to directory gcc instead of gcc-lib.
The gcc-lib ireferences are still abundant in the ada and
testsuite code.

View file

@ -1,8 +0,0 @@
$NetBSD: distinfo,v 1.6 2004/02/28 00:13:15 rillig Exp $
SHA1 (gcc-3.4-20040218.tar.bz2) = 43705ead779ef64709ed597825b7fad597c8d577
Size (gcc-3.4-20040218.tar.bz2) = 24951017 bytes
SHA1 (patch-ad) = d7379ea27e2c7a93815c0f8a1bbe53782f952485
SHA1 (patch-ae) = 29c87ecf5fbb23035a37e0b4e6e9c4c7bd76c7f2
SHA1 (patch-af) = cdd6b0d13c557996cb6582d7fa5dc651d37ee0ee
SHA1 (patch-ag) = beee5294d387faafa640ab048823499da629e715

View file

@ -1,117 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- A D A . I N T E R R U P T S . N A M E S --
-- --
-- S p e c --
-- --
-- --
-- Copyright (C) 1991-2002 Free Software Foundation, Inc. --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is a NetBSD version of this package.
--
with System.OS_Interface;
-- used for names of interrupts
package Ada.Interrupts.Names is
-- Beware that the mapping of names to signals may be
-- many-to-one. There may be aliases. Also, for all
-- signal names that are not supported on the current system
-- the value of the corresponding constant will be zero.
Sighup : constant Interrupt_ID := System.OS_Interface.sighup;
-- hangup
Sigint : constant Interrupt_ID := System.OS_Interface.sigint;
-- interrupt (rubout)
Sigquit : constant Interrupt_ID := System.OS_Interface.sigquit;
-- quit (ASCD FS)
Sigill : constant Interrupt_ID := System.OS_Interface.sigill;
-- illegal instruction (not reset)
Sigtrap : constant Interrupt_ID := System.OS_Interface.sigtrap;
-- trace trap (not reset)
Sigiot : constant Interrupt_ID := System.OS_Interface.sigiot;
-- IOT instruction
SIGABRT : constant Interrupt_ID := System.OS_Interface.SIGABRT;
-- used by abort,-- replace SIGIOT in the future
Sigemt : constant Interrupt_ID := System.OS_Interface.sigemt;
-- EMT instruction
Sigfpe : constant Interrupt_ID := System.OS_Interface.sigfpe;
-- floating point exception
Sigkill : constant Interrupt_ID := System.OS_Interface.sigkill;
-- kill (cannot be caught or ignored)
Sigbus : constant Interrupt_ID := System.OS_Interface.sigbus;
-- bus error
Sigsegv : constant Interrupt_ID := System.OS_Interface.sigsegv;
-- segmentation violation
Sigsys : constant Interrupt_ID := System.OS_Interface.sigsys;
-- bad argument to system call
Sigpipe : constant Interrupt_ID := System.OS_Interface.sigpipe;
-- write on a pipe with-- no one to read it
Sigalrm : constant Interrupt_ID := System.OS_Interface.sigalrm;
-- alarm clock
Sigterm : constant Interrupt_ID := System.OS_Interface.sigterm;
-- software termination signal from kill
Sigusr1 : constant Interrupt_ID := System.OS_Interface.sigusr1;
-- user defined signal 1
Sigusr2 : constant Interrupt_ID := System.OS_Interface.sigusr2;
-- user defined signal 2
Sigcld : constant Interrupt_ID := System.OS_Interface.sigchld;
-- child status change
Sigchld : constant Interrupt_ID := System.OS_Interface.sigchld;
-- 4.3BSD's/POSIX name for SIGCLD
Sigwinch : constant Interrupt_ID := System.OS_Interface.sigwinch;
-- window size change
Sigurg : constant Interrupt_ID := System.OS_Interface.sigurg;
-- urgent condition on IO channel
Sigpoll : constant Interrupt_ID := System.OS_Interface.sigio;
-- pollable event occurred
Sigio : constant Interrupt_ID := System.OS_Interface.sigio;
-- input/output possible,-- SIGPOLL alias (Solaris)
Sigstop : constant Interrupt_ID := System.OS_Interface.sigstop;
-- stop (cannot be caught or ignored)
Sigtstp : constant Interrupt_ID := System.OS_Interface.sigtstp;
-- user stop requested from tty
Sigcont : constant Interrupt_ID := System.OS_Interface.sigcont;
-- stopped process has been continued
Sigttin : constant Interrupt_ID := System.OS_Interface.sigttin;
-- background tty read attempted
Sigttou : constant Interrupt_ID := System.OS_Interface.sigttou;
-- background tty write attempted
Sigvtalrm : constant Interrupt_ID := System.OS_Interface.sigvtalrm;
-- virtual timer expired
Sigprof : constant Interrupt_ID := System.OS_Interface.sigprof;
-- profiling timer expired
Sigxcpu : constant Interrupt_ID := System.OS_Interface.sigxcpu;
-- CPU time limit exceeded
Sigxfsz : constant Interrupt_ID := System.OS_Interface.sigxfsz;
-- filesize limit exceeded
Sigpwr : constant Interrupt_ID := System.OS_Interface.sigpwr;
-- power-fail restart
Siginfo : constant Interrupt_ID := System.OS_Interface.siginfo;
end Ada.Interrupts.Names;

View file

@ -1,274 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . I N T E R R U P T _ M A N A G E M E N T --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2002, Free Software Foundation, Inc. --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
-- This is the NetBSD threads version of this package
-- PLEASE DO NOT add any dependences on other packages. ??? why not ???
-- This package is designed to work with or without tasking support.
-- See the other warnings in the package specification before making
-- any modifications to this file.
-- Make a careful study of all signals available under the OS, to see which
-- need to be reserved, kept always unmasked, or kept always unmasked. Be on
-- the lookout for special signals that may be used by the thread library.
-- Since this is a multi target file, the signal <-> exception mapping
-- is simple minded. If you need a more precise and target specific
-- signal handling, create a new s-intman.adb that will fit your needs.
-- This file assumes that:
-- sigfpe, sigill, sigsegv and sigbus exist. They are mapped as follows:
-- sigfpe => Constraint_Error
-- sigill => Program_Error
-- sigill => Storage_Error
-- sigbus => Storage_Error
-- sigint exists and will be kept unmasked unless the pragma
-- Unreserve_All_Interrupts is specified anywhere in the application.
-- System.OS_Interface contains the following:
-- SIGADAABORT: the signal that will be used to abort tasks.
-- Unmasked: the OS specific set of signals that should be unmasked in
-- all the threads. SIGADAABORT is unmasked by
-- default
-- Reserved: the OS specific set of signals that are reserved.
with Interfaces.C;
-- used for int and other types
with System.OS_Interface;
-- used for various Constants, Signal and types
package body System.Interrupt_Management is
use Interfaces.C;
use System.OS_Interface;
type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID;
Exception_Interrupts : constant Interrupt_List :=
(sigfpe, sigill, sigsegv, sigbus);
Unreserve_All_Interrupts : Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
-----------------------
-- Local Subprograms --
-----------------------
procedure Notify_Exception (signo : Signal);
-- This function identifies the Ada exception to be raised using
-- the information when the system received a synchronous signal.
-- Since this function is machine and OS dependent, different code
-- has to be provided for different target.
----------------------
-- Notify_Exception --
----------------------
Signal_Mask : aliased sigset_t;
-- The set of signals handled by Notify_Exception
procedure Notify_Exception (signo : Signal) is
Result : Interfaces.C.int;
begin
-- With the __builtin_longjmp, the signal mask is not restored, so we
-- need to restore it explicitely.
Result := pthread_sigmask (SIG_UNBLOCK, Signal_Mask'Access, null);
pragma Assert (Result = 0);
-- Check that treatment of exception propagation here
-- is consistent with treatment of the abort signal in
-- System.Task_Primitives.Operations.
case signo is
when sigfpe =>
raise Constraint_Error;
when sigill =>
raise Program_Error;
when sigbus | sigsegv =>
raise Storage_Error;
when others =>
null;
end case;
end Notify_Exception;
---------------------------
-- Initialize_Interrupts --
---------------------------
-- Nothing needs to be done on this platform.
procedure Initialize_Interrupts is
begin
null;
end Initialize_Interrupts;
-------------------------
-- Package Elaboration --
-------------------------
begin
declare
act : aliased struct_sigaction;
old_act : aliased struct_sigaction;
Result : System.OS_Interface.int;
function State (Int : Interrupt_ID) return Character;
pragma Import (C, State, "__gnat_get_interrupt_state");
-- Get interrupt state. Defined in a-init.c
-- The input argument is the interrupt number,
-- and the result is one of the following:
User : constant Character := 'u';
Runtime : constant Character := 'r';
Default : constant Character := 's';
-- 'n' this interrupt not set by any Interrupt_State pragma
-- 'u' Interrupt_State pragma set state to User
-- 'r' Interrupt_State pragma set state to Runtime
-- 's' Interrupt_State pragma set state to System (use "default"
-- system handler)
begin
-- Need to call pthread_init very early because it is doing signal
-- initializations.
pthread_init;
Abort_Task_Interrupt := SIGADAABORT;
act.sa_handler := Notify_Exception'Address;
act.sa_flags := 0;
-- On some targets, we set sa_flags to SA_NODEFER so that during the
-- handler execution we do not change the Signal_Mask to be masked for
-- the Signal.
-- This is a temporary fix to the problem that the Signal_Mask is
-- not restored after the exception (longjmp) from the handler.
-- The right fix should be made in sigsetjmp so that we save
-- the Signal_Set and restore it after a longjmp.
-- Since SA_NODEFER is obsolete, instead we reset explicitely
-- the mask in the exception handler.
Result := sigemptyset (Signal_Mask'Access);
pragma Assert (Result = 0);
-- Add signals that map to Ada exceptions to the mask.
for J in Exception_Interrupts'Range loop
if State (Exception_Interrupts (J)) /= Default then
Result :=
sigaddset (Signal_Mask'Access, Signal (Exception_Interrupts (J)));
pragma Assert (Result = 0);
end if;
end loop;
act.sa_mask := Signal_Mask;
pragma Assert (Keep_Unmasked = (Interrupt_ID'Range => False));
pragma Assert (Reserve = (Interrupt_ID'Range => False));
-- Process state of exception signals
for J in Exception_Interrupts'Range loop
if State (Exception_Interrupts (J)) /= User then
Keep_Unmasked (Exception_Interrupts (J)) := True;
Reserve (Exception_Interrupts (J)) := True;
if State (Exception_Interrupts (J)) /= Default then
Result :=
sigaction
(Signal (Exception_Interrupts (J)), act'Unchecked_Access,
old_act'Unchecked_Access);
pragma Assert (Result = 0);
end if;
end if;
end loop;
if State (Abort_Task_Interrupt) /= User then
Keep_Unmasked (Abort_Task_Interrupt) := True;
Reserve (Abort_Task_Interrupt) := True;
end if;
-- Set sigint to unmasked state as long as it is not in "User"
-- state. Check for Unreserve_All_Interrupts last
if State (sigint) /= User then
Keep_Unmasked (sigint) := True;
Reserve (sigint) := True;
end if;
-- Check all signals for state that requires keeping them
-- unmasked and reserved
for J in Interrupt_ID'Range loop
if State (J) = Default or else State (J) = Runtime then
Keep_Unmasked (J) := True;
Reserve (J) := True;
end if;
end loop;
-- Add the set of signals that must always be unmasked for this target
for J in Unmasked'Range loop
Keep_Unmasked (Interrupt_ID (Unmasked (J))) := True;
Reserve (Interrupt_ID (Unmasked (J))) := True;
end loop;
-- Add target-specific reserved signals
for J in Reserved'Range loop
Reserve (Interrupt_ID (Reserved (J))) := True;
end loop;
-- Process pragma Unreserve_All_Interrupts. This overrides any
-- settings due to pragma Interrupt_State:
if Unreserve_All_Interrupts /= 0 then
Keep_Unmasked (sigint) := False;
Reserve (sigint) := False;
end if;
-- We do not have Signal 0 in reality. We just use this value
-- to identify non-existent signals (see s-intnam.ads). Therefore,
-- Signal 0 should not be used in all signal related operations hence
-- mark it as reserved.
Reserve (0) := True;
end;
end System.Interrupt_Management;

View file

@ -1,115 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 1991-2001 Florida State University --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This is the NetBSD version of this package.
-- This package encapsulates all direct interfaces to OS services
-- that are needed by children of System.
pragma Polling (Off);
-- Turn off polling, we do not want ATC polling to take place during
-- tasking operations. It causes infinite loops and other problems.
with Interfaces.C; use Interfaces.C;
package body System.OS_Interface is
------------------
-- pthread_init --
------------------
procedure pthread_init is
begin
null;
end pthread_init;
-----------------
-- To_Duration --
-----------------
function To_Duration (TS : timespec) return Duration is
begin
return Duration (TS.tv_sec) + Duration (TS.tv_nsec) / 10#1#E9;
end To_Duration;
function To_Duration (TV : struct_timeval) return Duration is
begin
return Duration (TV.tv_sec) + Duration (TV.tv_usec) / 10#1#E6;
end To_Duration;
-----------------
-- To_Timespec --
-----------------
function To_Timespec (D : Duration) return timespec is
S : time_t;
F : Duration;
begin
S := time_t (Long_Long_Integer (D));
F := D - Duration (S);
-- If F has negative value due to a round-up, adjust for positive F
-- value.
if F < 0.0 then
S := S - 1;
F := F + 1.0;
end if;
return timespec'(tv_sec => S,
tv_nsec => long (Long_Long_Integer (F * 10#1#E9)));
end To_Timespec;
function To_Timeval (D : Duration) return struct_timeval is
S : time_t;
F : Duration;
begin
S := time_t (Long_Long_Integer (D));
F := D - Duration (S);
-- If F has negative value due to a round-up, adjust for positive F
-- value.
if F < 0.0 then
S := S - 1;
F := F + 1.0;
end if;
return struct_timeval'(tv_sec => S,
tv_usec => time_t (Long_Long_Integer (F * 10#1#E6)));
end To_Timeval;
end System.OS_Interface;

View file

@ -1,625 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . O S _ I N T E R F A C E --
-- --
-- S p e c --
-- --
-- --
-- Copyright (C) 1997-2001 Free Software Foundation, Inc. --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package includes all direct interfaces to OS services
-- that are needed by children of System.
-- PLEASE DO NOT add any with-clauses to this package
-- or remove the pragma Elaborate_Body.
-- It is designed to be a bottom-level (leaf) package.
with Interfaces.C;
package System.OS_Interface is
pragma Preelaborate;
pragma Linker_Options ("-lposix");
pragma Linker_Options ("-lpthread");
subtype int is Interfaces.C.int;
subtype short is Interfaces.C.short;
subtype long is Interfaces.C.long;
subtype unsigned is Interfaces.C.unsigned;
subtype unsigned_short is Interfaces.C.unsigned_short;
subtype unsigned_long is Interfaces.C.unsigned_long;
subtype unsigned_char is Interfaces.C.unsigned_char;
subtype plain_char is Interfaces.C.plain_char;
subtype size_t is Interfaces.C.size_t;
-----------
-- Errno --
-----------
function Errno return int;
pragma Import (C, Errno, "__get_errno");
EPERM : constant := 1; -- Operation not permitted
ENOENT : constant := 2; -- No such file or directory
ESRCH : constant := 3; -- No such process
EINTR : constant := 4; -- Interrupted system call
EIO : constant := 5; -- Input/output error
ENXIO : constant := 6; -- Device not configured
E2BIG : constant := 7; -- Argument list too long
ENOEXEC : constant := 8; -- Exec format error
EBADF : constant := 9; -- Bad file descriptor
ECHILD : constant := 10; -- No child processes
EDEADLK : constant := 11; -- Resource deadlock avoided
ENOMEM : constant := 12; -- Cannot allocate memory
EACCES : constant := 13; -- Permission denied
EFAULT : constant := 14; -- Bad address
ENOTBLK : constant := 15; -- Block device required
EBUSY : constant := 16; -- Device busy
EEXIST : constant := 17; -- File exists
EXDEV : constant := 18; -- Cross-device link
ENODEV : constant := 19;
ENOTDIR : constant := 20; -- Not a directory
EISDIR : constant := 21; -- Is a directory
EINVAL : constant := 22; -- Invalid argument
ENFILE : constant := 23;
EMFILE : constant := 24; -- Too many open files
ENOTTY : constant := 25;
ETXTBSY : constant := 26; -- Text file busy
EFBIG : constant := 27; -- File too large
ENOSPC : constant := 28; -- No space left on device
ESPIPE : constant := 29; -- Illegal seek
EROFS : constant := 30; -- Read-only file system
EMLINK : constant := 31; -- Too many links
EPIPE : constant := 32; -- Broken pipe
EDOM : constant := 33;
ERANGE : constant := 34;
EAGAIN : constant := 35;
EWOULDBLOCK : constant := EAGAIN; -- Operation would block
EINPROGRESS : constant := 36; -- Operation now in progress
EALREADY : constant := 37;
ENOTSOCK : constant := 38;
EDESTADDRREQ : constant := 39;
EMSGSIZE : constant := 40; -- Message too long
EPROTOTYPE : constant := 41;
ENOPROTOOPT : constant := 42; -- Protocol not available
EPROTONOSUPPORT : constant := 43; -- Protocol not supported
ESOCKTNOSUPPORT : constant := 44; -- Socket type not supported
EOPNOTSUPP : constant := 45; -- Operation not supported
EPFNOSUPPORT : constant := 46;
EAFNOSUPPORT : constant := 47;
EADDRINUSE : constant := 48; -- Address already in use
EADDRNOTAVAIL : constant := 49;
ENETDOWN : constant := 50; -- Network is down
ENETUNREACH : constant := 51; -- Network is unreachable
ENETRESET : constant := 52;
ECONNABORTED : constant := 53;
ECONNRESET : constant := 54; -- Connection reset by peer
ENOBUFS : constant := 55; -- No buffer space available
EISCONN : constant := 56;
ENOTCONN : constant := 57; -- Socket is not connected
ESHUTDOWN : constant := 58;
ETOOMANYREFS : constant := 59;
ETIMEDOUT : constant := 60; -- Operation timed out
ECONNREFUSED : constant := 61; -- Connection refused
ELOOP : constant := 62;
ENAMETOOLONG : constant := 63; -- File name too long
EHOSTDOWN : constant := 64; -- Host is down
EHOSTUNREACH : constant := 65; -- No route to host
ENOTEMPTY : constant := 66; -- Directory not empty
EPROCLIM : constant := 67; -- Too many processes
EUSERS : constant := 68; -- Too many users
EDQUOT : constant := 69; -- Disc quota exceeded
ESTALE : constant := 70; -- Stale NFS file handle
EREMOTE : constant := 71;
EBADRPC : constant := 72; -- RPC struct is bad
ERPCMISMATCH : constant := 73; -- RPC version wrong
EPROGUNAVAIL : constant := 74; -- RPC prog. not avail
EPROGMISMATCH : constant := 75; -- Program version wrong
EPROCUNAVAIL : constant := 76; -- Bad procedure for program
ENOLCK : constant := 77; -- No locks available
ENOSYS : constant := 78; -- Function not implemented
EFTYPE : constant := 79;
EAUTH : constant := 80; -- Authentication error
ENEEDAUTH : constant := 81; -- Need authenticator
EIDRM : constant := 82; -- Identifier removed
ENOMSG : constant := 83; -- No message of desired type
EOVERFLOW : constant := 84;
EILSEQ : constant := 85; -- Illegal byte sequence
ENOTSUP : constant := 86; -- Not supported
ECANCELED : constant := 87; -- Operation canceled
EBADMSG : constant := 88; -- Bad or Corrupt message
ENODATA : constant := 89; -- No message available
ENOSR : constant := 90; -- No STREAM resources
ENOSTR : constant := 91; -- Not a STREAM
ETIME : constant := 92; -- STREAM ioctl timeout
ELAST : constant := 92; -- Must equal largest errno
-------------
-- Signals --
-------------
Max_Interrupt : constant := 64;
type Signal is new int range 0 .. Max_Interrupt;
for Signal'Size use int'Size;
sighup : constant := 1; -- hangup
sigint : constant := 2; -- interrupt
sigquit : constant := 3; -- quit
sigill : constant := 4; -- illegal instruction (not reset when caught)
sigtrap : constant := 5; -- trace trap (not reset when caught)
SIGABRT : constant := 6; -- abort()
sigiot : constant := SIGABRT; -- compatibility
sigemt : constant := 7; -- EMT instruction
sigfpe : constant := 8; -- floating point exception
sigkill : constant := 9; -- kill (cannot be caught or ignored)
sigbus : constant := 10; -- bus error
sigsegv : constant := 11; -- segmentation violation
sigsys : constant := 12; -- bad argument to system call
sigpipe : constant := 13; -- write on a pipe with no one to read it
sigalrm : constant := 14; -- alarm clock
sigterm : constant := 15; -- software termination signal from kill
sigurg : constant := 16; -- urgent condition on IO channel
sigstop : constant := 17; -- sendable stop signal not from tty
sigtstp : constant := 18; -- stop signal from tty
sigcont : constant := 19; -- continue a stopped process
sigchld : constant := 20; -- to parent on child stop or exit
sigttin : constant := 21; -- to readers pgrp upon background tty read
sigttou : constant := 22; -- like TTIN for output if (tp->t_local&LTOSTOP)
sigio : constant := 23; -- input/output possible signal
sigxcpu : constant := 24; -- exceeded CPU time limit
sigxfsz : constant := 25; -- exceeded file size limit
sigvtalrm : constant := 26; -- virtual time alarm
sigprof : constant := 27; -- profiling time alarm
sigwinch : constant := 28; -- window size changes
siginfo : constant := 29; -- information request
sigusr1 : constant := 30; -- user defined signal 1
sigusr2 : constant := 31; -- user defined signal 2
sigpwr : constant := 32; -- power fail/restart (not reset when caught)
sigwaiting : constant := 0; -- process's lwps blocked (Solaris)
sigcancel : constant := 0; -- thread cancellation signal (libthread)
SIGADAABORT : constant := SIGABRT;
type signal_set is array (Natural range <>) of Signal;
Unmasked : constant signal_set := (sigkill, sigill, sigprof, sigtrap,
sigpwr);
-- Following signals should not be disturbed.
-- See c-posix-signals.c in FLORIST
Reserved : constant signal_set := (sigalrm, sigbus, sigill, sigsegv,
sigfpe, SIGABRT, sigkill, sigstop);
-- PTHREAD_SIGMASK(3)
SIG_BLOCK : constant := 1;
SIG_SETMASK : constant := 3;
SIG_UNBLOCK : constant := 2;
type sigset_t is private;
type sigset_t_ptr is access all sigset_t;
-- Binding to macros defined in <signal.h>
function sigaddset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigaddset, "adasigaddset");
function sigdelset (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigdelset, "adasigdelset");
function sigfillset (set : access sigset_t) return int;
pragma Import (C, sigfillset, "adasigfillset");
function sigismember (set : access sigset_t; sig : Signal) return int;
pragma Import (C, sigismember, "adasigismember");
function sigemptyset (set : access sigset_t) return int;
pragma Import (C, sigemptyset, "adasigemptyset");
type struct_sigaction is record
sa_handler : System.Address;
sa_mask : sigset_t;
sa_flags : int;
end record;
pragma Convention (C, struct_sigaction);
type struct_sigaction_ptr is access all struct_sigaction;
SIG_DFL : constant := 0;
SIG_IGN : constant := 1;
function sigaction
(sig : Signal;
act : struct_sigaction_ptr;
oact : struct_sigaction_ptr := null) return int;
pragma Import (C, sigaction, "adasigaction");
----------
-- Time --
----------
type clockid_t is new int;
CLOCK_REALTIME : constant := 0;
type timespec is private;
function To_Duration (
TS : timespec)
return Duration;
pragma Inline (To_Duration);
function To_Timespec (
D : Duration)
return timespec;
pragma Inline (To_Timespec);
type Struct_Timeval is private;
function To_Duration (
TV : Struct_Timeval)
return Duration;
pragma Inline (To_Duration);
function To_Timeval (
D : Duration)
return Struct_Timeval;
pragma Inline (To_Timeval);
function Gettimeofday (
Tv : access Struct_Timeval;
Tz : System.Address := System.Null_Address)
return int;
pragma Import (C, Gettimeofday, "gettimeofday");
function clock_gettime
(clock_id : clockid_t;
tp : access timespec) return int;
pragma Import (C, clock_gettime, "clock_gettime");
---------
-- LWP --
---------
type lwpid_t is new long;
function lwp_self return System.Address;
pragma Import (C, lwp_self, "ada_lwp_self");
-------------------------
-- Priority Scheduling --
-------------------------
SCHED_FIFO : constant := 1;
SCHED_RR : constant := 2;
SCHED_TS : constant := 3;
SCHED_OTHER : constant := 3;
SCHED_NP : constant := 4;
function sched_get_priority_min (Policy : int) return int;
pragma Import (C, sched_get_priority_min, "sched_get_priority_min");
function sched_get_priority_max (Policy : int) return int;
pragma Import (C, sched_get_priority_max, "sched_get_priority_max");
-------------
-- Process --
-------------
type pid_t is private;
function kill (pid : pid_t; sig : Signal) return int;
pragma Import (C, kill, "kill");
function getpid return pid_t;
pragma Import (C, getpid, "getpid");
-------------
-- Threads --
-------------
type Thread_Body is access
function (arg : System.Address) return System.Address;
type pthread_t is private;
subtype Thread_Id is pthread_t;
type pthread_mutex_t is limited private;
type pthread_cond_t is limited private;
type pthread_attr_t is limited private;
type pthread_mutexattr_t is limited private;
type pthread_condattr_t is limited private;
type pthread_key_t is private;
subtype cond_t is pthread_cond_t;
PTHREAD_CREATE_DETACHED : constant := 1;
---------------------------------------
-- Nonstandard Thread Initialization --
---------------------------------------
procedure pthread_init;
pragma Inline (pthread_init);
-- This is a dummy procedure to share some GNULLI files
-------------------------
-- POSIX.1c Section 3 --
-------------------------
function sigwait
(set : access sigset_t;
sig : access Signal) return int;
pragma Import (C, sigwait, "adasigwait");
function pthread_kill
(thread : pthread_t;
sig : Signal) return int;
pragma Import (C, pthread_kill, "pthread_kill");
function pthread_sigmask
(how : int;
set : sigset_t_ptr;
oset : sigset_t_ptr) return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask");
--------------------------
-- POSIX.1c Section 11 --
--------------------------
function pthread_mutexattr_init
(attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutexattr_init, "pthread_mutexattr_init");
function pthread_mutexattr_destroy
(attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutexattr_destroy, "pthread_mutexattr_destroy");
function pthread_mutex_init
(mutex : access pthread_mutex_t;
attr : access pthread_mutexattr_t) return int;
pragma Import (C, pthread_mutex_init, "pthread_mutex_init");
function pthread_mutex_destroy (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_destroy, "pthread_mutex_destroy");
function pthread_mutex_lock (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_lock, "pthread_mutex_lock");
function pthread_mutex_unlock (mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_mutex_unlock, "pthread_mutex_unlock");
function pthread_condattr_init
(attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_condattr_init, "pthread_condattr_init");
function pthread_condattr_destroy
(attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_condattr_destroy, "pthread_condattr_destroy");
function pthread_cond_init
(cond : access pthread_cond_t;
attr : access pthread_condattr_t) return int;
pragma Import (C, pthread_cond_init, "pthread_cond_init");
function pthread_cond_destroy (cond : access pthread_cond_t) return int;
pragma Import (C, pthread_cond_destroy, "pthread_cond_destroy");
function pthread_cond_signal (cond : access pthread_cond_t) return int;
pragma Import (C, pthread_cond_signal, "pthread_cond_signal");
function pthread_cond_wait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t) return int;
pragma Import (C, pthread_cond_wait, "pthread_cond_wait");
function pthread_cond_timedwait
(cond : access pthread_cond_t;
mutex : access pthread_mutex_t;
abstime : access timespec) return int;
pragma Import (C, pthread_cond_timedwait, "pthread_cond_timedwait");
--------------------------
-- POSIX.1c Section 13 --
--------------------------
PTHREAD_PRIO_NONE : constant := 0;
PTHREAD_PRIO_PROTECT : constant := 2;
PTHREAD_PRIO_INHERIT : constant := 1;
function pthread_mutexattr_setprotocol
(attr : access pthread_mutexattr_t;
protocol : int) return int;
pragma Import
(C, pthread_mutexattr_setprotocol, "ada_pthread_mutexattr_setprotocol");
function pthread_mutexattr_setprioceiling
(attr : access pthread_mutexattr_t;
prioceiling : int) return int;
pragma Import
(C, pthread_mutexattr_setprioceiling, "pthread_mutexattr_setprioceiling");
type struct_sched_param is record
sched_priority : int;
end record;
for struct_sched_param use record
sched_priority at 0 range 0 .. 31;
end record;
pragma Convention (C, struct_sched_param);
function pthread_setschedparam
(thread : pthread_t;
policy : int;
param : access struct_sched_param)
return int;
pragma Import (C, pthread_setschedparam, "pthread_setschedparam");
function pthread_attr_setscope
(attr : access pthread_attr_t;
contentionscope : int) return int;
pragma Import (C, pthread_attr_setscope, "pthread_attr_setscope");
function pthread_attr_setinheritsched
(attr : access pthread_attr_t;
inheritsched : int) return int;
pragma Import
(C, pthread_attr_setinheritsched, "pthread_attr_setinheritsched");
function pthread_attr_setschedpolicy
(attr : access pthread_attr_t;
policy : int) return int;
pragma Import (C, pthread_attr_setschedpolicy);
function pthread_attr_setschedparam
(attr : access pthread_attr_t;
sched_param : access struct_sched_param)
return int;
pragma Import (C, pthread_attr_setschedparam, "pthread_attr_setschedparam");
function sched_yield return int;
pragma Import (C, sched_yield, "sched_yield");
---------------------------
-- P1003.1c - Section 16 --
---------------------------
function pthread_attr_init (attributes : access pthread_attr_t) return int;
pragma Import (C, pthread_attr_init, "pthread_attr_init");
function pthread_attr_destroy
(attributes : access pthread_attr_t) return int;
pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy");
function pthread_attr_setdetachstate
(attr : access pthread_attr_t;
detachstate : int) return int;
pragma Import (C, pthread_attr_setdetachstate);
function pthread_attr_setstacksize
(attr : access pthread_attr_t;
stacksize : size_t) return int;
pragma Import (C, pthread_attr_setstacksize, "pthread_attr_setstacksize");
function pthread_create
(thread : access pthread_t;
attributes : access pthread_attr_t;
start_routine : Thread_Body;
arg : System.Address) return int;
pragma Import (C, pthread_create, "pthread_create");
procedure pthread_exit (status : System.Address);
pragma Import (C, pthread_exit, "pthread_exit");
function pthread_self return pthread_t;
pragma Import (C, pthread_self, "pthread_self");
--------------------------
-- POSIX.1c Section 17 --
--------------------------
function pthread_setspecific
(key : pthread_key_t;
value : System.Address) return int;
pragma Import (C, pthread_setspecific, "pthread_setspecific");
function pthread_getspecific (key : pthread_key_t) return System.Address;
pragma Import (C, pthread_getspecific, "pthread_getspecific");
type destructor_pointer is access procedure (arg : System.Address);
function pthread_key_create
(key : access pthread_key_t;
destructor : destructor_pointer) return int;
pragma Import (C, pthread_key_create, "pthread_key_create");
---------------------------------------------------------------
-- Non portable SGI 6.5 additions to the pthread interface --
-- must be executed from within the context of a system --
-- scope task --
---------------------------------------------------------------
function pthread_setrunon_np (cpu : int) return int;
pragma Import (C, pthread_setrunon_np, "pthread_setrunon_np");
private
type array_type_1 is array (Integer range 0 .. 3) of unsigned;
type sigset_t is record
X_X_sigbits : array_type_1;
end record;
pragma Convention (C, sigset_t);
type pid_t is new long;
type time_t is new long;
type timespec is record
tv_sec : time_t;
tv_nsec : long;
end record;
for timespec use record
tv_sec at 0 range 0 .. 31;
tv_nsec at 4 range 0 .. 31;
end record;
pragma Convention (C, timespec);
type struct_timeval is record
tv_sec : time_t;
tv_usec : time_t;
end record;
pragma Convention (C, struct_timeval);
type array_type_9 is array (Integer range 0 .. 4) of long;
type pthread_attr_t is record
X_X_D : array_type_9;
end record;
pragma Convention (C, pthread_attr_t);
type array_type_8 is array (Integer range 0 .. 1) of long;
type pthread_condattr_t is record
X_X_D : array_type_8;
end record;
pragma Convention (C, pthread_condattr_t);
type array_type_7 is array (Integer range 0 .. 1) of long;
type pthread_mutexattr_t is record
X_X_D : array_type_7;
end record;
pragma Convention (C, pthread_mutexattr_t);
type pthread_t is new unsigned;
type array_type_10 is array (Integer range 0 .. 7) of long;
type pthread_mutex_t is record
X_X_D : array_type_10;
end record;
pragma Convention (C, pthread_mutex_t);
type array_type_11 is array (Integer range 0 .. 7) of long;
type pthread_cond_t is record
X_X_D : array_type_11;
end record;
pragma Convention (C, pthread_cond_t);
type pthread_key_t is new int;
end System.OS_Interface;

View file

@ -1,79 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . P A R A M E T E R S --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 1998-2001 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. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This is the Solaris (native) specific version
package body System.Parameters is
------------------------
-- Default_Stack_Size --
------------------------
function Default_Stack_Size return Size_Type is
begin
return 8318976;
end Default_Stack_Size;
------------------------
-- Minimum_Stack_Size --
------------------------
function Minimum_Stack_Size return Size_Type is
thr_min_stack : constant Size_Type := 1160;
-- This value does not really matter anyway, since this is checked
-- and adjusted at the library level when creating a thread.
begin
return thr_min_stack;
end Minimum_Stack_Size;
-------------------------
-- Adjust_Storage_Size --
-------------------------
function Adjust_Storage_Size (Size : Size_Type) return Size_Type is
begin
if Size = Unspecified_Size then
return Default_Stack_Size;
elsif Size < Minimum_Stack_Size then
return Minimum_Stack_Size;
else
return Size;
end if;
end Adjust_Storage_Size;
end System.Parameters;

View file

@ -1,150 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M --
-- --
-- S p e c --
-- (GNU-Linux/x86 Version) --
-- --
-- Copyright (C) 1992-2003 Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- 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. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package System is
pragma Pure (System);
-- Note that we take advantage of the implementation permission to
-- make this unit Pure instead of Preelaborable, see RM 13.7(36)
type Name is (SYSTEM_NAME_GNAT);
System_Name : constant Name := SYSTEM_NAME_GNAT;
-- System-Dependent Named Numbers
Min_Int : constant := Long_Long_Integer'First;
Max_Int : constant := Long_Long_Integer'Last;
Max_Binary_Modulus : constant := 2 ** Long_Long_Integer'Size;
Max_Nonbinary_Modulus : constant := Integer'Last;
Max_Base_Digits : constant := Long_Long_Float'Digits;
Max_Digits : constant := Long_Long_Float'Digits;
Max_Mantissa : constant := 63;
Fine_Delta : constant := 2.0 ** (-Max_Mantissa);
Tick : constant := 0.000_001;
-- Storage-related Declarations
type Address is private;
Null_Address : constant Address;
Storage_Unit : constant := 8;
Word_Size : constant := 32;
Memory_Size : constant := 2 ** 32;
-- Address comparison
function "<" (Left, Right : Address) return Boolean;
function "<=" (Left, Right : Address) return Boolean;
function ">" (Left, Right : Address) return Boolean;
function ">=" (Left, Right : Address) return Boolean;
function "=" (Left, Right : Address) return Boolean;
pragma Import (Intrinsic, "<");
pragma Import (Intrinsic, "<=");
pragma Import (Intrinsic, ">");
pragma Import (Intrinsic, ">=");
pragma Import (Intrinsic, "=");
-- Other System-Dependent Declarations
type Bit_Order is (High_Order_First, Low_Order_First);
Default_Bit_Order : constant Bit_Order := Low_Order_First;
-- Priority-related Declarations (RM D.1)
Max_Priority : constant Positive := 30;
Max_Interrupt_Priority : constant Positive := 31;
subtype Any_Priority is Integer range 0 .. 31;
subtype Priority is Any_Priority range 0 .. 30;
subtype Interrupt_Priority is Any_Priority range 31 .. 31;
Default_Priority : constant Priority := 15;
private
type Address is mod Memory_Size;
Null_Address : constant Address := 0;
--------------------------------------
-- System Implementation Parameters --
--------------------------------------
-- These parameters provide information about the target that is used
-- by the compiler. They are in the private part of System, where they
-- can be accessed using the special circuitry in the Targparm unit
-- whose source should be consulted for more detailed descriptions
-- of the individual switch values.
AAMP : constant Boolean := False;
Backend_Divide_Checks : constant Boolean := False;
Backend_Overflow_Checks : constant Boolean := False;
Command_Line_Args : constant Boolean := True;
Configurable_Run_Time : constant Boolean := False;
Denorm : constant Boolean := True;
Duration_32_Bits : constant Boolean := False;
Exit_Status_Supported : constant Boolean := True;
Fractional_Fixed_Ops : constant Boolean := False;
Frontend_Layout : constant Boolean := False;
Functions_Return_By_DSP : constant Boolean := False;
Machine_Overflows : constant Boolean := False;
Machine_Rounds : constant Boolean := True;
OpenVMS : constant Boolean := False;
Signed_Zeros : constant Boolean := True;
Stack_Check_Default : constant Boolean := False;
Stack_Check_Probes : constant Boolean := False;
Support_64_Bit_Divides : constant Boolean := True;
Support_Aggregates : constant Boolean := True;
Support_Composite_Assign : constant Boolean := True;
Support_Composite_Compare : constant Boolean := True;
Support_Long_Shifts : constant Boolean := True;
Suppress_Standard_Library : constant Boolean := False;
Use_Ada_Main_Program_Name : constant Boolean := False;
ZCX_By_Default : constant Boolean := False;
GCC_ZCX_Support : constant Boolean := False;
Front_End_ZCX_Support : constant Boolean := False;
-- Obsolete entries, to be removed eventually (bootstrap issues!)
High_Integrity_Mode : constant Boolean := False;
Long_Shifts_Inlined : constant Boolean := True;
end System;

File diff suppressed because it is too large Load diff

View file

@ -1,143 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S Y S T E M . T A S K _ I N F O --
-- --
-- S p e c --
-- --
-- --
-- Copyright (C) 1992-2000 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. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This package contains the definitions and routines associated with the
-- implementation of the Task_Info pragma.
-- This is the NetBSD (native) version of this module.
with System.OS_Interface;
with Unchecked_Deallocation;
package System.Task_Info is
pragma Elaborate_Body;
-- To ensure that a body is allowed
-----------------------------------------------------
-- Binding of Tasks to LWPs and LWPs to processors --
-----------------------------------------------------
-- The NetBSD implementation of the GNU Low-Level Interface (GNULLI)
-- implements each Ada task as a NetBSD thread. The NetBSD thread
-- library distributes threads across one or more LWPs (Light Weight
-- Process) that are members of the same process. NetBSD distributes
-- processes and LWPs across the available CPUs on a given machine. The
-- pragma Task_Info provides the mechanism to control the distribution
-- of tasks to LWPs, and LWPs to processors.
-- Each thread has a number of attributes that dictate it's scheduling.
-- These attributes are:
--
-- New_LWP: whether a new LWP is created for this thread.
--
-- Bound_To_LWP: whether the thread is bound to a specific LWP
-- for its entire lifetime.
--
-- CPU: the CPU number associated to the LWP
--
-- The Task_Info pragma:
-- pragma Task_Info (EXPRESSION);
-- allows the specification on a task by task basis of a value of type
-- System.Task_Info.Task_Info_Type to be passed to a task when it is
-- created. The specification of this type, and the effect on the task
-- that is created is target dependent.
-- The Task_Info pragma appears within a task definition (compare the
-- definition and implementation of pragma Priority). If no such pragma
-- appears, then the value Task_Info_Unspecified is passed. If a pragma
-- is present, then it supplies an alternative value. If the argument of
-- the pragma is a discriminant reference, then the value can be set on
-- a task by task basis by supplying the appropriate discriminant value.
-- Note that this means that the type used for Task_Info_Type must be
-- suitable for use as a discriminant (i.e. a scalar or access type).
-----------------------
-- Thread Attributes --
-----------------------
subtype CPU_Number is System.OS_Interface.processorid_t;
CPU_UNCHANGED : constant CPU_Number := System.OS_Interface.PBIND_QUERY;
-- Do not bind the LWP to a specific processor
ANY_CPU : constant CPU_Number := System.OS_Interface.PBIND_NONE;
-- Bind the LWP to any processor
Invalid_CPU_Number : exception;
type Thread_Attributes (New_LWP : Boolean) is record
Bound_To_LWP : Boolean := True;
case New_LWP is
when False =>
null;
when True =>
CPU : CPU_Number := CPU_UNCHANGED;
end case;
end record;
Default_Thread_Attributes : constant Thread_Attributes := (False, True);
function Unbound_Thread_Attributes
return Thread_Attributes;
function Bound_Thread_Attributes
return Thread_Attributes;
function Bound_Thread_Attributes (CPU : CPU_Number)
return Thread_Attributes;
type Task_Info_Type is access all Thread_Attributes;
function New_Unbound_Thread_Attributes
return Task_Info_Type;
function New_Bound_Thread_Attributes
return Task_Info_Type;
function New_Bound_Thread_Attributes (CPU : CPU_Number)
return Task_Info_Type;
type Task_Image_Type is access String;
-- Used to generate a meaningful identifier for tasks that are variables
-- and components of variables.
procedure Free_Task_Image is new
Unchecked_Deallocation (String, Task_Image_Type);
Unspecified_Task_Info : constant Task_Info_Type := null;
end System.Task_Info;

View file

@ -1,52 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASK_PRIMITIVES.OPERATIONS.SELF --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 1991-1998, Florida State University --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This is a NetBSD/X86 (native) version of this package.
separate (System.Task_Primitives.Operations)
----------
-- Self --
----------
function Self return Task_ID is
Temp : aliased System.Address;
Result : Interfaces.C.int;
begin
Result := pthread_getspecific (ATCB_Key, Temp'Unchecked_Access);
pragma Assert (Result = 0);
return To_Task_ID (Temp);
end Self;

View file

@ -1,100 +0,0 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- SYSTEM.TASK_PRIMITIVES.OPERATIONS.SPECIFIC --
-- --
-- B o d y --
-- --
-- --
-- Copyright (C) 1991-2001, Florida State University --
-- --
-- GNARL 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. GNARL 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 GNARL; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNARL was developed by the GNARL team at Florida State University. It is --
-- now maintained by Ada Core Technologies Inc. in cooperation with Florida --
-- State University (http://www.gnat.com). --
-- --
------------------------------------------------------------------------------
-- This is a NetBSD version of this package.
separate (System.Task_Primitives.Operations)
package body Specific is
------------------
-- Local Data --
------------------
-- The followings are logically constants, but need to be initialized
-- at run time.
ATCB_Key : aliased pthread_key_t;
-- Key used to find the Ada Task_ID associated with a thread
----------------
-- Initialize --
----------------
procedure Initialize (Environment_Task : Task_ID) is
Result : Interfaces.C.int;
begin
Result := pthread_key_create (ATCB_Key'Access, null);
pragma Assert (Result = 0);
Result := pthread_setspecific (ATCB_Key, To_Address (Environment_Task));
pragma Assert (Result = 0);
end Initialize;
---------
-- Set --
---------
procedure Set (Self_Id : Task_ID) is
Result : Interfaces.C.int;
begin
Result := pthread_setspecific (ATCB_Key, To_Address (Self_Id));
pragma Assert (Result = 0);
end Set;
----------
-- Self --
----------
function Self return Task_ID is
Result : System.Address;
begin
Result := pthread_getspecific (ATCB_Key);
pragma Assert (Result /= System.Null_Address);
return To_Task_Id (Result);
end Self;
-------------------
-- Is_Valid_Task --
-------------------
function Is_Valid_Task return Boolean is
begin
return pthread_getspecific (ATCB_Key) /= System.Null_Address;
end Is_Valid_Task;
end Specific;

View file

@ -1,6 +0,0 @@
/* Binding to _lwp_self for the Ada RTS */
#include <lwp.h>
lwpid_t ada_lwp_self(void) {
return _lwp_self();
}

View file

@ -1,34 +0,0 @@
#include <signal.h>
/* <signal.h> defines macros for a number of
signal handling functions. Bindings are
provided here, that expand the macros,
for use by the Ada RTS. */
int adasigaddset(sigset_t *set, int signo) {
return sigaddset(set, signo);
}
int adasigdelset(sigset_t *set, int signo) {
return sigdelset(set, signo);
}
int adasigemptyset(sigset_t *set) {
return sigemptyset(set);
}
int adasigfillset(sigset_t *set) {
return sigfillset(set);
}
int adasigismember(sigset_t *set, int signo) {
return sigismember(set, signo);
}
int adasigaction(int sig, const struct sigaction *act, struct sigaction *oact) {
return sigaction(sig, act, oact);
}
int adasigwait(const sigset_t *set, int *sig) {
return sigwait(set, sig);
}

View file

@ -1,26 +0,0 @@
#include <pthread.h>
#include <errno.h>
/* These are some dummy replacements for functions missing in the pthread library */
int pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol) {
return 0;
}
int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t *attr, int *prioceiling) {
return 0;
}
int
pthread_setschedparam(pthread_t thread, int policy,
const struct sched_param *param)
{
if (param == NULL || policy < SCHED_FIFO || policy > SCHED_RR)
return EINVAL;
if (param->sched_priority > 0 || policy != SCHED_RR)
return ENOTSUP;
return 0;
}

View file

@ -1,7 +0,0 @@
# $NetBSD: gcc3.mk,v 1.1.1.1 2003/12/12 10:52:53 johnrshannon Exp $
#
# make configuration file for @PKGNAME@
CC= @GCC_PREFIX@/bin/cc
CPP= @GCC_PREFIX@/bin/cpp
ADAC= @GCC_PREFIX@/bin/gcc

View file

@ -1,29 +0,0 @@
$NetBSD: patch-ad,v 1.2 2003/12/15 18:42:08 johnrshannon Exp $
--- gcc/ada/Make-lang.in.orig 2003-12-01 06:29:28.000000000 -0700
+++ gcc/ada/Make-lang.in
@@ -275,7 +275,7 @@ gnatbind$(exeext): ada/b_gnatb.o $(CONFI
$(LIBS) $(SYSLIBS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
-gnattools: $(GCC_PARTS) $(CONFIG_H) prefix.o force
+gnattools: $(CONFIG_H) prefix.o force
$(MAKE) -C ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I- -I../rts"\
CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1
@@ -945,11 +945,14 @@ ada.stagefeedback: stagefeedback-start
check-ada: check-gnat
ACATSDIR = $(TESTSUITEDIR)/ada/acats
+ACATSOBJDIR = $(TESTSUITEDIR)/ada/acatsobj
check-gnat:
test -d $(ACATSDIR) || mkdir -p $(ACATSDIR)
+ test -d $(ACATSOBJDIR) || mkdir -p $(ACATSOBJDIR)
+ objdir=`cd ${srcdir}/${ACATSOBJDIR}; ${PWD_COMMAND}`; \
testdir=`cd ${srcdir}/${ACATSDIR}; ${PWD_COMMAND}`; \
- export testdir; cd $(ACATSDIR); $${testdir}/run_acats $(CHAPTERS)
+ export objdir; export testdir; cd $(objdir); $${testdir}/run_acats $(CHAPTERS)
.PHONY: check-gnat

View file

@ -1,38 +0,0 @@
$NetBSD: patch-ae,v 1.2 2003/12/15 18:42:08 johnrshannon Exp $
--- gcc/ada/Makefile.in.orig 2003-12-03 04:47:53.000000000 -0700
+++ gcc/ada/Makefile.in
@@ -1372,6 +1372,32 @@ ifeq ($(strip $(filter-out %x86_64 linux
LIBRARY_VERSION := $(LIB_VERSION)
endif
+ifeq ($(strip $(filter-out %86 netbsdelf%,$(arch) $(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-numaux.adb<86numaux.adb \
+ a-numaux.ads<86numaux.ads \
+ a-intnam.ads<4netbsdintnam.ads \
+ s-inmaop.adb<7sinmaop.adb \
+ s-intman.adb<5netbsdintman.adb \
+ s-mastop.adb<5omastop.adb \
+ s-osinte.adb<5netbsdosinte.adb \
+ s-osinte.ads<5netbsdosinte.ads \
+ s-osprim.adb<5posprim.adb \
+ s-parame.adb<5netbsdparame.adb \
+ s-taprop.adb<5netbsdtaprop.adb \
+ s-tasinf.ads<5ftasinf.ads \
+ s-taspri.ads<7staspri.ads \
+ s-tpopse.adb<5netbsdtpopse.adb \
+ s-tpopsp.adb<7netbsdtpopsp.adb \
+ system.ads<5netbsdsystem.ads
+
+ THREADSLIB=-pthread
+ EXTRA_LIBGNAT_SRCS=adasignal.c ada_lwp_self.c dummy_pthreads.c
+ EXTRA_LIBGNAT_OBJS=adasignal.o ada_lwp_self.o dummy_pthreads.o
+
+endif
+
+
# The runtime library for gnat comprises two directories. One contains the
# Ada source files that the compiler (gnat1) needs -- these files are listed
# by ADA_INCLUDE_SRCS -- and the other contains the object files and their

View file

@ -1,13 +0,0 @@
$NetBSD: patch-af,v 1.1.1.1 2003/12/12 10:52:53 johnrshannon Exp $
--- gcc/ada/cstreams.c.orig 2003-11-18 03:00:42.000000000 -0700
+++ gcc/ada/cstreams.c
@@ -175,7 +175,7 @@ __gnat_full_name (char *nam, char *buffe
#elif defined (MSDOS)
_fixpath (nam, buffer);
-#elif defined (sgi) || defined (__FreeBSD__)
+#elif defined (sgi) || defined (__FreeBSD__) || defined(__NetBSD__)
/* Use realpath function which resolves links and references to . and ..
on those Unix systems that support it. Note that GNU/Linux provides it but

View file

@ -1,22 +0,0 @@
$NetBSD: patch-ag,v 1.1.1.1 2003/12/12 10:52:53 johnrshannon Exp $
--- gcc/ada/adaint.c.orig 2003-12-03 04:47:52.000000000 -0700
+++ gcc/ada/adaint.c
@@ -671,6 +671,8 @@ __gnat_open_new_temp (char *path, int fm
return mkstemp (path);
#elif defined (__Lynx__)
mktemp (path);
+#elif defined(__NetBSD__)
+ return mkstemp (path);
#else
if (mktemp (path) == NULL)
return -1;
@@ -742,7 +744,7 @@ __gnat_tmp_name (char *tmp_filename)
free (pname);
}
-#elif defined (linux) || defined (__FreeBSD__)
+#elif defined (linux) || defined (__FreeBSD__) || defined(__NetBSD__)
#define MAX_SAFE_PATH 1000
char *tmpdir = getenv ("TMPDIR");

View file

@ -1,10 +0,0 @@
This pkg builds the C++ compiler from the
GNU Compiler Collection (GCC) version 3.4. It is
one of a set of gcc3-*-devel pkgs.
Version 3.4 of gcc is the developmental release. This
package builds the compiler from the ${SNAPDATE}
snaphot.
This set of packages is based on the lang/gcc3-* set
of packages.

View file

@ -1,7 +0,0 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2003/12/11 22:34:28 johnrshannon Exp $
To use ${PKGNAME} include "${GCC_PREFIX}/mk/c++.mk" in your
BSD style makefile.
===========================================================================

View file

@ -1,37 +0,0 @@
# $NetBSD: Makefile,v 1.6 2003/12/24 18:55:31 johnrshannon Exp $
#
PKGNAME= gcc3${GCC3_PKGMODIF}-c++-${GCC_VERSION}-devel
COMMENT= GNU Compiler Collection, version 3-${SNAPDATE}, c++ compiler
.include "../gcc3-c-devel/buildaddon.mk"
CONFIGURE_ARGS+= --enable-languages="c++"
CONFIGURE_ARGS+= --disable-nls
CONFIGURE_ARGS+= --enable-threads=posix
post-configure:
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} configure-host)
do-build:
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} c++)
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} g++)
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} maybe-all-target-libstdc++-v3)
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
do-test:
(cd ${WRKSRC}/gcc && && ${SETENV} ${MAKE_ENV} ${GMAKE} check-c++)
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gcc/cc1plus ${GCC_ARCHDIR}
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} \
c++.install-common c++.install-man)
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} \
install-target-libstdc++-v3)
post-install:
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${GCC_PREFIX}/mk/c++.mk
.include "../../mk/bsd.pkg.mk"

View file

@ -1,242 +0,0 @@
@comment $NetBSD: PLIST,v 1.3 2004/02/12 19:41:35 johnrshannon Exp $
gcc-3.4/bin/c++
gcc-3.4/bin/g++
gcc-3.4/bin/${MACHINE_GNU_PLATFORM}2.0-c++
gcc-3.4/bin/${MACHINE_GNU_PLATFORM}2.0-g++
gcc-3.4/include/c++/3.4.0/algorithm
gcc-3.4/include/c++/3.4.0/backward/algo.h
gcc-3.4/include/c++/3.4.0/backward/algobase.h
gcc-3.4/include/c++/3.4.0/backward/alloc.h
gcc-3.4/include/c++/3.4.0/backward/backward_warning.h
gcc-3.4/include/c++/3.4.0/backward/bvector.h
gcc-3.4/include/c++/3.4.0/backward/complex.h
gcc-3.4/include/c++/3.4.0/backward/defalloc.h
gcc-3.4/include/c++/3.4.0/backward/deque.h
gcc-3.4/include/c++/3.4.0/backward/fstream.h
gcc-3.4/include/c++/3.4.0/backward/function.h
gcc-3.4/include/c++/3.4.0/backward/hash_map.h
gcc-3.4/include/c++/3.4.0/backward/hash_set.h
gcc-3.4/include/c++/3.4.0/backward/hashtable.h
gcc-3.4/include/c++/3.4.0/backward/heap.h
gcc-3.4/include/c++/3.4.0/backward/iomanip.h
gcc-3.4/include/c++/3.4.0/backward/iostream.h
gcc-3.4/include/c++/3.4.0/backward/istream.h
gcc-3.4/include/c++/3.4.0/backward/iterator.h
gcc-3.4/include/c++/3.4.0/backward/list.h
gcc-3.4/include/c++/3.4.0/backward/map.h
gcc-3.4/include/c++/3.4.0/backward/multimap.h
gcc-3.4/include/c++/3.4.0/backward/multiset.h
gcc-3.4/include/c++/3.4.0/backward/new.h
gcc-3.4/include/c++/3.4.0/backward/ostream.h
gcc-3.4/include/c++/3.4.0/backward/pair.h
gcc-3.4/include/c++/3.4.0/backward/queue.h
gcc-3.4/include/c++/3.4.0/backward/rope.h
gcc-3.4/include/c++/3.4.0/backward/set.h
gcc-3.4/include/c++/3.4.0/backward/slist.h
gcc-3.4/include/c++/3.4.0/backward/stack.h
gcc-3.4/include/c++/3.4.0/backward/stream.h
gcc-3.4/include/c++/3.4.0/backward/streambuf.h
gcc-3.4/include/c++/3.4.0/backward/strstream
gcc-3.4/include/c++/3.4.0/backward/tempbuf.h
gcc-3.4/include/c++/3.4.0/backward/tree.h
gcc-3.4/include/c++/3.4.0/backward/vector.h
gcc-3.4/include/c++/3.4.0/bits/allocator.h
gcc-3.4/include/c++/3.4.0/bits/allocator_traits.h
gcc-3.4/include/c++/3.4.0/bits/basic_ios.h
gcc-3.4/include/c++/3.4.0/bits/basic_ios.tcc
gcc-3.4/include/c++/3.4.0/bits/basic_string.h
gcc-3.4/include/c++/3.4.0/bits/basic_string.tcc
gcc-3.4/include/c++/3.4.0/bits/boost_concept_check.h
gcc-3.4/include/c++/3.4.0/bits/char_traits.h
gcc-3.4/include/c++/3.4.0/bits/cmath.tcc
gcc-3.4/include/c++/3.4.0/bits/codecvt.h
gcc-3.4/include/c++/3.4.0/bits/concept_check.h
gcc-3.4/include/c++/3.4.0/bits/concurrence.h
gcc-3.4/include/c++/3.4.0/bits/cpp_type_traits.h
gcc-3.4/include/c++/3.4.0/bits/demangle.h
gcc-3.4/include/c++/3.4.0/bits/deque.tcc
gcc-3.4/include/c++/3.4.0/bits/fstream.tcc
gcc-3.4/include/c++/3.4.0/bits/functexcept.h
gcc-3.4/include/c++/3.4.0/bits/gslice.h
gcc-3.4/include/c++/3.4.0/bits/gslice_array.h
gcc-3.4/include/c++/3.4.0/bits/indirect_array.h
gcc-3.4/include/c++/3.4.0/bits/ios_base.h
gcc-3.4/include/c++/3.4.0/bits/istream.tcc
gcc-3.4/include/c++/3.4.0/bits/list.tcc
gcc-3.4/include/c++/3.4.0/bits/locale_classes.h
gcc-3.4/include/c++/3.4.0/bits/locale_facets.h
gcc-3.4/include/c++/3.4.0/bits/locale_facets.tcc
gcc-3.4/include/c++/3.4.0/bits/localefwd.h
gcc-3.4/include/c++/3.4.0/bits/mask_array.h
gcc-3.4/include/c++/3.4.0/bits/ostream.tcc
gcc-3.4/include/c++/3.4.0/bits/postypes.h
gcc-3.4/include/c++/3.4.0/bits/slice_array.h
gcc-3.4/include/c++/3.4.0/bits/sstream.tcc
gcc-3.4/include/c++/3.4.0/bits/stl_algo.h
gcc-3.4/include/c++/3.4.0/bits/stl_algobase.h
gcc-3.4/include/c++/3.4.0/bits/stl_bvector.h
gcc-3.4/include/c++/3.4.0/bits/stl_construct.h
gcc-3.4/include/c++/3.4.0/bits/stl_deque.h
gcc-3.4/include/c++/3.4.0/bits/stl_function.h
gcc-3.4/include/c++/3.4.0/bits/stl_heap.h
gcc-3.4/include/c++/3.4.0/bits/stl_iterator.h
gcc-3.4/include/c++/3.4.0/bits/stl_iterator_base_funcs.h
gcc-3.4/include/c++/3.4.0/bits/stl_iterator_base_types.h
gcc-3.4/include/c++/3.4.0/bits/stl_list.h
gcc-3.4/include/c++/3.4.0/bits/stl_map.h
gcc-3.4/include/c++/3.4.0/bits/stl_multimap.h
gcc-3.4/include/c++/3.4.0/bits/stl_multiset.h
gcc-3.4/include/c++/3.4.0/bits/stl_numeric.h
gcc-3.4/include/c++/3.4.0/bits/stl_pair.h
gcc-3.4/include/c++/3.4.0/bits/stl_queue.h
gcc-3.4/include/c++/3.4.0/bits/stl_raw_storage_iter.h
gcc-3.4/include/c++/3.4.0/bits/stl_relops.h
gcc-3.4/include/c++/3.4.0/bits/stl_set.h
gcc-3.4/include/c++/3.4.0/bits/stl_stack.h
gcc-3.4/include/c++/3.4.0/bits/stl_tempbuf.h
gcc-3.4/include/c++/3.4.0/bits/stl_threads.h
gcc-3.4/include/c++/3.4.0/bits/stl_tree.h
gcc-3.4/include/c++/3.4.0/bits/stl_uninitialized.h
gcc-3.4/include/c++/3.4.0/bits/stl_vector.h
gcc-3.4/include/c++/3.4.0/bits/stream_iterator.h
gcc-3.4/include/c++/3.4.0/bits/streambuf.tcc
gcc-3.4/include/c++/3.4.0/bits/streambuf_iterator.h
gcc-3.4/include/c++/3.4.0/bits/stringfwd.h
gcc-3.4/include/c++/3.4.0/bits/type_traits.h
gcc-3.4/include/c++/3.4.0/bits/valarray_after.h
gcc-3.4/include/c++/3.4.0/bits/valarray_array.h
gcc-3.4/include/c++/3.4.0/bits/valarray_array.tcc
gcc-3.4/include/c++/3.4.0/bits/valarray_before.h
gcc-3.4/include/c++/3.4.0/bits/vector.tcc
gcc-3.4/include/c++/3.4.0/bitset
gcc-3.4/include/c++/3.4.0/cassert
gcc-3.4/include/c++/3.4.0/cctype
gcc-3.4/include/c++/3.4.0/cerrno
gcc-3.4/include/c++/3.4.0/cfloat
gcc-3.4/include/c++/3.4.0/ciso646
gcc-3.4/include/c++/3.4.0/climits
gcc-3.4/include/c++/3.4.0/clocale
gcc-3.4/include/c++/3.4.0/cmath
gcc-3.4/include/c++/3.4.0/complex
gcc-3.4/include/c++/3.4.0/csetjmp
gcc-3.4/include/c++/3.4.0/csignal
gcc-3.4/include/c++/3.4.0/cstdarg
gcc-3.4/include/c++/3.4.0/cstddef
gcc-3.4/include/c++/3.4.0/cstdio
gcc-3.4/include/c++/3.4.0/cstdlib
gcc-3.4/include/c++/3.4.0/cstring
gcc-3.4/include/c++/3.4.0/ctime
gcc-3.4/include/c++/3.4.0/cwchar
gcc-3.4/include/c++/3.4.0/cwctype
gcc-3.4/include/c++/3.4.0/cxxabi.h
gcc-3.4/include/c++/3.4.0/debug/bitset
gcc-3.4/include/c++/3.4.0/debug/debug.h
gcc-3.4/include/c++/3.4.0/debug/deque
gcc-3.4/include/c++/3.4.0/debug/formatter.h
gcc-3.4/include/c++/3.4.0/debug/hash_map
gcc-3.4/include/c++/3.4.0/debug/hash_map.h
gcc-3.4/include/c++/3.4.0/debug/hash_multimap.h
gcc-3.4/include/c++/3.4.0/debug/hash_multiset.h
gcc-3.4/include/c++/3.4.0/debug/hash_set
gcc-3.4/include/c++/3.4.0/debug/hash_set.h
gcc-3.4/include/c++/3.4.0/debug/list
gcc-3.4/include/c++/3.4.0/debug/map
gcc-3.4/include/c++/3.4.0/debug/map.h
gcc-3.4/include/c++/3.4.0/debug/multimap.h
gcc-3.4/include/c++/3.4.0/debug/multiset.h
gcc-3.4/include/c++/3.4.0/debug/safe_base.h
gcc-3.4/include/c++/3.4.0/debug/safe_iterator.h
gcc-3.4/include/c++/3.4.0/debug/safe_iterator.tcc
gcc-3.4/include/c++/3.4.0/debug/safe_sequence.h
gcc-3.4/include/c++/3.4.0/debug/set
gcc-3.4/include/c++/3.4.0/debug/set.h
gcc-3.4/include/c++/3.4.0/debug/string
gcc-3.4/include/c++/3.4.0/debug/vector
gcc-3.4/include/c++/3.4.0/deque
gcc-3.4/include/c++/3.4.0/exception
gcc-3.4/include/c++/3.4.0/exception_defines.h
gcc-3.4/include/c++/3.4.0/ext/algorithm
gcc-3.4/include/c++/3.4.0/ext/debug_allocator.h
gcc-3.4/include/c++/3.4.0/ext/enc_filebuf.h
gcc-3.4/include/c++/3.4.0/ext/functional
gcc-3.4/include/c++/3.4.0/ext/hash_fun.h
gcc-3.4/include/c++/3.4.0/ext/hash_map
gcc-3.4/include/c++/3.4.0/ext/hash_set
gcc-3.4/include/c++/3.4.0/ext/hashtable.h
gcc-3.4/include/c++/3.4.0/ext/iterator
gcc-3.4/include/c++/3.4.0/ext/malloc_allocator.h
gcc-3.4/include/c++/3.4.0/ext/memory
gcc-3.4/include/c++/3.4.0/ext/mt_allocator.h
gcc-3.4/include/c++/3.4.0/ext/new_allocator.h
gcc-3.4/include/c++/3.4.0/ext/numeric
gcc-3.4/include/c++/3.4.0/ext/pod_char_traits.h
gcc-3.4/include/c++/3.4.0/ext/pool_allocator.h
gcc-3.4/include/c++/3.4.0/ext/rb_tree
gcc-3.4/include/c++/3.4.0/ext/rope
gcc-3.4/include/c++/3.4.0/ext/ropeimpl.h
gcc-3.4/include/c++/3.4.0/ext/slist
gcc-3.4/include/c++/3.4.0/ext/stdio_filebuf.h
gcc-3.4/include/c++/3.4.0/ext/stdio_sync_filebuf.h
gcc-3.4/include/c++/3.4.0/fstream
gcc-3.4/include/c++/3.4.0/functional
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/atomicity.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/basic_file.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/c++config.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/c++io.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/c++locale.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/codecvt_specializations.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/ctype_base.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/ctype_inline.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/ctype_noninline.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/gthr-default.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/gthr-posix.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/gthr-single.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/gthr.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/messages_members.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/os_defines.h
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/stdc++.h.gch/O0g
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/stdc++.h.gch/O2g
gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/time_members.h
gcc-3.4/include/c++/3.4.0/iomanip
gcc-3.4/include/c++/3.4.0/ios
gcc-3.4/include/c++/3.4.0/iosfwd
gcc-3.4/include/c++/3.4.0/iostream
gcc-3.4/include/c++/3.4.0/istream
gcc-3.4/include/c++/3.4.0/iterator
gcc-3.4/include/c++/3.4.0/limits
gcc-3.4/include/c++/3.4.0/list
gcc-3.4/include/c++/3.4.0/locale
gcc-3.4/include/c++/3.4.0/map
gcc-3.4/include/c++/3.4.0/memory
gcc-3.4/include/c++/3.4.0/new
gcc-3.4/include/c++/3.4.0/numeric
gcc-3.4/include/c++/3.4.0/ostream
gcc-3.4/include/c++/3.4.0/queue
gcc-3.4/include/c++/3.4.0/set
gcc-3.4/include/c++/3.4.0/sstream
gcc-3.4/include/c++/3.4.0/stack
gcc-3.4/include/c++/3.4.0/stdexcept
gcc-3.4/include/c++/3.4.0/streambuf
gcc-3.4/include/c++/3.4.0/string
gcc-3.4/include/c++/3.4.0/typeinfo
gcc-3.4/include/c++/3.4.0/utility
gcc-3.4/include/c++/3.4.0/valarray
gcc-3.4/include/c++/3.4.0/vector
gcc-3.4/lib/libstdc++.a
gcc-3.4/lib/libstdc++.la
gcc-3.4/lib/libstdc++.so
gcc-3.4/lib/libstdc++.so.6
gcc-3.4/lib/libstdc++.so.6.0
gcc-3.4/lib/libsupc++.a
gcc-3.4/lib/libsupc++.la
gcc-3.4/man/man1/g++.1
gcc-3.4/mk/c++.mk
@dirrm gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits/stdc++.h.gch
@dirrm gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0/bits
@dirrm gcc-3.4/include/c++/3.4.0/${MACHINE_GNU_PLATFORM}2.0
@dirrm gcc-3.4/include/c++/3.4.0/ext
@dirrm gcc-3.4/include/c++/3.4.0/debug
@dirrm gcc-3.4/include/c++/3.4.0/bits
@dirrm gcc-3.4/include/c++/3.4.0/backward
@dirrm gcc-3.4/include/c++/3.4.0
@dirrm gcc-3.4/include/c++

View file

@ -1,15 +0,0 @@
=== g++ Summary ===
# of expected passes 9287
# of unexpected successes 1
# of expected failures 58
# of unsupported tests 44
Awaiting release of 3.4
Need to integrate with now gcc.mk stuff. This will only
build with the old (<= 6 Feb 04) pkgsrc/mk files
-- NEW: With update to gcc-ss-3.4-20040218 this pkg is broken

View file

@ -1,7 +0,0 @@
$NetBSD: distinfo,v 1.8 2004/02/19 11:46:47 johnrshannon Exp $
SHA1 (gcc-3.4-20040218.tar.bz2) = 43705ead779ef64709ed597825b7fad597c8d577
Size (gcc-3.4-20040218.tar.bz2) = 24951017 bytes
SHA1 (patch-af) = eef0cf2b93939d32134a98a016715c42b9f97f09
SHA1 (patch-ag) = b24945785c6160ceaa2b2f0bb00e75d8efeda4a9
SHA1 (patch-cppspec.c) = eda50b04e73c5fbc2814fcaf85c38214ead1bd3d

View file

@ -1,7 +0,0 @@
# $NetBSD: gcc3.mk,v 1.1.1.1 2003/12/11 22:34:28 johnrshannon Exp $
#
# make configuration file for @PKGNAME@
CC= @GCC_PREFIX@/bin/cc
CPP= @GCC_PREFIX@/bin/cpp
CXX= @GCC_PREFIX@/bin/c++

View file

@ -1,19 +0,0 @@
$NetBSD: patch-af,v 1.1.1.1 2003/12/11 22:34:28 johnrshannon Exp $
--- gcc/cppspec.c.orig 2003-07-19 08:47:01.000000000 -0600
+++ gcc/cppspec.c
@@ -82,6 +82,14 @@ lang_specific_driver (int *in_argc, cons
is_cpp_driver = 1;
+ /* NetBSD uses __GNUC__ and friends in header files processed with cpp
+ regularly. Default to old behaviour here. XXX - move me to
+ config/netbsd.h "DEFAULT_CPP_NEED_NO_GCC". */
+#ifdef DEFAULT_CPP_NEED_NO_GCC
+ need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
+#endif
+
+
/* First pass. If we see an -S or -c, barf. If we see an input file,
turn off read_stdin. If we see a second input file, it is actually
the output file. If we see a third input file, barf. */

View file

@ -1,12 +0,0 @@
$NetBSD: patch-ag,v 1.1.1.1 2003/12/11 22:34:28 johnrshannon Exp $
--- gcc/config/netbsd.h.orig 2003-09-26 22:48:11.000000000 -0600
+++ gcc/config/netbsd.h
@@ -226,3 +226,7 @@ __enable_execute_stack (addr) \
/* 7 == PROT_READ | PROT_WRITE | PROT_EXEC */ \
(void) mprotect (page, end - page, 7); \
}
+
+/* NetBSD depends on "cpp" having GNUC semantics, and must default as if
+ "cpp -gcc" was called. */
+#define DEFAULT_CPP_NEED_NO_GCC 0

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cppspec.c,v 1.1 2003/12/17 18:40:33 johnrshannon Exp $
--- gcc/cppspec.c.orig 2003-12-13 03:51:43.000000000 -0700
+++ gcc/cppspec.c
@@ -86,7 +86,7 @@ lang_specific_driver (int *in_argc, cons
regularly. Default to old behaviour here. XXX - move me to
config/netbsd.h "DEFAULT_CPP_NEED_NO_GCC". */
#ifdef DEFAULT_CPP_NEED_NO_GCC
- need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
+ int need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
#endif

View file

@ -1,11 +0,0 @@
This pkg builds the base, C compiler, from the
GNU Compiler Collection (GCC) version 3.4. It is
one of a set of gcc3-*-devel pkgs, and is required
by all others.
Version 3.4 of gcc is the developmental release. This
package builds the compiler from the ${SNAPDATE}
snaphot.
This set of packages is based on the lang/gcc3-* set
of packages.

View file

@ -1,34 +0,0 @@
# $NetBSD: Makefile,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
#
PKGNAME= gcc3${GCC3_PKGMODIF}-c-${GCC_VERSION}-devel
COMMENT= GNU Compiler Collection, developmental C compiler
.include "Makefile.common"
# the "gcc" frontend knows all languages (by patch)
CONFIGURE_ARGS+= --enable-languages=c
PLIST_SRC= ${WRKDIR}/PLIST_DYNAMIC
post-build:
@${SED} ${FILES_SUBST_SED} ${FILESDIR}/gcc3.mk > ${WRKDIR}/gcc3.mk
do-test:
(cd ${WRKSRC}; ${GMAKE} check)
post-install:
.if ${OPSYS} == "SunOS"
-cd ${GCC_ARCHDIR}/include && ${RM} -f fixed && ${RMDIR} v7 v9
.endif
${INSTALL_DATA_DIR} ${GCC_PREFIX}/mk
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${GCC_PREFIX}/mk/c.mk
${LN} -f ${GCC_PREFIX}/bin/gcc ${GCC_PREFIX}/bin/cc
${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
>> ${PLIST_SRC}
${FIND} ${GCC_PREFIX} -type d -print \
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
>> ${PLIST_SRC}
.include "../../mk/bsd.pkg.mk"

View file

@ -1,90 +0,0 @@
# $NetBSD: Makefile.common,v 1.10 2004/04/26 00:02:34 thomasklausner Exp $
#
SNAPDATE= 20040218
GCC_VERSION= 3.4
DISTNAME= gcc-${GCC_VERSION}-${SNAPDATE}
CATEGORIES= lang
MASTER_SITES= ftp://gcc.gnu.org/pub/gcc/snapshots/${GCC_VERSION}-${SNAPDATE}/ \
ftp://mirrors.rcn.net/pub/sourceware/gcc/snapshots/${GCC_VERSION}-${SNAPDATE}/
DISTFILES= gcc-${GCC_VERSION}-${SNAPDATE}.tar.bz2
MAINTAINER= john@johnrshannon.com
HOMEPAGE= http://www.gnu.org/software/gcc/gcc.html
NOT_FOR_PLATFORM= Darwin-*-*
USE_BUILDLINK2= YES
USE_PKGINSTALL= YES
USE_GNU_TOOLS+= make
HAS_CONFIGURE= YES
.include "../../mk/bsd.prefs.mk"
# Make location overridable, to allow ping-pong bootstraps.
GCC3_DEFAULT_SUBPREFIX= gcc-3.4
GCC3_INSTALLTO_SUBPREFIX?= ${GCC3_DEFAULT_SUBPREFIX}
.if ${GCC3_INSTALLTO_SUBPREFIX} != ${GCC3_DEFAULT_SUBPREFIX}
GCC3_PKGMODIF= _${GCC3_INSTALLTO_SUBPREFIX}
.endif
GCC_SUBPREFIX= ${GCC3_INSTALLTO_SUBPREFIX}
GCC_PREFIX= ${PREFIX}/${GCC_SUBPREFIX}
PLIST_SUBST+= GCC_SUBPREFIX=${GCC_SUBPREFIX}
FILES_SUBST+= GCC_PREFIX=${GCC_PREFIX}
FILES_SUBST+= PKGNAME=${PKGNAME}
MESSAGE_SUBST+= GCC_PREFIX=${GCC_PREFIX}
CONFIGURE_ARGS+= --prefix=${GCC_PREFIX}
.if defined(INFO_FILES)
INFO_DIR= ${GCC_SUBPREFIX}/info
.endif
# Support threads and building of crt*.o on post-1.6 -current.
# Use buildlink to avoid a GNU pth package.
.if ${OPSYS} == "NetBSD" && exists(/usr/include/pthread.h)
GCC_PLATFORM= ${MACHINE_GNU_ARCH}--netbsdelf2.0
PTHREAD_OPTS+= require native
.include "../../mk/pthread.buildlink2.mk"
CPPFLAGS+= -I${BUILDLINK_DIR}/include
CFLAGS+= -I${BUILDLINK_DIR}/include
.else
GCC_PLATFORM= ${MACHINE_GNU_PLATFORM}
.endif
CONFIGURE_ARGS+= --host=${GCC_PLATFORM}
PLIST_SUBST+= GCC_PLATFORM=${GCC_PLATFORM}
.if ${OPSYS} == "NetBSD" && !defined(USE_BINUTILS)
AS_VERSION!= ${AS} --version | ${AWK} '{ \
split($$3, v, /[.]/); \
printf "%02d%02d%02d%02d\n",v[1],v[2],v[3],v[4]; \
exit; \
}'
USE_BINUTILS!= ${TEST} ${AS_VERSION} -lt 02130201 && ${ECHO} YES || ${ECHO} NO
.endif
.if defined(USE_BINUTILS) && ${USE_BINUTILS} == "YES"
DEPENDS= binutils>=2.13.2.1:../../devel/binutils
CONFIGURE_ARGS+= --with-as=${PREFIX}/${MACHINE_GNU_PLATFORM}/bin/as
#. include "../../devel/binutils/buildlink3.mk"
.endif
.if ${OPSYS} == "NetBSD" || ${OPSYS} == "Linux"
CONFIGURE_ARGS+= --enable-shared
.else
. if ${OPSYS} == "SunOS"
CONFIGURE_ARGS+= --enable-shared
. else
CONFIGURE_ARGS+= --disable-shared
. endif
. if ${CC:M*gcc*} == ""
ALL_TARGET= bootstrap
. endif
.endif
GCC_ARCHSUBDIR= ${GCC_SUBPREFIX}/lib/gcc/${GCC_PLATFORM}/${GCC_VERSION}
GCC_ARCHDIR= ${PREFIX}/${GCC_ARCHSUBDIR}
pre-configure:
${MKDIR} ${BUILD_DIRS}
cd ${WRKSRC} && contrib/gcc_update --touch

View file

@ -1 +0,0 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $

View file

@ -1 +0,0 @@
- Complete pkgs for add-on language front-ends

View file

@ -1,24 +0,0 @@
# $NetBSD: buildaddon.mk,v 1.3 2004/02/27 03:20:08 minskim Exp $
.include "../../wip/gcc3-c-devel/Makefile.common"
pre-build:
(cd ${WRKSRC}/gcc && ${SETENV} ${MAKE_ENV} ${GMAKE} tconfig.h)
${LN} -sf ${GCC_PREFIX}/lib/libiberty.a ${WRKSRC}/libiberty
${LN} -sf ${GCC_PREFIX}/bin/gcc ${WRKSRC}/gcc/xgcc
BUILDLINK_DEPENDS.gcc34c?= gcc3${GCC3_PKGMODIF}-c-3.4-devel
BUILDLINK_PKGSRCDIR.gcc34c?= ../../wip/gcc3-c-devel
BUILDLINK_PREFIX.gcc34c= ${LOCALBASE}
BUILDLINK_PACKAGES+= gcc34c
BUILDLINK_FILES.gcc34c+= ${GCC_ARCHSUBDIR}/libgcc.a
BUILDLINK_FILES.gcc34c+= ${GCC_ARCHSUBDIR}/libgcc_eh.a
BUILDLINK_FILES.gcc34c+= ${GCC_ARCHSUBDIR#${GCC_VERSION}}/libgcc_s.so
BUILDLINK_FILES.gcc34c+= ${GCC_ARCHSUBDIR#${GCC_VERSION}}/libgcc_s.so.1
BUILDLINK_TARGETS+= gcc34c-buildlink
gcc34c-buildlink: _BUILDLINK_USE

View file

@ -1,9 +0,0 @@
$NetBSD: distinfo,v 1.7 2004/02/19 11:05:59 johnrshannon Exp $
SHA1 (gcc-3.4-20040218.tar.bz2) = 43705ead779ef64709ed597825b7fad597c8d577
Size (gcc-3.4-20040218.tar.bz2) = 24951017 bytes
SHA1 (patch-ab) = c1accd343195506a21f41eaf51ac020834a0b591
SHA1 (patch-ae) = 81029431d478f742e21a93b7533369b9f73ab8fb
SHA1 (patch-af) = ee41c43dbb6e710a9399954793c6ff7c4274e515
SHA1 (patch-ag) = 23fecd85ddca19a2c543827b60ea555ffbdcaa6c
SHA1 (patch-cppspec.c) = 87a42bac51664fa52b885a9f2918fcd0943b3853

View file

@ -1,6 +0,0 @@
# $NetBSD: gcc3.mk,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
#
# make configuration file for @PKGNAME@
CC= @GCC_PREFIX@/bin/cc
CPP= @GCC_PREFIX@/bin/cpp

View file

@ -1,12 +0,0 @@
$NetBSD: patch-ab,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
--- gcc/Makefile.in.orig 2003-12-01 20:55:20.000000000 -0700
+++ gcc/Makefile.in
@@ -1394,6 +1394,7 @@ c-pch.o : c-pch.c $(CONFIG_H) $(SYSTEM_H
# Language-independent files.
DRIVER_DEFINES = \
+ -DLINK_LIBGCC_SPEC="\"%D $(RPATH_FLAG)$(prefix)/lib\"" \
-DSTANDARD_STARTFILE_PREFIX=\"$(unlibsubdir)/\" \
-DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
-DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \

View file

@ -1,8 +0,0 @@
$NetBSD: patch-ae,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
--- gcc/config/t-netbsd.orig 2003-09-23 12:55:57.000000000 -0600
+++ gcc/config/t-netbsd
@@ -1,2 +1,3 @@
# Always build crtstuff with PIC.
CRTSTUFF_T_CFLAGS = -fPIC
+TARGET_LIBGCC2_CFLAGS += -fPIC

View file

@ -1,18 +0,0 @@
$NetBSD: patch-af,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
--- gcc/cppspec.c Wed Jul 23 02:40:54 2003
+++ gcc/cppspec.c Fri Jul 25 17:57:41 2003
@@ -85,6 +85,13 @@
is_cpp_driver = 1;
+ /* NetBSD uses __GNUC__ and friends in header files processed with cpp
+ regularly. Default to old behaviour here. XXX - move me to
+ config/netbsd.h "DEFAULT_CPP_NEED_NO_GCC". */
+#ifdef DEFAULT_CPP_NEED_NO_GCC
+ need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
+#endif
+
/* First pass. If we see an -S or -c, barf. If we see an input file,
turn off read_stdin. If we see a second input file, it is actually
the output file. If we see a third input file, barf. */

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ag,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
Index: gcc/config/netbsd.h
--- gcc/config/netbsd.h Wed Jul 23 02:41:37 2003
+++ gcc/config/netbsd.h Fri Jul 25 17:57:43 2003
@@ -234,3 +234,7 @@
/* 7 == PROT_READ | PROT_WRITE | PROT_EXEC */ \
(void) mprotect (page, end - page, 7); \
}
+
+/* NetBSD depends on "cpp" having GNUC semantics, and must default as if
+ "cpp -gcc" was called. */
+#define DEFAULT_CPP_NEED_NO_GCC 0

View file

@ -1,13 +0,0 @@
$NetBSD: patch-cppspec.c,v 1.1.1.1 2003/12/11 22:14:51 johnrshannon Exp $
--- gcc/cppspec.c.orig 2003-12-09 06:28:07.000000000 -0700
+++ gcc/cppspec.c
@@ -86,7 +86,7 @@ lang_specific_driver (int *in_argc, cons
regularly. Default to old behaviour here. XXX - move me to
config/netbsd.h "DEFAULT_CPP_NEED_NO_GCC". */
#ifdef DEFAULT_CPP_NEED_NO_GCC
- need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
+ int need_no_gcc = DEFAULT_CPP_NEED_NO_GCC;
#endif
/* First pass. If we see an -S or -c, barf. If we see an input file,