Commit 139f0d1e by Arnaud Charlet Committed by Arnaud Charlet

Makefile.in, [...]: Remove build of gnat_wrapper and gnatpsta, no longer needed.

	* Makefile.in, Make-lang.in: Remove build of gnat_wrapper and gnatpsta,
	no longer needed.

	* gnatpsta.adb, gnat_wrapper.adb: Removed, no longer needed.

	* sysdep.c: Add handling of cygwin.

From-SVN: r73412
parent f3e4c05c
2003-11-10 Arnaud Charlet <charlet@act-europe.fr>
* Makefile.in, Make-lang.in: Remove build of gnat_wrapper and gnatpsta,
no longer needed.
* gnatpsta.adb, gnat_wrapper.adb: Removed, no longer needed.
* sysdep.c: Add handling of cygwin.
2003-11-10 GNAT Script <nobody@gnat.com> 2003-11-10 GNAT Script <nobody@gnat.com>
* Make-lang.in: Makefile automatically updated * Make-lang.in: Makefile automatically updated
......
...@@ -403,10 +403,6 @@ ada.all.cross: ...@@ -403,10 +403,6 @@ ada.all.cross:
then \ then \
$(MV) gnatprep$(exeext) gnatprep-cross$(exeext); \ $(MV) gnatprep$(exeext) gnatprep-cross$(exeext); \
fi fi
-if [ -f gnatpsta$(exeext) ] ; \
then \
$(MV) gnatpsta$(exeext) gnatpsta-cross$(exeext); \
fi
-if [ -f gnatxref$(exeext) ] ; \ -if [ -f gnatxref$(exeext) ] ; \
then \ then \
$(MV) gnatxref$(exeext) gnatxref-cross$(exeext); \ $(MV) gnatxref$(exeext) gnatxref-cross$(exeext); \
...@@ -711,21 +707,6 @@ ada.install-common: ...@@ -711,21 +707,6 @@ ada.install-common:
fi fi
-if [ -f gnat1$(exeext) ] ; \ -if [ -f gnat1$(exeext) ] ; \
then \ then \
if [ -f gnatpsta-cross$(exeext) ] ; \
then \
$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatpsta$(exeext); \
$(INSTALL_PROGRAM) gnatpsta-cross$(exeext) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatpsta$(exeext); \
if [ -d $(DESTDIR)$(tooldir)/bin/. ] ; then \
rm -f $(DESTDIR)$(tooldir)/bin/gnatpsta$(exeext); \
$(INSTALL_PROGRAM) gnatpsta-cross$(exeext) $(DESTDIR)$(tooldir)/bin/gnatpsta$(exeext); \
fi; \
else \
$(RM) $(DESTDIR)$(bindir)/gnatpsta$(exeext); \
$(INSTALL_PROGRAM) gnatpsta$(exeext) $(DESTDIR)$(bindir)/gnatpsta$(exeext); \
fi ; \
fi
-if [ -f gnat1$(exeext) ] ; \
then \
if [ -f gnatxref-cross$(exeext) ] ; \ if [ -f gnatxref-cross$(exeext) ] ; \
then \ then \
$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext); \ $(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext); \
...@@ -857,7 +838,6 @@ ada.uninstall: ...@@ -857,7 +838,6 @@ ada.uninstall:
-$(RM) $(DESTDIR)$(bindir)/gnatmem$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatmem$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatname$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatname$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatprep$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatprep$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatpsta$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatxref$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatxref$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatclean$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatclean$(exeext)
-$(RM) $(DESTDIR)$(bindir)/gnatsym$(exeext) -$(RM) $(DESTDIR)$(bindir)/gnatsym$(exeext)
...@@ -875,7 +855,6 @@ ada.uninstall: ...@@ -875,7 +855,6 @@ ada.uninstall:
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatmem$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatmem$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatname$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatname$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatprep$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatprep$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatpsta$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatxref$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatclean$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatclean$(exeext)
-$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatsym$(exeext) -$(RM) $(DESTDIR)$(bindir)/$(target_noncanonical)-gnatsym$(exeext)
...@@ -893,7 +872,6 @@ ada.uninstall: ...@@ -893,7 +872,6 @@ ada.uninstall:
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatmem$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatmem$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatname$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatname$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatprep$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatprep$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatpsta$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatxref$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatxref$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatclean$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatclean$(exeext)
-$(RM) $(DESTDIR)$(tooldir)/bin/gnatsym$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/gnatsym$(exeext)
...@@ -923,7 +901,6 @@ ada.distclean: ...@@ -923,7 +901,6 @@ ada.distclean:
-$(RM) gnatmem$(exeext) -$(RM) gnatmem$(exeext)
-$(RM) gnatname$(exeext) -$(RM) gnatname$(exeext)
-$(RM) gnatprep$(exeext) -$(RM) gnatprep$(exeext)
-$(RM) gnatpsta$(exeext)
-$(RM) gnatfind$(exeext) -$(RM) gnatfind$(exeext)
-$(RM) gnatxref$(exeext) -$(RM) gnatxref$(exeext)
-$(RM) gnatclean$(exeext) -$(RM) gnatclean$(exeext)
......
...@@ -1320,7 +1320,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),) ...@@ -1320,7 +1320,6 @@ ifeq ($(strip $(filter-out cygwin32% mingw32% pe,$(osys))),)
GMEM_LIB = gmemlib GMEM_LIB = gmemlib
PREFIX_OBJS = $(PREFIX_REAL_OBJS) PREFIX_OBJS = $(PREFIX_REAL_OBJS)
EXTRA_GNATTOOLS = ../../gnatdll$(exeext) EXTRA_GNATTOOLS = ../../gnatdll$(exeext)
GNAT_WRAPPER_TOOL = ../../gnat_wrapper$(exeext)
EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o EXTRA_GNATMAKE_OBJS = mdll.o mdll-utl.o mdll-fil.o
EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
soext = .dll soext = .dll
...@@ -1660,11 +1659,10 @@ gnattools2: ../stamp-tools ...@@ -1660,11 +1659,10 @@ gnattools2: ../stamp-tools
TOOLSCASE=native \ TOOLSCASE=native \
../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \ ../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
../../gnatls$(exeext) ../../gnatprep$(exeext) \ ../../gnatls$(exeext) ../../gnatprep$(exeext) \
../../gnatpsta$(exeext) ../../gnatxref$(exeext) \ ../../gnatxref$(exeext) \
../../gnatfind$(exeext) ../../gnatname$(exeext) \ ../../gnatfind$(exeext) ../../gnatname$(exeext) \
../../gnatclean$(exeext) \ ../../gnatclean$(exeext) \
../../gprcmd$(exeext) ../../gpr2make$(exeext) \ ../../gprcmd$(exeext) ../../gpr2make$(exeext)
$(GNAT_WRAPPER_TOOL)
# These tools are only built for the native version. # These tools are only built for the native version.
gnattools3: ../stamp-tools gnattools3: ../stamp-tools
...@@ -1717,12 +1715,6 @@ gnattools4: ../stamp-tools ...@@ -1717,12 +1715,6 @@ gnattools4: ../stamp-tools
$(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \ $(GNATLINK) -v gnatprep -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
$(TOOLS_LIBS) $(TOOLS_LIBS)
../../gnatpsta$(exeext): deftarg.o ../stamp-tools
# $(GNATMAKE) -c $(ADA_INCLUDES) gnatpsta --GCC="$(CC) $(ALL_ADAFLAGS)"
# $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatpsta
# $(GNATLINK) -v gnatpsta -o $@ --GCC="$(CC) $(ADA_INCLUDES)"\
# ../targtyps.o deftarg.o $(TOOLS_LIBS)
../../gnatxref$(exeext): ../stamp-tools ../../gnatxref$(exeext): ../stamp-tools
$(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)" $(GNATMAKE) -c $(ADA_INCLUDES) gnatxref --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatxref
...@@ -1761,12 +1753,6 @@ endif ...@@ -1761,12 +1753,6 @@ endif
$(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \ $(GNATLINK) -v gnatdll -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
$(TOOLS_LIBS) $(TOOLS_LIBS)
../../gnat_wrapper$(exeext): ../stamp-tools
$(GNATMAKE) -c -O2 -gnatpn $(ADA_INCLUDES) gnat_wrapper --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnat_wrapper
$(GNATLINK) -v gnat_wrapper -o $@ --GCC="$(CC) $(ADA_INCLUDES)" \
$(TOOLS_LIBS)
../../gprcmd$(exeext): ../stamp-tools ../../gprcmd$(exeext): ../stamp-tools
$(GNATMAKE) -c $(ADA_INCLUDES) gprcmd --GCC="$(CC) $(ALL_ADAFLAGS)" $(GNATMAKE) -c $(ADA_INCLUDES) gprcmd --GCC="$(CC) $(ALL_ADAFLAGS)"
$(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprcmd $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gprcmd
......
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T _ W R A P P E R --
-- --
-- B o d y --
-- --
-- Copyright (C) 2002-2003 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- GNAT_Wrapper is to be used as the starter program for most of the GNAT
-- executables. It sets up the working environment variables and calls the
-- real executable which is to be found under the 'real' sub-directory.
--
-- This avoids using the registry on Windows which is tricky to setup to run
-- multiple compilers (GNAT Pro release and wavefronts for example) at the
-- same time.
with Ada.Command_Line; use Ada.Command_Line;
with GNAT.OS_Lib; use GNAT.OS_Lib;
procedure GNAT_Wrapper is
DS : Character renames Directory_Separator;
PS : Character renames Path_Separator;
procedure Split_Command;
-- Parse Actual_Name and set K and L variables (see below).
Actual_Name : String_Access := new String'(Command_Name);
K : Natural;
-- Index of the directory separator just before program name's first
-- character.
L : Natural;
-- Index of the last character of the GNATPRO install directory.
LD_LIBRARY_PATH : String_Access := Getenv ("LD_LIBRARY_PATH");
PATH : String_Access := Getenv ("PATH");
-------------------
-- Split_Command --
-------------------
procedure Split_Command is
begin
K := Actual_Name'Last;
loop
exit when K = 0
or else Actual_Name (K) = '\' or else Actual_Name (K) = '/';
K := K - 1;
end loop;
end Split_Command;
begin
Split_Command;
if K = 0 then
-- No path information found, locate the program on the path.
declare
Old : String_Access := Actual_Name;
begin
Actual_Name := Locate_Exec_On_Path (Actual_Name.all);
Free (Old);
Split_Command;
end;
end if;
-- Skip 'bin' from directory above. GNAT binaries are always under
-- <gnatpro>/bin directory.
L := K - 4;
declare
Prog : constant String := Actual_Name (K + 1 .. Actual_Name'Last);
Dir : constant String := Actual_Name (Actual_Name'First .. L - 1);
Real : constant String := Dir & DS & ".bin";
Bin : constant String := Dir & DS & "bin";
Args : Argument_List (1 .. Argument_Count);
Result : Integer;
begin
Setenv ("GCC_ROOT", Dir);
Setenv ("GNAT_ROOT", Dir);
Setenv ("BINUTILS_ROOT", Dir);
Setenv ("LD_LIBRARY_PATH", Dir & DS & "lib" & PS & LD_LIBRARY_PATH.all);
Setenv ("PATH", Real & PS & Bin & PS & PATH.all);
-- Call the right executable under "<dir>/.bin"
for K in 1 .. Argument_Count loop
Args (K) := new String'(Argument (K));
end loop;
Normalize_Arguments (Args);
Result := Spawn (Real & DS & Prog, Args);
for K in 1 .. Argument_Count loop
Free (Args (K));
end loop;
OS_Exit (Result);
end;
end GNAT_Wrapper;
...@@ -290,7 +290,8 @@ __gnat_ttyname (int filedes) ...@@ -290,7 +290,8 @@ __gnat_ttyname (int filedes)
#if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \ #if defined (linux) || defined (sun) || defined (sgi) || defined (__EMX__) \
|| (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \ || (defined (__osf__) && ! defined (__alpha_vxworks)) || defined (WINNT) \
|| defined (__MACHTEN__) || defined (hpux) || defined (_AIX) \ || defined (__MACHTEN__) || defined (hpux) || defined (_AIX) \
|| (defined (__svr4__) && defined (i386)) || defined (__Lynx__) || (defined (__svr4__) && defined (i386)) || defined (__Lynx__) \
|| defined (__CYGWIN__)
#ifdef __MINGW32__ #ifdef __MINGW32__
#if OLD_MINGW #if OLD_MINGW
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment