Update 3.10p -> 3.11p:

* Build requires a GNAT compiler, for which the maintainer has
	created a package. For now, provide two MASTER_SITEs from which
	it is available so that it'll find its way into the FreeBSD
	distfiles.

      * Uses variables in the PLIST to reduce diff sizes in future.

      * Doesn't install info files, which are virtually duplicates of
	the ones we already have.

      * AOUT support is on its wAy OUT. Do what we can, but don't blow
	any fuses.

      * Hand maintainership over to Daniel Eischen, at the request of
	the previous maintainer.

PR:	10093
Submitted by:	Daniel Eischen <eischen@vigrid.com>
This commit is contained in:
Sheldon Hearn 1999-06-24 11:11:28 +00:00
parent 78f3dcd0fa
commit cc4e71cb59
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=19746
18 changed files with 2451 additions and 1710 deletions

View file

@ -8,87 +8,187 @@
# $Id: Makefile,v 1.16 1998/01/18 15:12:38 steve Exp $
#
# Note:
# - FreeBSD tasking libraries created by Dan Eischen have been incorportated
# - FreeBSD tasking libraries created by Dan Eischen have been incorporated
# into this edition
# - The default names of a number of binaries have been altered to avoid
# conflict with other gcc based products. Standard names can be provided using
# symbolic links.
# conflict with other gcc based products. Standard names can be provided
# using symbolic links.
DISTNAME= gnat-3.10p-src
PKGNAME= gnat-3.10p
DISTNAME= gcc-2.8.1
PKGNAME= gnat-3.11p
CATEGORIES= lang
MASTER_SITES= ftp://cs.nyu.edu/pub/gnat/ \
${MASTER_SITE_GNU}
DISTFILES= gnat-3.10p-src.tar.gz gcc-2.7.2.1.tar.gz
${MASTER_SITE_GNU} \
ftp://ftp.pcnet.com/users/eischen/GNAT/ \
http://axl.noc.iafrica.com/~sheldonh/
DISTFILES= gnat-3.11p-src.tar.gz gcc-2.8.1.tar.gz
MAINTAINER= maurice@serc.rmit.edu.au
MAINTAINER= eischen@vigrid.com
.if !exists(/usr/local/bin/gnatf)
BROKEN= "requires existing gnat compiler"
.include <bsd.port.pre.mk>
.if ${PORTOBJFORMAT} == "elf"
GNUHOST= ${ARCH}-unknown-freebsdelf${OSREL}
.else
GNUHOST= ${ARCH}-unknown-freebsd${OSREL}
.endif
.if !exists(/usr/local/bin/adagcc)
BROKEN= "requires patched gcc compiler"
.endif
# You need a compiler who calls an existing gnat compiler (3.08 or greater):
# if you have one, if you have one put it here, otherwise,
# you will need to install from a package first
GCC_VERSION= 2.8.1
PLIST_SUB= GNUHOST=${GNUHOST} GCC_VERSION=${GCC_VERSION}
# Make no mistake about what host/target we are building on/for.
# This package does not support cross-compiling, and this fixes
# problems with bsd.port.mk files from earlier FreeBSD 3.x releases.
CONFIGURE_TARGET= --host=${GNUHOST} --target=${GNUHOST}
CONFIGURE_ARGS= --program-prefix=ada
GNU_CONFIGURE= yes
USE_GMAKE= yes
MAN1= adagcc.1 cccp.1
# Make sure we use the patched gcc compiler
CC = /usr/local/bin/adagcc
# You need a compiler who calls an existing GNAT compiler (3.10 or greater).
# If you have one, point CC at it. By default, we'll look for one in the
# obvious places. If we can't find one, we'll fetch a distfile containing
# a minimum (still pretty large) compiler toolset and use that to build.
# Which version of gcc do we have? Must be 2.7.2.1
CCVERSION= 2.7.2.1
# For the GNAT compiler, we look in ${PREFIX} and in /usr/local.
.ifdef PREFIX
have_boot!= if [ -x ${PREFIX}/bin/adagcc -a -x ${PREFIX}/bin/gnatbind ]; then \
${ECHO} "${PREFIX}/bin"; \
else \
${ECHO} ""; \
fi
.else
have_boot=
.endif
.if empty(have_boot)
have_boot!= if [ -x /usr/local/bin/adagcc -a -x /usr/local/bin/gnatbind ]; then \
${ECHO} "/usr/local/bin"; \
else \
${ECHO} ""; \
fi
.endif
# which language set
LANG = c ada
#
# Check for attempts to cross-compile the GNAT compiler. We only supply
# an ELF bootstrap compiler. If the gnat-3.10 package is still around,
# you could possible install that and build gnat-3.11p as aout. This
# is not supported, though.
.if empty(have_boot)
have_boot!= if [ ${PORTOBJFORMAT} = "aout" ]; then \
${ECHO} "borken for cross"; \
else \
${ECHO} ""; \
fi
.else
have_boot!= if [ `file ${have_boot}/adagcc | awk ' { print $$2 }'` = "ELF" ]; then \
if [ ${PORTOBJFORMAT} = "elf" ]; then \
${ECHO} ${have_boot}; \
else \
${ECHO} "borken for cross"; \
fi \
else \
if [ ${PORTOBJFORMAT} = "elf" ]; then \
${ECHO} ""; \
else \
${ECHO} ${have_boot}; \
fi \
fi
.endif
.if ${have_boot} == "borken for cross"
BROKEN= "Cannot build an aout compiler with an ELF compiler."
.endif
.if empty(have_boot)
DISTFILES+= gnat-3.11p-boot.tar.gz
# Warning! You need the trailing slash on GCC_EXEC_PREFIX.
COMPILEDATA= GCC_EXEC_PREFIX=${WRKDIR}/adaboot/lib/gcc-lib/ \
ADA_INCLUDE_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adainclude \
ADA_OBJECTS_PATH=${WRKDIR}/adaboot/lib/gcc-lib/adalib
have_boot= ${WRKDIR}/adaboot
.endif
# Make sure we use the Ada-aware gcc compiler.
CC = adagcc
CONFIGURE_ENV= ${COMPILE_DATA} PATH=${have_boot}/bin:$$PATH
pre-patch:
@${ECHO} "===> Applying FreeBSD patches to gcc for ${DISTNAME}"
-( cd ${WRKDIR}/gcc-2.7.2.1; \
${PATCH} < ${PATCHDIR}/patch-freebsdgcc; )
-( ${PATCH} ${PATCH_ARGS} < ${FILESDIR}/freebsdgcc28-patches )
@${ECHO} "===> Patching gcc for ${DISTNAME}"
-( cd ${WRKDIR}/gcc-2.7.2.1; \
${PATCH} < ${WRKSRC}/src/gcc-2721.dif; )
(cd ${WRKDIR}/gcc-2.7.2.1; \
${CP} -R ${WRKSRC}/src/ada ada; )
-( ${PATCH} ${PATCH_ARGS} < ${WRKDIR}/gnat-3.11p-src/src/gcc-281.dif )
@${ECHO} "===> Copying GNAT compiler sources into GCC tree."
-( ${MV} ${WRKDIR}/gnat-3.11p-src/src/ada ${WRKDIR}/gcc-2.8.1 )
# Copy any additional files required into the correct locations.
post-patch:
(cd ${FILESDIR}; \
for i in *.adb *.ads ; do \
${CP} $$i ${WRKSRC}/ada; \
done )
pre-configure:
(cd ${WRKDIR}/gcc-2.7.2.1/ada; \
${TOUCH} treeprs.ads a-[es]info.h nmake.ad[bs] )
do-build:
(cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" LANGUAGES="${LANG}" )
(cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" LANGUAGES="${LANG}" bootstrap )
(cd ${WRKDIR}/gcc-2.7.2.1; ${GMAKE} CC="${CC}" CFLAGS="-O2" gnatlib_and_tools )
# patch the src that we are going to use and copy any additional files
# required into the correct locations
# use version specific patches where necessary
do-patch:
(cd ${WRKDIR}; \
FILES="${PATCHDIR}/patch-[a-z][a-z]" ; \
SORTEDFILES=`${ECHO} $$FILES | ${TR} " " "\n" | sort` ; \
for i in $$SORTEDFILES ; do \
${ECHO} Applying ---- $$i ;\
${PATCH} < $$i ;\
done )
(cd ${FILESDIR}; \
for i in *.adb *.ads ; do \
${CP} $$i ${WRKDIR}/gcc-2.7.2.1/ada; \
done )
@(cd ${WRKDIR}/gcc-2.8.1/config/${ARCH}/ ; \
MAJ=`sysctl -n kern.osreldate | ${SED} -e '/.....$$/s///'` ; \
${MV} freebsd.h freebsd.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd.h.in \
>freebsd.h ; \
${MV} freebsd-elf.h freebsd-elf.h.in ; \
${SED} -e "s:__FreeBSD__=[0-9]*:__FreeBSD__=$${MAJ}:" freebsd-elf.h.in \
>freebsd-elf.h)
@(cd ${WRKSRC}/ada; \
${TOUCH} treeprs.ads a-[es]info.h nmake.ad[bs])
#
# Can't get this to work with default bsd.port.mk do-configure target.
#
do-configure:
(cd ${WRKDIR}/gcc-2.7.2.1; \
./configure --prefix=${PREFIX} --program-prefix=ada )
@(cd ${WRKSRC} && ${CONFIGURE_ENV} ./${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS})
#
# We intentionally override CFLAGS because the build procedure is explicitly
# spelled out in gnat-3.11p-src/src/README.BUILD. Remove CFLAGS from the
# do-build target at your own risk.
#
do-build:
(cd ${WRKSRC}; \
PATH=${have_boot}/bin:$$PATH \
${COMPILEDATA} ${GMAKE} CC="${CC}" OLDCC="adagcc" CFLAGS="-O2" LANGUAGES="c ada" )
(cd ${WRKSRC}; \
${GMAKE} CFLAGS="-O2" LANGUAGES="c ada" bootstrap )
(cd ${WRKSRC}; \
${GMAKE} CFLAGS="-O2" gnattools )
(cd ${WRKSRC}; \
${GMAKE} CFLAGS="-O2" GNATLIBCFLAGS="-O2" gnatlib )
do-install:
(cd ${WRKDIR}/gcc-2.7.2.1; \
${GMAKE} CC="${CC}" LANGUAGES="${LANG}" install )
(cd ${WRKSRC}; \
${GMAKE} CC="${CC}" LANGUAGES="c ada" ${INSTALL_TARGET} )
post-install:
@(for prog in ${PREFIX}/bin/adagcc \
${PREFIX}/bin/gnat \
${PREFIX}/bin/gnatbind \
${PREFIX}/bin/gnatbl \
${PREFIX}/bin/gnatchop \
${PREFIX}/bin/gnatfind \
${PREFIX}/bin/gnatkr \
${PREFIX}/bin/gnatlink \
${PREFIX}/bin/gnatls \
${PREFIX}/bin/gnatmake \
${PREFIX}/bin/gnatmem \
${PREFIX}/bin/gnatprep \
${PREFIX}/bin/gnatpsta \
${PREFIX}/bin/gnatpsys \
${PREFIX}/bin/gnatxref \
${PREFIX}/bin/${GNUHOST}-gcc \
${PREFIX}/lib/gcc-lib/${GNUHOST}/${GCC_VERSION}/cc1 \
${PREFIX}/lib/gcc-lib/${GNUHOST}/${GCC_VERSION}/gnat1 \
${PREFIX}/lib/gcc-lib/${GNUHOST}/${GCC_VERSION}/cpp ; do \
if [ -x $$prog ]; then \
strip $$prog ; \
fi \
done)
@(chown -R bin:bin ${PREFIX}/lib/gcc-lib/${GNUHOST}/${GCC_VERSION})
@(${ECHO} "-----------------------------------------------------------" )
@(${ECHO} "" )
@(${ECHO} "For information about using the tasking library please read" )
@ -97,4 +197,4 @@ post-install:
@(${ECHO} "-----------------------------------------------------------" )
@(${ECHO} "" )
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View file

@ -1,2 +1,3 @@
MD5 (gnat-3.10p-src.tar.gz) = ff672b160649efe2849fa5ca91dac580
MD5 (gcc-2.7.2.1.tar.gz) = 655b43dbb48f611fc667ec21584a4460
MD5 (gnat-3.11p-src.tar.gz) = 44ef3007e0ea216ab9a1e4a2712a0f8b
MD5 (gcc-2.8.1.tar.gz) = 311829e9c36080fb54b0145285746a9e
MD5 (gnat-3.11p-boot.tar.gz) = e78d6bfa82e0fa941e779d7f14dc4708

View file

@ -39,7 +39,7 @@
-- This is only a first approximation.
-- It should be autogenerated by the m4 macro processor.
-- Contributed by Daniel Eischen (deischen@iworks.InterWorks.org)
-- Contributed by Daniel Eischen (eischen@vigrid.com)
with System.OS_Interface;
-- used for names of interrupts

View file

@ -7,7 +7,7 @@
-- B o d y --
-- (Version for new GNARL) --
-- --
-- $Revision: 1.1 $ --
-- $Revision: 1.3 $ --
-- --
-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University --
-- --
@ -44,7 +44,7 @@
-- This file performs the system-dependent translation between machine
-- exceptions and the Ada exceptions, if any, that should be raised when
-- they occur. This version works for FreeBSD. Contributed by
-- Daniel M. Eischen (deischen@iworks.InterWorks.org).
-- Daniel M. Eischen (eischen@vigrid.com).
-- PLEASE DO NOT add any dependences on other packages.
-- This package is designed to work with or without tasking support.
@ -61,16 +61,12 @@
with Interfaces.C;
-- used for int and other types
with System.Error_Reporting;
-- used for Shutdown
with System.OS_Interface;
-- used for various Constants, Signal and types
package body System.Interrupt_Management is
use Interfaces.C;
use System.Error_Reporting;
use System.OS_Interface;
type Interrupt_List is array (Interrupt_ID range <>) of Interrupt_ID;
@ -137,7 +133,7 @@ package body System.Interrupt_Management is
when SIGBUS =>
raise Storage_Error;
when others =>
pragma Assert (Shutdown ("Unexpected signal"));
pragma Assert (False);
null;
end case;
end Notify_Exception;
@ -152,6 +148,10 @@ package body System.Interrupt_Management is
mask : aliased sigset_t;
Result : Interfaces.C.int;
Unreserve_All_Interrupts : Interfaces.C.int;
pragma Import
(C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
begin
Abort_Task_Interrupt := SIGABRT;
@ -170,14 +170,17 @@ package body System.Interrupt_Management is
-- In that case, this field should be changed back to 0. ??? (Dong-Ik)
Result := sigemptyset (mask'Access);
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---sigemptyset"));
pragma Assert (Result = 0);
for I in Exception_Interrupts'Range loop
Result := sigaddset (mask'Access, Signal (Exception_Interrupts (I)));
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---sigaddset"));
end loop;
-- ??? For the same reason explained above, we can't mask these
-- signals because otherwise we won't be able to catch more than
-- one signal.
-- for I in Exception_Interrupts'Range loop
-- Result :=
-- sigaddset (mask'Access, Signal (Exception_Interrupts (I)));
-- pragma Assert (Result = 0);
-- end loop;
act.sa_mask := mask;
@ -185,28 +188,26 @@ package body System.Interrupt_Management is
Keep_Unmasked (Exception_Interrupts (I)) := True;
Result :=
sigaction
(Signal (Exception_Interrupts (I)), act'Access,
(Signal (Exception_Interrupts (I)), act'Unchecked_Access,
old_act'Unchecked_Access);
pragma Assert (Result = 0
or else Shutdown ("GNULLI failure---sigaction"));
pragma Assert (Result = 0);
end loop;
Keep_Unmasked (Abort_Task_Interrupt) := true;
-- Keep_Unmasked (SIGBUS) := true;
Keep_Unmasked (Abort_Task_Interrupt) := True;
Keep_Unmasked (SIGSTOP) := True;
Keep_Unmasked (SIGKILL) := True;
Keep_Unmasked (SIGSTOP) := true;
Keep_Unmasked (SIGKILL) := true;
Keep_Unmasked (SIGINT) := true;
-- By keeping SIGINT unmasked, allow the user to do a Ctrl-C, but in the
-- same time, disable the ability of handling this signal
-- via Ada.Interrupts.
-- The pragma Unreserve_All_Interrupts let the user the ability to
-- change this behavior.
-- Keep_Unmasked (SIGEMT) := true;
-- Keep_Unmasked (SIGCHLD) := true;
-- Keep_Unmasked (SIGALRM) := true;
-- ???? The above signals have been found to need to be
-- kept unmasked on some systems, per Dong-Ik Oh.
-- I don't know whether the MIT/Provenzano threads
-- need these or any other signals unmasked at the thread level.
-- I hope somebody will take
-- the time to look it up. -- Ted Baker
if Unreserve_All_Interrupts = 0 then
Keep_Unmasked (SIGINT) := True;
else
Keep_Unmasked (SIGINT) := False;
end if;
-- FreeBSD uses SIGINFO to dump thread status to stdout. If
-- the user really wants to attach his own handler, let him.
@ -216,9 +217,9 @@ package body System.Interrupt_Management is
-- in order to handle the setitimer/getitimer operations. We
-- could probably allow SIGALARM, but we'll leave it as unmasked
-- for now. FreeBSD pthreads also needs SIGCHLD.
Keep_Unmasked (SIGCHLD) := true;
Keep_Unmasked (SIGALRM) := true;
Keep_Unmasked (SIGVTALRM) := true;
Keep_Unmasked (SIGCHLD) := True;
Keep_Unmasked (SIGALRM) := True;
Keep_Unmasked (SIGVTALRM) := True;
Reserve := Reserve or Keep_Unmasked or Keep_Masked;

View file

@ -7,7 +7,7 @@
-- B o d y --
-- (Version for new GNARL) --
-- --
-- $Revision: 1.1 $ --
-- $Revision: 1.2 $ --
-- --
-- Copyright (C) 1991,1992,1993,1994,1995,1996 Florida State University --
-- --
@ -39,7 +39,7 @@
-- This is only a first approximation.
-- It should be autogenerated by the m4 macro processor.
-- Contributed by Daniel M. Eischen (deischen@iworks.InterWorks.org)
-- Contributed by Daniel M. Eischen (eischen@vigrid.com)
-- DO NOT EDIT this file.
-- It was automatically generated from another file by the m4 macro processor.
@ -56,10 +56,10 @@
-- __HAS_SIGCONTEXT = 1
-- __HAS_UCONTEXT = 0
-- __THREADS = POSIX_THREADS
-- __THREAD_VARIANT = ??
-- __THREAD_VARIANT = MIT-THREADS
-- __HAS_TIMESPEC = 1
-- __HAS_NANOSLEEP = 1
-- __HAS_CLOCK_GETTIME = 0
-- __HAS_CLOCK_GETTIME = 1
-- __HAS_GETTIMEOFDAY = 1
-- __POSIX_THREAD_PRIO_PROTECT = 0
-- __POSIX_THREAD_PRIO_INHERIT = 0
@ -86,8 +86,61 @@ package body System.OS_Interface is
return (internal_errno.all);
end Errno;
function Get_Stack_Base (thread : pthread_t) return Address is
begin
return (0);
end Get_Stack_Base;
type sigset_t_ptr is access all sigset_t;
function pthread_getschedparam
(thread : pthread_t;
policy : access int;
param : access struct_sched_param) return int is
function pthread_getprio (thread : pthread_t) return int;
pragma Import (C, pthread_getprio, "pthread_getprio");
Result : int;
begin
Result := pthread_getprio (thread);
if Result >= 0 then
-- Only set sched_param if we succeeded. Also ensure
-- we return a successful status to the caller.
param.sched_priority := Result;
Result := 0;
end if;
return (Result);
end pthread_getschedparam;
function pthread_setschedparam
(thread : pthread_t;
policy : int;
param : access struct_sched_param) return int is
function pthread_setprio (thread : pthread_t; prio : int) return int;
pragma Import (C, pthread_setprio, "pthread_setprio");
begin
return (pthread_setprio (thread, param.sched_priority));
end pthread_setschedparam;
function pthread_attr_setschedpolicy
(attr : access pthread_attr_t;
policy : int) return int is
begin
return (0);
end pthread_attr_setschedpolicy;
function pthread_attr_getschedpolicy
(attr : access pthread_attr_t;
policy : access int) return int is
begin
return (0);
end pthread_attr_getschedpolicy;
procedure pthread_init is
begin
null;
end pthread_init;
function pthread_sigmask_set
(how : int;
@ -166,16 +219,4 @@ package body System.OS_Interface is
tv_usec => long (Long_Long_Integer (F * 10#1#E6)));
end To_Timeval;
-- FreeBSD Pthreads has pthread_yield and it is imported as
-- sched_yield in 5fosinte.ads. The FreeBSD pthread_yield does
-- not have any parameters, so the import may be used directly
-- without the need for a wrapper as shown below.
-- function sched_yield return int is
-- procedure sched_yield_base (arg : System.Address);
-- pragma Import (C, sched_yield_base, "pthread_yield");
-- begin
-- sched_yield_base (System.Null_Address);
-- return 0;
-- end sched_yield;
end System.OS_Interface;

View file

@ -7,7 +7,7 @@
-- S p e c --
-- (Version for new GNARL) --
-- --
-- $Revision: 1.1 $ --
-- $Revision: 1.5 $ --
-- --
-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. --
-- --
@ -39,7 +39,7 @@
-- This is only a first approximation.
-- It should be autogenerated by the m4 macro processor.
-- Contributed by Daniel Eischen (deischen@iworks.InterWorks.org)
-- Contributed by Daniel Eischen (eischen@vigrid.com)
-- DO NOT EDIT this file.
-- It was automatically generated from another file by the m4 macro processor.
@ -87,7 +87,7 @@ with Interfaces.C;
package System.OS_Interface is
pragma Preelaborate;
pragma Linker_Options ("-lc_r");
pragma Linker_Options ("-pthread");
subtype int is Interfaces.C.int;
subtype short is Interfaces.C.short;
@ -250,7 +250,7 @@ package System.OS_Interface is
function sigaction
(sig : Signal;
act : access struct_sigaction;
act : struct_sigaction_ptr;
oact : struct_sigaction_ptr)
return int;
pragma Import (C, sigaction, "sigaction");
@ -259,6 +259,9 @@ package System.OS_Interface is
-- Time --
----------
Time_Slice_Supported : constant boolean := True;
-- Indicates wether time slicing is supported (i.e SCHED_RR is supported)
type timespec is private;
function nanosleep (rqtp, rmtp : access timespec) return int;
@ -297,7 +300,7 @@ package System.OS_Interface is
function gettimeofday
(tv : access struct_timeval;
tz : access struct_timezone) return int;
tz : System.Address) return int;
pragma Import (C, gettimeofday, "gettimeofday");
procedure usleep (useconds : unsigned_long);
@ -309,13 +312,13 @@ package System.OS_Interface is
-- Priority Scheduling --
-------------------------
MIN_PRIO : constant := 0;
MAX_PRIO : constant := 126;
MIN_PRIO : constant := 0;
MAX_PRIO : constant := 126;
DEFAULT_PRIO : constant := 64;
SCHED_RR : constant := 0;
SCHED_IO : constant := 1;
SCHED_FIFO : constant := 2;
SCHED_OTHER : constant := 3;
SCHED_FIFO : constant := 1;
SCHED_OTHER : constant := 2;
SCHED_RR : constant := 3;
-------------
-- Process --
@ -323,6 +326,8 @@ package System.OS_Interface is
type pid_t is private;
Self_PID : constant pid_t;
function kill
(pid : pid_t;
sig : Signal)
@ -351,10 +356,55 @@ package System.OS_Interface is
PTHREAD_CREATE_DETACHED : constant := 1;
PTHREAD_CREATE_JOINABLE : constant := 0;
-----------
-- Stack --
-----------
Stack_Base_Available : constant boolean := False;
-- Indicates wether the stack base is available on this target.
-- This allows us to share s-osinte.adb between all the FSU run time.
-- Note that this value can only be true if pthread_t has a complete
-- definition that corresponds exactly to the C header files.
function Get_Stack_Base (thread : pthread_t) return Address;
pragma Inline (Get_Stack_Base);
-- returns the stack base of the specified thread.
-- Only call this function when Stack_Base_Available is True.
function Get_Page_Size return size_t;
function Get_Page_Size return Address;
pragma Import (C, Get_Page_Size, "getpagesize");
-- returns the size of a page, or 0 if this is not relevant on this
-- target
PROT_NONE : constant := 0;
PROT_READ : constant := 1;
PROT_WRITE : constant := 2;
PROT_EXEC : constant := 4;
PROT_ALL : constant := PROT_READ + PROT_WRITE + PROT_EXEC;
PROT_ON : constant := PROT_NONE;
PROT_OFF : constant := PROT_ALL;
function mprotect
(addr : Address; len : size_t; prot : int) return int;
pragma Import (C, mprotect);
-----------------------------------------
-- Nonstandard Thread Initialization --
-----------------------------------------
-- FSU_THREADS requires pthread_init, which is nonstandard
-- and this should be invoked during the elaboration of s-taprop.adb
--
-- FreeBSD does not require this so we provide an empty Ada body.
procedure pthread_init;
---------------------------
-- POSIX.1c Section 3 --
---------------------------
type sigset_t_ptr is access all sigset_t;
function sigwait
(set : access sigset_t;
sig : access Signal)
@ -369,8 +419,8 @@ package System.OS_Interface is
function pthread_sigmask
(how : int;
set : access sigset_t;
oset : access sigset_t)
set : sigset_t_ptr;
oset : sigset_t_ptr)
return int;
pragma Import (C, pthread_sigmask, "pthread_sigmask");
@ -472,44 +522,44 @@ package System.OS_Interface is
----------------------------
-- FreeBSD pthreads does not support these yet.
-- PTHREAD_PRIO_NONE : constant := 0;
-- PTHREAD_PRIO_PROTECT : constant := 2;
-- PTHREAD_PRIO_INHERIT : constant := 1;
--
-- PTHREAD_PRIO_NONE : constant := 0;
-- PTHREAD_PRIO_PROTECT : constant := 2;
-- PTHREAD_PRIO_INHERIT : constant := 1;
-- FreeBSD doesn't have pthread_getschedparam or pthread_setschedparam
-- yet. It has pthread_getprio and pthread_setprio, so we use these
-- instead.
-- yet, but we provide the compliant interface and implement them with
-- pthread_getprio and pthread_setprio instead.
-- type struct_sched_param is record
-- prio : int;
-- no_data : System.Address;
-- end record;
-- pragma Convention (C, struct_sched_param);
--
-- function pthread_getschedparam
-- (thread : pthread_t;
-- policy : access int;
-- param : access struct_sched_param)
-- return int;
-- pragma Import (C, pthread_getschedparam, "pthread_getschedparam");
--
-- function pthread_setschedparam
-- (thread : pthread_t;
-- policy : int;
-- param : access struct_sched_param)
-- return int;
-- pragma Import (C, pthread_setschedparam, "pthread_setschedparam");
type struct_sched_param is record
sched_priority : int;
end record;
pragma Convention (C, struct_sched_param);
function sched_getparam
(pid : pid_t;
param : access struct_sched_param)
return int;
pragma Import (C, sched_getparam, "sched_getparam");
function sched_setscheduler
(pid : pid_t;
policy : int;
param : access struct_sched_param)
return int;
pragma Import (C, sched_setscheduler, "sched_setscheduler");
function pthread_getschedparam
(thread : pthread_t)
(thread : pthread_t;
policy : access int;
param : access struct_sched_param)
return int;
pragma Import (C, pthread_getschedparam, "pthread_getprio");
function pthread_setschedparam
(thread : pthread_t;
priority : int)
(thread : pthread_t;
policy : int;
param : access struct_sched_param)
return int;
pragma Import (C, pthread_setschedparam, "pthread_setprio");
function pthread_attr_setscope
(attr : access pthread_attr_t;
@ -541,45 +591,29 @@ package System.OS_Interface is
(attr : access pthread_attr_t;
policy : int)
return int;
pragma Import
(C, pthread_attr_setschedpolicy,
"pthread_attr_setschedpolicy");
-- pragma Import
-- (C, pthread_attr_setschedpolicy,
-- "pthread_attr_setschedpolicy");
function pthread_attr_getschedpolicy
(attr : access pthread_attr_t;
policy : access int)
return int;
pragma Import (C, pthread_attr_getschedpolicy,
"pthread_attr_getschedpolicy");
-- pragma Import (C, pthread_attr_getschedpolicy,
-- "pthread_attr_getschedpolicy");
-- FreeBSD doesn't have pthread_attr_setschedparm and
-- pthread_attr_getschedparm yet. It has pthread_attr_setprio and
-- pthread_attr_getprio instead. It seems we don't need either one
-- of these, though.
-- pthread_attr_getschedparm yet.
-- function pthread_attr_setschedparam
-- (attr : access pthread_attr_t;
-- sched_param : access struct_sched_param)
-- (attr : access pthread_attr_t;
-- param : access struct_sched_param)
-- return int;
-- pragma Import (C, pthread_attr_setschedparam,
-- "pthread_attr_setschedparam");
--
-- function pthread_attr_getschedparam
-- (attr : access pthread_attr_t;
-- sched_param : access struct_sched_param)
-- (attr : access pthread_attr_t;
-- param : access struct_sched_param)
-- return int;
-- pragma Import (C, pthread_attr_getschedparam,
-- "pthread_attr_getschedparam");
function pthread_attr_setschedparam
(attr : access pthread_attr_t;
priority : int)
return int;
pragma Import (C, pthread_attr_setschedparam, "pthread_attr_setprio");
function pthread_attr_getschedparam
(attr : access pthread_attr_t)
return int;
pragma Import (C, pthread_attr_getschedparam, "pthread_attr_getprio");
function sched_yield return int;
pragma Import (C, sched_yield, "pthread_yield");
@ -598,8 +632,6 @@ package System.OS_Interface is
return int;
pragma Import (C, pthread_attr_destroy, "pthread_attr_destroy");
function pthread_attr_setdetachstate
(attr : access pthread_attr_t;
detachstate : int)
@ -673,6 +705,16 @@ package System.OS_Interface is
return int;
pragma Import (C, pthread_key_create, "pthread_key_create");
--------------------------------------
-- Non-portable pthread functions --
--------------------------------------
function pthread_set_name_np
(thread : pthread_t;
name : System.Address)
return int;
pragma Import (C, pthread_set_name_np, "pthread_set_name_np");
private
@ -692,6 +734,7 @@ private
-- #define sa_sigaction __funcptr._sigaction
type pid_t is new int;
Self_PID : constant pid_t := 0;
type time_t is new long;
@ -710,66 +753,15 @@ private
end record;
pragma Convention (C, struct_timeval);
type record_type_1 is null record;
pragma Convention (C, record_type_1);
type enumeral_type_3 is new int;
type pthread_attr_t is record
schedparam_policy : enumeral_type_3;
prio : int;
suspend : int;
flags : int;
arg_attr : System.Address;
cleanup_attr : System.Address;
stackaddr_attr : System.Address;
stacksize_attr : size_t;
end record;
pragma Convention (C, pthread_attr_t);
type enumeral_type_2 is new int;
type pthread_condattr_t is record
c_type : enumeral_type_2;
c_flags : long;
end record;
pragma Convention (C, pthread_condattr_t);
type enumeral_type_1 is new int;
type pthread_mutexattr_t is record
m_type : enumeral_type_1;
m_flags : long;
end record;
pragma Convention (C, pthread_mutexattr_t);
type record_type_3 is null record;
pragma Convention (C, record_type_3);
type pthread_t is access record_type_3;
type enumeral_type_4 is new int;
type pthread_queue_t is record
q_next : System.Address;
q_last : System.Address;
q_data : System.Address;
end record;
pragma Convention (C, pthread_queue_t);
type union_type_1 is new int;
type pthread_mutex_t is record
m_type : enumeral_type_4;
m_queue : pthread_queue_t;
m_owner : System.Address;
-- m_lock : long;
m_data : union_type_1;
m_flags : long;
end record;
pragma Convention (C, pthread_mutex_t);
type enumeral_type_5 is new int;
type pthread_cond_t is record
c_type : enumeral_type_5;
c_queue : pthread_queue_t;
-- c_lock : long;
c_data : System.Address;
c_flags : long;
end record;
pragma Convention (C, pthread_cond_t);
type pthread_key_t is new int;
type pthread_t is access record_type_1;
type pthread_attr_t is access record_type_1;
type pthread_mutex_t is access record_type_1;
type pthread_mutexattr_t is access record_type_1;
type pthread_cond_t is access record_type_1;
type pthread_condattr_t is access record_type_1;
type pthread_key_t is new int;
end System.OS_Interface;

File diff suppressed because it is too large Load diff

View file

@ -1,15 +1,14 @@
------------------------------------------------------------------------------
-- --
-- GNU ADA RUNTIME LIBRARY (GNARL) COMPONENTS --
-- GNU ADA RUN-TIME LIBRARY (GNARL) COMPONENTS --
-- --
-- S Y S T E M . T A S K _ P R I M I T I V E S --
-- --
-- S p e c --
-- (Version for new GNARL) --
-- --
-- $Revision: 1.1 $ --
-- $Revision: 1.1 $ --
-- --
-- Copyright (C) 1991,92,93,94,95,1996 Free Software Foundation, Inc. --
-- Copyright (C) 1991-1997, 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- --
@ -36,35 +35,7 @@
------------------------------------------------------------------------------
-- This is the FreeBSD PTHREADS version of this package. Contributed
-- by Daniel M. Eischen (deischen@iworks.InterWorks.org).
-- DO NOT EDIT this file.
-- It was automatically generated from another file by the m4 macro processor.
-- The name of the file you should edit is the same as this one, but with
-- ".ads" replaced by ".sm4", or
-- ".adb" replaced by ".bm4", or
-- ".c" replaced by ".cm4", or
-- ".dat" replaced by ".tm4"
-- Local options selected:
-- __TARGET = i386-unknown-freebsd
-- __ARCH = I386
-- __OS = FREEBSD
-- __HAS_SIGCONTEXT = 1
-- __HAS_UCONTEXT = 0
-- __THREADS = POSIX_THREADS
-- __THREAD_VARIANT = ??
-- __HAS_TIMESPEC = 1
-- __HAS_NANOSLEEP = 1
-- __HAS_CLOCK_GETTIME = 0
-- __HAS_GETTIMEOFDAY = 1
-- __POSIX_THREAD_PRIO_PROTECT = 0
-- __POSIX_THREAD_PRIO_INHERIT = 0
-- __POSIX_THREAD_ATTR_STACKADDR = 1
-- __POSIX_THREAD_ATTR_STACKSIZE = 1
-- __POSIX_THREAD_PRIORITY_SCHEDULING = 0
-- This package provides low-level support for most tasking features.
-- by Daniel M. Eischen (eischen@vigrid.com).
with Interfaces.C;
-- used for int
@ -99,6 +70,7 @@ private
type Lock is new System.OS_Interface.pthread_mutex_t;
type RTS_Lock is new System.OS_Interface.pthread_mutex_t;
type Private_Data is record
Thread : aliased System.OS_Interface.pthread_t;
pragma Atomic (Thread);
@ -107,30 +79,38 @@ private
-- They put the same value (thr_self value). We do not want to
-- use lock on those operations and the only thing we have to
-- make sure is that they are updated in atomic fashion.
CV : aliased System.OS_Interface.pthread_cond_t;
L : aliased RTS_Lock;
CV : aliased System.OS_Interface.pthread_cond_t;
L : aliased RTS_Lock;
-- protection for all components is lock L
Current_Priority : Interfaces.C.int := 0;
-- Active priority, except that the effects of protected object
-- priority ceilings are not reflected. This only reflects explicit
-- priority changes and priority inherited through task activation
-- and rendezvous.
--
-- Ada 95 notes: In Ada 95, this field will be transferred to the
-- Priority field of an Entry_Calls component when an entry call
-- is initiated. The Priority of the Entry_Calls component will not
-- change for the duration of the call. The accepting task can
-- use it to boost its own priority without fear of its changing in
-- the meantime.
--
-- This can safely be used in the priority ordering
-- of entry queues. Once a call is queued, its priority does not
-- change.
--
-- Since an entry call cannot be made while executing
-- a protected action, the priority of a task will never reflect a
-- priority ceiling change at the point of an entry call.
--
-- Protection: Only written by Self, and only accessed when Acceptor
-- accepts an entry or when Created activates, at which points Self is
-- suspended.
Stack_Size : Interfaces.c.size_t;
Stack_Size : Interfaces.C.size_t;
-- Requested stack size.
-- Protection: Only used by Self.
end record;

View file

@ -0,0 +1,538 @@
--- config/i386/freebsd.h.orig Sun Oct 19 09:31:05 1997
+++ config/i386/freebsd.h Tue Aug 11 14:28:56 1998
@@ -35,10 +35,21 @@
#include "i386/perform.h"
#undef CPP_PREDEFINES
-#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__ -D__386BSD__ -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+#define CPP_PREDEFINES "-Dunix -Di386 -D__FreeBSD__=2 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
+
+/* FreeBSD using a.out does not support DWARF2 unwinding mechanisms.
+ Thus, need the equivalent of "-fsjlj-exceptions" (use setjmp/longjmp
+ for exceptions). */
+#define DWARF2_UNWIND_INFO 0
+
+/* Provide a CPP_SPEC appropriate for OpenBSD. Current we just deal with
+ the GCC option `-posix'. */
+
+#undef CPP_SPEC
+#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
/* Like the default, except no -lg. */
-#define LIB_SPEC "%{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"
+#define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
@@ -54,8 +65,13 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE 16
+/* We have atexit(3). */
#define HAVE_ATEXIT
+/* We want gcc.c to call mktemp() for each file it generates. We would
+ prefer mkstemp(), but we will take what we get. XXX busted */
+/* #undef MKTEMP_EACH_FILE */
+
#undef ASM_APP_ON
#define ASM_APP_ON "#APP\n"
@@ -114,6 +130,7 @@
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
+#define SET_ASM_OP ".set"
/* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers
@@ -123,6 +140,16 @@
#define TYPE_OPERAND_FMT "@%s"
+/* Handle #pragma weak and #pragma pack. */
+
+#define HANDLE_SYSV_PRAGMA 1
+
+/* This is how we tell the assembler that a symbol is weak. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
+
/* Write the extra assembler code needed to declare a function's result.
Most svr4 assemblers don't require any special declaration of the
result value, but there are exceptions. */
@@ -131,9 +158,9 @@
#define ASM_DECLARE_RESULT(FILE, RESULT)
#endif
-/* These macros generate the special .type and .size directives which
+/* these macros generate the special .type and .size directives which
are used to set the corresponding fields of the linker symbol table
- entries in an ELF object file under SVR4. These macros also output
+ entries in an elf object file under svr4. these macros also output
the starting labels for the relevant functions/objects. */
/* Write the extra assembler code needed to declare a function properly.
@@ -185,6 +212,7 @@
&& DECL_INITIAL (DECL) == error_mark_node \
&& !size_directive_output) \
{ \
+ size_directive_output = 1; \
fprintf (FILE, "\t%s\t ", SIZE_ASM_OP); \
assemble_name (FILE, name); \
fprintf (FILE, ",%d\n", int_size_in_bytes (TREE_TYPE (DECL)));\
@@ -213,33 +241,57 @@
} \
} while (0)
+/* XXX - should ASM_SPEC be " %| %{fpic:-k} %{fPIC:-k -K}" ??? */
#define ASM_SPEC " %| %{fpic:-k} %{fPIC:-k}"
+
#define LINK_SPEC \
- "%{!nostdlib:%{!r*:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} %{assert*}"
+ "%{p:%e`-p' not supported; use `-pg' and gprof(1)} \
+ %{shared:-Bshareable} \
+ %{!shared:%{!nostdlib:%{!r:%{!e*:-e start}}} -dc -dp %{static:-Bstatic} \
+ %{pg:-Bstatic} %{Z}} \
+ %{assert*} %{R*}"
+
+#ifdef FROM_OPENBSD
+/* This defines which switch letters take arguments.
+ make -R /path/to/lib work the same as -R/path/to/lib */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+ (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
+ || (CHAR) == 'R')
+#endif
+
+#define STARTFILE_SPEC \
+ "%{shared:c++rt0.o%s} \
+ %{!shared:%{pg:gcrt0.o%s}%{!pg:%{static:scrt0.o%s}%{!static:crt0.o%s}}}"
-/* This is defined when gcc is compiled in the BSD-directory-tree, and must
- * make up for the gap to all the stuff done in the GNU-makefiles.
+#define MD_STARTFILE_PREFIX "/usr/lib/aout/"
+
+/* FREEBSD_NATIVE is defined when gcc is compiled in the BSD-directory-tree,
+ * and must make up for the gap to all the stuff done in the GNU-makefiles.
*/
#ifdef FREEBSD_NATIVE
-#define INCLUDE_DEFAULTS { \
- { "/usr/include", 0, 0, 0 }, \
- { "/usr/include/g++", "G++", 1, 1 }, \
- { 0, 0, 0, 0} \
- }
+#undef GCC_INCLUDE_DIR
+#define GCC_INCLUDE_DIR "/usr/include"
+
+#undef GPLUSPLUS_INCLUDE_DIR
+#define GPLUSPLUS_INCLUDE_DIR "/usr/include/g++"
+
+/* Look for the include files in the system-defined places. */
+
+#undef INCLUDE_DEFAULTS
+#define INCLUDE_DEFAULTS \
+ { \
+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, \
+ { GCC_INCLUDE_DIR, 0, 0, 0 }, \
+ { 0, 0, 0, 0 } \
+ }
#undef MD_EXEC_PREFIX
#define MD_EXEC_PREFIX "/usr/libexec/"
#undef STANDARD_STARTFILE_PREFIX
#define STANDARD_STARTFILE_PREFIX "/usr/lib"
-
-#if 0 /* This is very wrong!!! */
-#define DEFAULT_TARGET_MACHINE "i386-unknown-freebsd_1.0"
-#define GPLUSPLUS_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#define TOOL_INCLUDE_DIR "/usr/local/i386-unknown-freebsd_1.0/include"
-#define GCC_INCLUDE_DIR "/usr/local/lib/gcc-lib/i386-unknown-freebsd_1.0/2.5.8/include"
-#endif
#endif /* FREEBSD_NATIVE */
--- configure.orig Sat Feb 28 18:02:02 1998
+++ configure Tue Aug 11 13:51:17 1998
@@ -677,9 +677,9 @@
if test -z "$ac_aux_dir"; then
{ echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="/bin/sh $ac_aux_dir/config.guess"
+ac_config_sub="/bin/sh $ac_aux_dir/config.sub"
+ac_configure="/bin/sh $ac_aux_dir/configure" # This should be Cygnus configure.
# Do some error checking and defaulting for the host and target type.
@@ -2797,6 +2797,20 @@
a29k-*-*) # Default a29k environment.
use_collect2=yes
;;
+ alpha*-*-freebsd*)
+ tm_file=alpha/freebsd.h
+ # On FreeBSD, the headers are already ok, except for math.h. (??right??)
+ fixincludes=fixinc.math
+ fixincludes=fixinc.math
+ tmake_file=t-libc-ok
+ ;;
+ alpha-*-openbsd*)
+ tm_file=alpha/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
alpha*-*-linux-gnuecoff*)
tm_file="${tm_file} alpha/linux.h"
xm_file="${xm_file} alpha/xm-linux.h"
@@ -3158,6 +3172,14 @@
use_collect2=yes
fixincludes=Makefile.in
;;
+ hppa*-*-openbsd*)
+ target_cpu_default=1
+ tm_file="pa/pa-openbsd.h"
+ xm_file=pa/xm-openbsd.h
+ xmake_file=x-openbsd
+ use_collect2=yes
+ fixincludes=Makefile.in
+ ;;
i370-*-mvs*)
;;
i[34567]86-ibm-aix*) # IBM PS/2 running AIX
@@ -3277,6 +3299,13 @@
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
+ i[34567]86-*-openbsd*)
+ tm_file=i386/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
i[34567]86-*-coff*)
tm_file=i386/i386-coff.h
tmake_file=i386/t-i386bare
@@ -3964,6 +3993,13 @@
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
+ m68k-*-openbsd*)
+ tm_file=m68k/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
xm_file=m68k/xm-m68kv.h
xmake_file=m68k/x-m68kv
@@ -4273,6 +4309,20 @@
prefix=$native_prefix
fi
;;
+ mips*el-*-openbsd*) # MIPS running OpenBSD
+ tm_file=mips/openbsd-le.h
+ xmake_file=x-openbsd
+ tmake_file=t-libc-ok
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ ;;
+ mips*-*-openbsd*) # MIPS big-endian running OpenBSD
+ tm_file=mips/openbsd-be.h
+ xmake_file=x-openbsd
+ tmake_file=t-libc-ok
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ ;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file=mips/news4.h
if [ x$stabs = xyes ]; then
@@ -4612,6 +4662,13 @@
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
+ ns32k-*-openbsd*)
+ tm_file=ns32k/openbsd.h
+ tmake_file=t-libc-ok
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=x-openbsd
+ ;;
pdp11-*-bsd)
tm_file="${tm_file} pdp11/2bsd.h"
;;
@@ -4625,10 +4682,23 @@
romp-*-aos*)
use_collect2=yes
;;
+ romp-*-openbsd*)
+ tm_file=romp/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=romp/x-openbsd
+ ;;
romp-*-mach*)
xmake_file=romp/x-mach
use_collect2=yes
;;
+ powerpc-*-*bsd*)
+ tm_file=rs6000/openbsd.h
+ tmake_file=rs6000/t-openbsd
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=rs6000/x-openbsd
+ ;;
powerpc-*-sysv* | powerpc-*-elf*)
tm_file=rs6000/sysv4.h
xm_file=rs6000/xm-sysv4.h
@@ -4841,6 +4911,13 @@
fixincludes=fixinc.math
tmake_file=t-netbsd
;;
+ sparc-*-openbsd*)
+ tm_file=sparc/openbsd.h
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ tmake_file=t-libc-ok
+ xmake_file=x-openbsd
+ ;;
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
@@ -5009,6 +5086,14 @@
# On NetBSD, the headers are already okay, except for math.h.
fixincludes=fixinc.math
tmake_file=t-netbsd
+ float_format=vax
+ ;;
+ vax-*-openbsd*)
+ tm_file=vax/openbsd.h
+ tmake_file="t-libc-ok vax/t-openbsd"
+ # On OpenBSD, the headers are already okay.
+ fixincludes=Makefile.in
+ xmake_file=x-openbsd
float_format=vax
;;
vax-*-ultrix*) # vaxen running ultrix
--- choose-temp.c.orig Thu Dec 4 06:17:56 1997
+++ choose-temp.c Tue Aug 11 04:05:05 1998
@@ -107,12 +107,17 @@
base = try (getenv ("TMP"), base);
base = try (getenv ("TEMP"), base);
+#ifdef COMMENT_OUT /* XXX - P_tmpdir is not /tmp in 4.4BSD */
#ifdef P_tmpdir
base = try (P_tmpdir, base);
#endif
+#endif /* XXX */
/* Try /usr/tmp, then /tmp. */
+#ifdef COMMENT_OUT /* XXX - want /tmp used, peroid. Sometimes pkg_add can
+ create a /usr/tmp, so beware. */
base = try (usrtmp, base);
+#endif /* XXX */
base = try (tmp, base);
/* If all else fails, use the current directory! */
--- flags.h.orig Wed Dec 31 05:02:33 1997
+++ flags.h Tue Aug 11 13:31:22 1998
@@ -216,6 +216,20 @@
extern int flag_unroll_all_loops;
+/* Nonzero forces all invariant computations in loops to be moved
+ outside the loop. */
+
+extern int flag_move_all_movables;
+
+/* Nonzero forces all general induction variables in loops to be
+ strength reduced. */
+
+extern int flag_reduce_all_givs;
+
+/* Nonzero gets another run of loop_optimize performed. */
+
+extern int flag_rerun_loop_opt;
+
/* Nonzero for -fcse-follow-jumps:
have cse follow jumps to do a more extensive job. */
--- toplev.c.orig Wed Feb 25 18:04:46 1998
+++ toplev.c Tue Aug 11 14:40:22 1998
@@ -463,6 +463,20 @@
int flag_unroll_all_loops;
+/* Nonzero forces all invariant computations in loops to be moved
+ outside the loop. */
+
+int flag_move_all_movables = 0;
+
+/* Nonzero forces all general induction variables in loops to be
+ strength reduced. */
+
+int flag_reduce_all_givs = 0;
+
+/* Nonzero gets another run of loop_optimize performed. */
+
+int flag_rerun_loop_opt = 0;
+
/* Nonzero for -fwritable-strings:
store string constants in data segment and don't uniquize them. */
--- loop.c.orig Fri Feb 6 11:23:34 1998
+++ loop.c Tue Aug 11 16:57:35 1998
@@ -1637,6 +1637,7 @@
extra cost because something else was already moved. */
if (already_moved[regno]
+ || flag_move_all_movables
|| (threshold * savings * m->lifetime) >= insn_count
|| (m->forces && m->forces->done
&& n_times_used[m->forces->regno] == 1))
@@ -3911,7 +3912,7 @@
of such giv's whether or not we know they are used after the loop
exit. */
- if (v->lifetime * threshold * benefit < insn_count
+ if (!flag_reduce_all_givs && v->lifetime * threshold * benefit < insn_count
&& ! bl->reversed)
{
if (loop_dump_stream)
--- cp/lex.c.orig Wed Nov 26 12:13:20 1997
+++ cp/lex.c Tue Aug 11 13:37:17 1998
@@ -3329,6 +3329,14 @@
token_buffer[0] = '^';
token_buffer[1] = 0;
}
+ else if (ptr->token == NAMESPACE)
+ {
+ static int warned;
+ if (! warned)
+ warning ("namespaces are mostly broken in this version of g++");
+
+ warned = 1;
+ }
value = (int) ptr->token;
}
--- gcc.1.orig Tue Feb 17 10:44:00 1998
+++ gcc.1 Tue Aug 11 13:30:01 1998
@@ -182,7 +182,7 @@
\-Waggregate\-return
\-Wcast\-align
\-Wcast\-qual
-\-Wchar\-subscript
+\-Wchar\-subscripts
\-Wcomment
\-Wconversion
\-Wenum\-clash
--- invoke.texi.orig Tue Feb 17 10:54:05 1998
+++ invoke.texi Tue Aug 11 13:29:38 1998
@@ -115,7 +115,7 @@
@smallexample
-fsyntax-only -pedantic -pedantic-errors
-w -W -Wall -Waggregate-return -Wbad-function-cast
--Wcast-align -Wcast-qual -Wchar-subscript -Wcomment
+-Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment
-Wconversion -Werror -Wformat
-Wid-clash-@var{len} -Wimplicit -Wimplicit-int
-Wimplicit-function-declarations -Wimport -Winline
@@ -153,6 +153,7 @@
-frerun-cse-after-loop -fschedule-insns
-fschedule-insns2 -fstrength-reduce -fthread-jumps
-funroll-all-loops -funroll-loops
+-fmove-all-movables -freduce-all-givs -frerun-loop-opt
-O -O0 -O1 -O2 -O3
@end smallexample
@@ -2284,6 +2285,47 @@
Perform the optimization of loop unrolling. This is done for all loops
and usually makes programs run more slowly. @samp{-funroll-all-loops}
implies @samp{-fstrength-reduce} as well as @samp{-frerun-cse-after-loop}.
+
+@item -fmove-all-movables
+Forces all invariant computations in loops to be moved
+outside the loop.
+This option is provided primarily to improve performance
+for some Fortran code, though it might improve code written
+in other languages.
+
+@emph{Note:} When compiling programs written in Fortran,
+this option is enabled by default.
+
+Analysis of Fortran code optimization and the resulting
+optimizations triggered by this option, and the
+@samp{-freduce-all-givs} and @samp{-frerun-loop-opt}
+options as well, were
+contributed by Toon Moene (@code{toon@@moene.indiv.nluug.nl}).
+
+Please let us (@code{fortran@@gnu.ai.mit.edu})
+know how use of these options affects
+the performance of your production code.
+We're very interested in code that runs @emph{slower}
+when these options are @emph{enabled}.
+
+@item -freduce-all-givs
+Forces all general-induction variables in loops to be
+strength-reduced.
+This option is provided primarily to improve performance
+for some Fortran code, though it might improve code written
+in other languages.
+
+@emph{Note:} When compiling programs written in Fortran,
+this option is enabled by default.
+
+@item -frerun-loop-opt
+Runs loop optimizations a second time.
+This option is provided primarily to improve performance
+for some Fortran code, though it might improve code written
+in other languages.
+
+@emph{Note:} When compiling programs written in Fortran,
+this option is enabled by default.
@item -fno-peephole
Disable any machine-specific peephole optimizations.
--- config/alpha/alpha.c.orig Fri Feb 6 17:23:50 1998
+++ config/alpha/alpha.c Tue Aug 11 04:06:42 1998
@@ -1843,7 +1843,7 @@
/* Write a version stamp. Don't write anything if we are running as a
cross-compiler. Otherwise, use the versions in /usr/include/stamp.h. */
-#if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__linux__) && !defined(VMS)
+#if !defined(CROSS_COMPILE) && !defined(_WIN32) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__linux__) && !defined(VMS)
#include <stamp.h>
#endif
--- ginclude/stdarg.h.orig Sat Oct 18 10:26:07 1997
+++ ginclude/stdarg.h Tue Aug 11 13:27:03 1998
@@ -64,7 +64,7 @@
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
-#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__)
+#if defined(__svr4__) || defined(_AIX) || defined(_M_UNIX) || defined(__NetBSD__) || defined(__OpenBSD__)
typedef char *__gnuc_va_list;
#else
typedef void *__gnuc_va_list;
--- ginclude/stddef.h.orig Mon Oct 28 04:35:28 1996
+++ ginclude/stddef.h Tue Aug 11 13:26:05 1998
@@ -24,7 +24,7 @@
/* On 4.3bsd-net2, make sure ansi.h is included, so we have
one less case to deal with in the following. */
-#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__)
+#if defined (__BSD_NET2__) || defined (____386BSD____) || defined (__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__)
#include <machine/ansi.h>
#endif

View file

@ -1,141 +1,36 @@
diff -c orig/Makefile.in gcc/Makefile.in
*** orig/Makefile.in Thu Mar 27 17:32:15 1997
--- gcc-2.7.2.1/Makefile.in Fri Apr 4 19:55:09 1997
*** ./Makefile.in.orig Wed Jun 23 02:34:31 1999
--- ./Makefile.in Wed Jun 23 02:35:29 1999
***************
*** 189,200 ****
local_prefix = /usr/local
# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)
# Directory in which to put the executable for the command `gcc'
bindir = $(exec_prefix)/bin
# Directory in which to put the directories used by the compiler.
libdir = $(exec_prefix)/lib
# Directory in which the compiler finds executables, libraries, etc.
! libsubdir = $(libdir)/gcc-lib/$(target)/$(version)
# Directory in which the compiler finds g++ includes.
gxx_include_dir= $(libdir)/g++-include
# Directory to search for site-specific includes.
--- 189,202 ----
local_prefix = /usr/local
# Directory in which to put host dependent programs and libraries
exec_prefix = $(prefix)
+ # directory to hold compilers
+ compdir = $(prefix)/libexec/ada
# Directory in which to put the executable for the command `gcc'
bindir = $(exec_prefix)/bin
# Directory in which to put the directories used by the compiler.
libdir = $(exec_prefix)/lib
# Directory in which the compiler finds executables, libraries, etc.
! libsubdir = $(libdir)
# Directory in which the compiler finds g++ includes.
gxx_include_dir= $(libdir)/g++-include
# Directory to search for site-specific includes.
*** 152,158 ****
ENQUIRE_LDFLAGS = $(LDFLAGS)
# Sed command to transform gcc to installed name. Overwritten by configure.
! program_transform_name = -e s,x,x,
program_transform_cross_name = -e s,^,$(target_alias)-,
# Tools to use when building a cross-compiler.
--- 152,158 ----
ENQUIRE_LDFLAGS = $(LDFLAGS)
# Sed command to transform gcc to installed name. Overwritten by configure.
! program_transform_name = -e s,^,ada,
program_transform_cross_name = -e s,^,$(target_alias)-,
# Tools to use when building a cross-compiler.
***************
*** 213,219 ****
mandir = $(prefix)/man/man1
# Directory in which to find other cross-compilation tools and headers.
# Used in install-cross.
! tooldir = $(exec_prefix)/$(target)
# Dir for temp files.
tmpdir = /tmp
*** 2151,2157 ****
# Install the driver last so that the window when things are
# broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
! install-man install-info lang.install-normal install-driver
--- 215,221 ----
mandir = $(prefix)/man/man1
# Directory in which to find other cross-compilation tools and headers.
# Used in install-cross.
! tooldir = $(exec_prefix)
# Dir for temp files.
tmpdir = /tmp
# Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete
--- 2151,2157 ----
# Install the driver last so that the window when things are
# broken is small.
install-normal: install-common $(INSTALL_HEADERS) $(INSTALL_LIBGCC) \
! install-man lang.install-normal install-driver
***************
*** 1141,1148 ****
gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
-DDEFAULT_TARGET_VERSION=\"$(version)\" \
-DDEFAULT_TARGET_MACHINE=\"$(target)\" \
-DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
--- 1143,1152 ----
gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(lang_specs_files)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ -DFREEBSD_NATIVE \
+ -DFREEBSD_PREFIX=\"$(prefix)\" \
-DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
! -DSTANDARD_EXEC_PREFIX=\"$(libdir)/\" \
-DDEFAULT_TARGET_VERSION=\"$(version)\" \
-DDEFAULT_TARGET_MACHINE=\"$(target)\" \
-DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
***************
*** 2055,2069 ****
# Create the installation directory.
install-dir:
-if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
- -if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
# This dir isn't currently searched by cpp.
# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
! -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
! -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi
! -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
-if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
-if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
# We don't use mkdir -p to create the parents of mandir,
--- 2059,2073 ----
# Create the installation directory.
install-dir:
-if [ -d $(libdir) ] ; then true ; else mkdir $(libdir) ; chmod a+rx $(libdir) ; fi
# This dir isn't currently searched by cpp.
# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
! # -if [ -d $(libdir)/gcc-lib/$(target) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target) ; chmod a+rx $(libdir)/gcc-lib/$(target) ; fi
! # -if [ -d $(libdir)/gcc-lib/$(target)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version) ; fi
! # -if [ -d $(libdir)/gcc-lib/$(target)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target)/$(version)/include ; fi
-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; fi
+ -if [ -d $(compdir) ] ; then true ; else mkdir $(compdir) ; chmod a+rx $(compdir) ; fi
-if [ -d $(assertdir) ] ; then true ; else mkdir $(assertdir) ; chmod a+rx $(assertdir) ; fi
-if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; chmod a+rx $(infodir) ; fi
# We don't use mkdir -p to create the parents of mandir,
***************
*** 2077,2084 ****
install-common: native install-dir $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
! rm -f $(libsubdir)/$$file; \
! $(INSTALL_PROGRAM) $$file $(libsubdir)/$$file; \
else true; \
fi; \
done
--- 2081,2088 ----
install-common: native install-dir $(EXTRA_PARTS) lang.install-common
for file in $(COMPILERS); do \
if [ -f $$file ] ; then \
! rm -f $(compdir)/$$file; \
! $(INSTALL_PROGRAM) $$file $(compdir)/$$file; \
else true; \
fi; \
done
***************
*** 2110,2117 ****
$(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
chmod a-x $(libsubdir)/SYSCALLS.c.X; \
fi
! -rm -f $(libsubdir)/cpp$(exeext)
! $(INSTALL_PROGRAM) cpp$(exeext) $(libsubdir)/cpp$(exeext)
# Install the driver program as $(target)-gcc
# and also as either gcc (if native) or $(tooldir)/bin/gcc.
--- 2114,2121 ----
$(INSTALL_DATA) SYSCALLS.c.X $(libsubdir)/SYSCALLS.c.X; \
chmod a-x $(libsubdir)/SYSCALLS.c.X; \
fi
! -rm -f $(compdir)/cpp$(exeext)
! $(INSTALL_PROGRAM) cpp$(exeext) $(compdir)/cpp$(exeext)
# Install the driver program as $(target)-gcc
# and also as either gcc (if native) or $(tooldir)/bin/gcc.
# Do nothing while making gcc with a cross-compiler. The person who
# makes gcc for the target machine has to know how to put a complete

View file

@ -1,36 +1,62 @@
diff -c orig/gcc.c gcc/gcc.c
*** orig/gcc.c Thu Apr 3 08:37:06 1997
--- gcc-2.7.2.1/gcc.c Fri Apr 4 23:21:00 1997
*** ./config/i386/freebsd.h.orig Fri Sep 4 23:57:29 1998
--- ./config/i386/freebsd.h Fri Sep 4 23:58:54 1998
***************
*** 1354,1362 ****
#undef MD_STARTFILE_PREFIX_1
#endif
*** 49,55 ****
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
! #ifndef STANDARD_EXEC_PREFIX
! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
! #endif /* !defined STANDARD_EXEC_PREFIX */
/* Like the default, except no -lg. */
! #define LIB_SPEC "%{!shared:%{!pg:-lc}%{pg:-lc_p}}"
static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
--- 1354,1360 ----
#undef MD_STARTFILE_PREFIX_1
#endif
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
--- 49,55 ----
#define CPP_SPEC "%{posix:-D_POSIX_SOURCE}"
! #define STANDARD_EXEC_PREFIX FREEBSD_PREFIX "/libexec/"
/* Like the default, except no -lg. */
! #define LIB_SPEC "%{!shared:%{!pg:%{!pthread:%{!kthread:-lc}%{kthread:-lpthread -lc}}%{pthread:-lc_r}}%{pg:%{!pthread:%{!kthread:-lc_p}%{kthread:-lpthread_p -lc_p}}%{pthread:-lc_r_p}}}"
static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
#undef SIZE_TYPE
#define SIZE_TYPE "unsigned int"
*** ./config/i386/freebsd-elf.h.orig Fri Dec 5 07:15:34 1997
--- ./config/i386/freebsd-elf.h Fri Feb 12 21:35:52 1999
***************
*** 2708,2715 ****
--- 2706,2716 ----
/* Use 2 as fourth arg meaning try just the machine as a suffix,
as well as trying the machine and the version. */
#ifdef FREEBSD_NATIVE
+ add_prefix (&exec_prefixes, FREEBSD_PREFIX "/libexec/ada/", 0, 0, NULL_PTR);
+ add_prefix (&exec_prefixes, FREEBSD_PREFIX "/libexec/", 0, 0, NULL_PTR);
add_prefix (&exec_prefixes, "/usr/libexec/", 0, 0, NULL_PTR);
add_prefix (&exec_prefixes, "/usr/bin/", 0, 0, NULL_PTR);
+ add_prefix (&startfile_prefixes, FREEBSD_PREFIX "/lib/", 0, 0, NULL_PTR);
add_prefix (&startfile_prefixes, "/usr/libdata/gcc/", 0, 0, NULL_PTR);
#else /* not FREEBSD_NATIVE */
#ifndef OS2
*** 140,146 ****
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Dunix -D__ELF__ -D__FreeBSD__=2 -Asystem(FreeBSD)"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
--- 140,146 ----
#define WCHAR_TYPE_SIZE BITS_PER_WORD
#undef CPP_PREDEFINES
! #define CPP_PREDEFINES "-Di386 -Dunix -D__ELF__ -D__FreeBSD__=3 -Asystem(FreeBSD) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386)"
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %[cpp_cpu] %{fPIC:-D__PIC__ -D__pic__} %{fpic:-D__PIC__ -D__pic__} %{posix:-D_POSIX_SOURCE}"
***************
*** 152,159 ****
* -lc_p or -ggdb to LDFLAGS at the link time, respectively.
*/
#define LIB_SPEC \
! "%{!shared: %{mieee-fp:-lieee} %{p:-lgmon} %{pg:-lgmon} \
! %{!ggdb:-lc} %{ggdb:-lg}}"
#else
#define LIB_SPEC \
"%{!shared: \
--- 152,164 ----
* -lc_p or -ggdb to LDFLAGS at the link time, respectively.
*/
#define LIB_SPEC \
! "%{!shared: \
! %{!pg: \
! %{!pthread: %{!kthread:-lc} %{kthread:-lpthread -lc}} \
! %{pthread:-lc_r}} \
! %{pg: \
! %{!pthread: %{!kthread:-lc_p} %{kthread:-lpthread_p -lc_p}} \
! %{pthread:-lc_r_p}}}"
#else
#define LIB_SPEC \
"%{!shared: \

View file

@ -1,32 +1,24 @@
*** gcc-2.7.2.1/ada/Makefile.in.orig Sun Nov 16 09:10:32 1997
--- gcc-2.7.2.1/ada/Makefile.in Sun Nov 16 09:14:37 1997
*** ./ada/Makefile.in.orig Wed Jul 29 21:00:07 1998
--- ./ada/Makefile.in Mon Aug 31 09:16:59 1998
***************
*** 815,820 ****
--- 815,821 ----
fsu* | FSU*) letter=l;;\
native | *) letter=i;;\
esac;;\
+ *86*-freebsd*) letter=f ;;\
mips-sgi-irix*) letter=g ;;\
hppa*-hp-hpux*) letter=h ;;\
*-ibm-aix4*) letter=c ;;\
***************
*** 865,870 ****
--- 866,872 ----
*-*-rtems* | *-rtems* |\
*-go32-msdos | *-go32 |\
*86*-linux* |\
+ *86*-freebsd* |\
mips-sni-* |\
*) \
\
***************
*** 920,925 ****
--- 922,928 ----
*-*-rtems* | *-rtems* |\
*-go32-msdos | *-go32 |\
*86*-linux* |\
+ *86*-freebsd* |\
mips-sni-* |\
*-*-cygwin32* |\
*-*-mingw32* |\
*** 779,784 ****
--- 779,797 ----
endif
endif
+ ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
+ LIBGNAT_TARGET_PAIRS = \
+ a-intnam.ads<4fintnam.ads \
+ s-inmaop.adb<7sinmaop.adb \
+ s-intman.adb<5fintman.adb \
+ s-osinte.adb<5fosinte.adb \
+ s-osinte.ads<5fosinte.ads \
+ s-osprim.adb<7sosprim.adb \
+ s-taprop.adb<5ftaprop.adb \
+ s-taspri.ads<5ftaspri.ads \
+ s-tpopsp.adb<7stpopsp.adb
+ endif
+
ifeq ($(strip $(filter-out mips sgi irix%,$(targ))),)
LIBGNAT_TARGET_PAIRS = \
a-emstop.adb<4gemstop.adb \

View file

@ -1,36 +1,19 @@
*** gcc-2.7.2.1/ada/make.adb.orig Thu Aug 14 00:02:45 1997
--- gcc-2.7.2.1/ada/make.adb Sun Nov 16 09:18:18 1997
*** ./ada/make.adb.orig Wed Jul 29 21:01:09 1998
--- ./ada/make.adb Tue Sep 1 00:24:06 1998
***************
*** 201,207 ****
*** 202,208 ****
-- Compiler, Binder & Linker Data and Subprograms --
----------------------------------------------------
! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gcc");
Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
--- 201,207 ----
! Gcc : String_Access := Program_Name ("gcc");
Gnatbind : String_Access := Program_Name ("gnatbind");
Gnatlink : String_Access := Program_Name ("gnatlink");
-- Default compiler, binder, linker programs
--- 202,208 ----
-- Compiler, Binder & Linker Data and Subprograms --
----------------------------------------------------
! Gcc : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("adagcc");
Gnatbind : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatbind");
Gnatlink : String_Access := GNAT.OS_Lib.Locate_Exec_On_Path ("gnatlink");
***************
*** 941,947 ****
Comp_Last := Comp_Last + 1;
Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
! Display ("gcc", Comp_Args (Args'First .. Comp_Last));
return
GNAT.OS_Lib.Non_Blocking_Spawn
--- 941,947 ----
Comp_Last := Comp_Last + 1;
Comp_Args (Comp_Last) := new String'(Name_Buffer (1 .. Name_Len));
! Display ("adagcc", Comp_Args (Args'First .. Comp_Last));
return
GNAT.OS_Lib.Non_Blocking_Spawn
! Gcc : String_Access := Program_Name ("adagcc");
Gnatbind : String_Access := Program_Name ("gnatbind");
Gnatlink : String_Access := Program_Name ("gnatlink");
-- Default compiler, binder, linker programs

View file

@ -1,19 +1,19 @@
*** gcc-2.7.2.1/ada/gnatcmd.adb.orig Thu Aug 14 00:02:49 1997
--- gcc-2.7.2.1/ada/gnatcmd.adb Sun Nov 16 09:23:23 1997
*** ./ada/gnatcmd.adb.orig Wed Jul 29 21:01:07 1998
--- ./ada/gnatcmd.adb Tue Sep 1 00:25:06 1998
***************
*** 987,993 ****
*** 988,994 ****
(Cname => new S'("COMPILE"),
Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
! Unixcmd => new S'("gcc -c"),
Usage => new S'("GNAT COMPILE filespec[,...] /qualifiers"),
! Unixcmd => new S'("gcc -c -x ada"),
Switches => GCC_Switches'Access,
Minfile => 1,
Maxfile => 0,
--- 987,993 ----
Params => new Parameter_Array'(1 => FILES_OR_WILDCARD),
Defext => " "),
--- 988,994 ----
(Cname => new S'("COMPILE"),
Usage => new S'("GNAT COMPILE file file .. file /qualifiers"),
! Unixcmd => new S'("adagcc -c"),
Usage => new S'("GNAT COMPILE filespec[,...] /qualifiers"),
! Unixcmd => new S'("adagcc -c -x ada"),
Switches => GCC_Switches'Access,
Minfile => 1,
Maxfile => 0,
Params => new Parameter_Array'(1 => FILES_OR_WILDCARD),
Defext => " "),

View file

@ -1,37 +1,19 @@
*** gcc-2.7.2.1/ada/gnatlink.adb.orig Sun Nov 16 09:24:27 1997
--- gcc-2.7.2.1/ada/gnatlink.adb Sun Nov 16 09:25:18 1997
*** ./ada/gnatlink.adb.orig Wed Jul 29 21:01:08 1998
--- ./ada/gnatlink.adb Tue Sep 1 00:26:17 1998
***************
*** 63,69 ****
*** 73,79 ****
Table_Increment => 100,
Table_Name => "Gnatlink.Binder_Options");
! Gcc : constant String := "gcc";
! Gcc : String_Access := Program_Name ("gcc");
Read_Mode : constant String := "r" & Ascii.Nul;
Write_Mode : constant String := "w" & Ascii.Nul;
--- 63,69 ----
--- 73,79 ----
Table_Increment => 100,
Table_Name => "Gnatlink.Binder_Options");
! Gcc : constant String := "adagcc";
! Gcc : String_Access := Program_Name ("adagcc");
Read_Mode : constant String := "r" & Ascii.Nul;
Write_Mode : constant String := "w" & Ascii.Nul;
***************
*** 424,430 ****
Write_Eol;
Write_Str (" [-v] -- verbose mode");
Write_Eol;
! Write_Str (" [-gnatlink name] -- full name for the linker (gcc)");
Write_Eol;
Write_Str (" [list of objects] -- non Ada binaries");
Write_Eol;
--- 424,431 ----
Write_Eol;
Write_Str (" [-v] -- verbose mode");
Write_Eol;
! Write_Str (" [-gnatlink name] -- full name for the linker " &
! "(adagcc)");
Write_Eol;
Write_Str (" [list of objects] -- non Ada binaries");
Write_Eol;

View file

@ -1 +1 @@
The GNU Ada Translator.
The GNU Ada Compiler system.

View file

@ -1,7 +1,7 @@
The GNU ada compiler Gnat 3.09 built on GCC 2.7.2.1.
The GNU Ada compiler system (GNAT 3.11p) built on GCC 2.8.1.
The libraries supplied with this version of GNAT support tasking if
minor modifications are made to FreeBSD's libc_r.
The libraries supplied with this version of GNAT support tasking
with FreeBSD 2.2.6+, 3.x, and 4.x versions of libc_r.
Maurice Castro
maurice@serc.rmit.edu.au
Daniel Eischen
eischen@vigrid.com

File diff suppressed because it is too large Load diff