pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/gcc3 pkg/23871 Ada runtime is not relocatable (sa...
details: https://anonhg.NetBSD.org/pkgsrc/rev/898681023cbb
branches: trunk
changeset: 475869:898681023cbb
user: shannonjr <shannonjr%pkgsrc.org@localhost>
date: Fri May 28 22:28:09 2004 +0000
description:
pkg/23871 Ada runtime is not relocatable (same as gcc Bug ada/12950)
part 1/2
diffstat:
lang/gcc3/distinfo | 9 +-
lang/gcc3/patches/patch-aj | 45 +++++++++-
lang/gcc3/patches/patch-ak | 46 ++++++++++-
lang/gcc3/patches/patch-ap | 15 +++
lang/gcc3/patches/patch-aq | 185 +++++++++++++++++++++++++++++++++++++++++++++
lang/gcc3/patches/patch-ar | 22 +++++
6 files changed, 313 insertions(+), 9 deletions(-)
diffs (truncated from 375 to 300 lines):
diff -r 00f72d613b79 -r 898681023cbb lang/gcc3/distinfo
--- a/lang/gcc3/distinfo Fri May 28 22:20:42 2004 +0000
+++ b/lang/gcc3/distinfo Fri May 28 22:28:09 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.17 2004/05/23 14:25:54 tron Exp $
+$NetBSD: distinfo,v 1.18 2004/05/28 22:28:09 shannonjr Exp $
SHA1 (gcc-3.3.3.tar.bz2) = a9efbc34c5dd7fc48f7d700461de4fc014968cab
Size (gcc-3.3.3.tar.bz2) = 23279245 bytes
@@ -9,9 +9,12 @@
SHA1 (patch-af) = ee41c43dbb6e710a9399954793c6ff7c4274e515
SHA1 (patch-ag) = 23fecd85ddca19a2c543827b60ea555ffbdcaa6c
SHA1 (patch-ai) = bb9f4975769cd104b25b4609a1d4c888bb147bb1
-SHA1 (patch-aj) = 80fead3fdfba3f93a89a7294b45f9633454d35fb
-SHA1 (patch-ak) = 9df2be9ed9f92218efce073ed0a727c0311630d0
+SHA1 (patch-aj) = bfbf65150fd6f0eaa50af68bb8e892fff4a2051e
+SHA1 (patch-ak) = 53b91c8315e5e2ccb5d74058bdfd33c6f8431ad6
SHA1 (patch-al) = 6294061358e2b618a980e77cbf7bad6231feacbe
SHA1 (patch-am) = 8eff72d76b135a9b0318de651341cb08976758b5
SHA1 (patch-an) = c0795339102b4608a3813c3a2d488c71ea972d6f
SHA1 (patch-ao) = b02a4bcf07d67511a337165164e8f344c3303fb7
+SHA1 (patch-ap) = d2f55ff6992f6afb106b3c861a8eee0a5b7bd70e
+SHA1 (patch-aq) = 1ee8d951e464a154c4f2a3f48d4c2101c2f3d79d
+SHA1 (patch-ar) = 1ed0338bde1e863ddcfbc0bdfb77aeafdbef7220
diff -r 00f72d613b79 -r 898681023cbb lang/gcc3/patches/patch-aj
--- a/lang/gcc3/patches/patch-aj Fri May 28 22:20:42 2004 +0000
+++ b/lang/gcc3/patches/patch-aj Fri May 28 22:28:09 2004 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aj,v 1.1 2004/04/10 15:47:08 seb Exp $
+$NetBSD: patch-aj,v 1.2 2004/05/28 22:28:09 shannonjr Exp $
---- gcc/ada/Make-lang.in.orig 2003-07-06 11:48:22.000000000 +0200
-+++ gcc/ada/Make-lang.in 2003-07-06 11:48:44.000000000 +0200
-@@ -210,7 +210,7 @@
+--- gcc/ada/Make-lang.in.orig 2003-07-04 13:53:53.000000000 -0600
++++ gcc/ada/Make-lang.in
+@@ -210,7 +210,7 @@ gnatbind$(exeext): ada/b_gnatb.o $(CONFI
$(LIBIBERTY) $(LIBS) $(SYSLIBS)
# use target-gcc target-gnatmake target-gnatbind target-gnatlink
@@ -11,3 +11,40 @@
$(MAKE) -C ada $(FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I- -I../rts"\
CC="../../xgcc -B../../" STAGE_PREFIX=../../ gnattools1
+@@ -904,26 +904,28 @@ ada/sdefault.adb: ada/stamp-sdefault ; @
+ ada/stamp-sdefault : $(srcdir)/version.c $(srcdir)/move-if-change \
+ Makefile
+ $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
++ $(ECHO) "with Osint; use Osint;" >>tmp-sdefault.adb
+ $(ECHO) "package body Sdefault is" >>tmp-sdefault.adb
+- $(ECHO) " S1 : aliased constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
+- $(ECHO) " S2 : aliased constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
+- $(ECHO) " S3 : aliased constant String := \"$(target)/\";" >>tmp-sdefault.adb
+- $(ECHO) " S4 : aliased constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S0 : constant String := \"$(prefix)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
+ $(ECHO) " function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
+ $(ECHO) " begin" >>tmp-sdefault.adb
+- $(ECHO) " return new String'(S1);" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
+ $(ECHO) " end Include_Dir_Default_Name;" >>tmp-sdefault.adb
+ $(ECHO) " function Object_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
+ $(ECHO) " begin" >>tmp-sdefault.adb
+- $(ECHO) " return new String'(S2);" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S2);" >>tmp-sdefault.adb
+ $(ECHO) " end Object_Dir_Default_Name;" >>tmp-sdefault.adb
+ $(ECHO) " function Target_Name return String_Ptr is" >>tmp-sdefault.adb
+ $(ECHO) " begin" >>tmp-sdefault.adb
+- $(ECHO) " return new String'(S3);" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S3);" >>tmp-sdefault.adb
+ $(ECHO) " end Target_Name;" >>tmp-sdefault.adb
+ $(ECHO) " function Search_Dir_Prefix return String_Ptr is" >>tmp-sdefault.adb
+ $(ECHO) " begin" >>tmp-sdefault.adb
+- $(ECHO) " return new String'(S4);" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S4);" >>tmp-sdefault.adb
+ $(ECHO) " end Search_Dir_Prefix;" >>tmp-sdefault.adb
+ $(ECHO) "end Sdefault;" >> tmp-sdefault.adb
+ $(srcdir)/move-if-change tmp-sdefault.adb ada/sdefault.adb
diff -r 00f72d613b79 -r 898681023cbb lang/gcc3/patches/patch-ak
--- a/lang/gcc3/patches/patch-ak Fri May 28 22:20:42 2004 +0000
+++ b/lang/gcc3/patches/patch-ak Fri May 28 22:28:09 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ak,v 1.1 2004/04/10 15:47:08 seb Exp $
+$NetBSD: patch-ak,v 1.2 2004/05/28 22:28:09 shannonjr Exp $
--- gcc/ada/Makefile.in.orig 2003-07-04 13:53:53.000000000 -0600
+++ gcc/ada/Makefile.in
@@ -33,7 +33,49 @@
# 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
-@@ -1609,7 +1633,7 @@ gnattools2: ../stamp-tools
+@@ -1585,6 +1609,41 @@ ifeq ($(TOOLSCASE),cross)
+ vpath %.h ../
+ endif
+
++ada/sdefault.adb: ada/stamp-sdefault ; @true
++ada/stamp-sdefault : $(srcdir)/version.c $(srcdir)/move-if-change \
++ Makefile
++ $(ECHO) "pragma Style_Checks (Off);" >tmp-sdefault.adb
++ $(ECHO) "with Osint; use Osint;" >>tmp-sdefault.adb
++ $(ECHO) "package body Sdefault is" >>tmp-sdefault.adb
++ $(ECHO) " S0 : constant String := \"$(prefix)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S1 : constant String := \"$(ADA_INCLUDE_DIR)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S2 : constant String := \"$(ADA_RTL_OBJ_DIR)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S3 : constant String := \"$(target)/\";" >>tmp-sdefault.adb
++ $(ECHO) " S4 : constant String := \"$(libsubdir)/\";" >>tmp-sdefault.adb
++ $(ECHO) " function Include_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
++ $(ECHO) " begin" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S1);" >>tmp-sdefault.adb
++ $(ECHO) " end Include_Dir_Default_Name;" >>tmp-sdefault.adb
++ $(ECHO) " function Object_Dir_Default_Name return String_Ptr is" >>tmp-sdefault.adb
++ $(ECHO) " begin" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S2);" >>tmp-sdefault.adb
++ $(ECHO) " end Object_Dir_Default_Name;" >>tmp-sdefault.adb
++ $(ECHO) " function Target_Name return String_Ptr is" >>tmp-sdefault.adb
++ $(ECHO) " begin" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S3);" >>tmp-sdefault.adb
++ $(ECHO) " end Target_Name;" >>tmp-sdefault.adb
++ $(ECHO) " function Search_Dir_Prefix return String_Ptr is" >>tmp-sdefault.adb
++ $(ECHO) " begin" >>tmp-sdefault.adb
++ $(ECHO) " return Relocate_Path (S0, S4);" >>tmp-sdefault.adb
++ $(ECHO) " end Search_Dir_Prefix;" >>tmp-sdefault.adb
++ $(ECHO) "end Sdefault;" >> tmp-sdefault.adb
++ $(srcdir)/move-if-change tmp-sdefault.adb ada/sdefault.adb
++ touch ada/stamp-sdefault
++
++ada/sdefault.o : ada/sdefault.ads ada/sdefault.adb ada/types.ads \
++ ada/unchdeal.ads ada/system.ads ada/s-exctab.ads ada/s-stalib.ads \
++ ada/unchconv.ads ada/osint.ads
++
+ # gnatmake/link tools cannot always be built with gnatmake/link for bootstrap
+ # reasons: gnatmake should be built with a recent compiler, a recent compiler
+ # may not generate ALI files compatible with an old gnatmake so it is important
+@@ -1609,7 +1668,7 @@ gnattools2: ../stamp-tools
TOOLSCASE=native \
../../gnatchop$(exeext) ../../gnat$(exeext) ../../gnatkr$(exeext) \
../../gnatls$(exeext) ../../gnatprep$(exeext) \
diff -r 00f72d613b79 -r 898681023cbb lang/gcc3/patches/patch-ap
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc3/patches/patch-ap Fri May 28 22:28:09 2004 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ap,v 1.1 2004/05/28 22:28:09 shannonjr Exp $
+
+--- gcc/ada/opt.ads.orig 2002-10-23 01:33:27.000000000 -0600
++++ gcc/ada/opt.ads
+@@ -92,6 +92,10 @@ package Opt is
+ -- The name of the Ada package generated by the binder (when in Ada mode).
+ -- This variable may be modified by Gnatbind.Scan_Bind_Arg.
+
++ RTS_Lib_Path_Name : String_Ptr := null;
++ RTS_Src_Path_Name : String_Ptr := null;
++ -- Backported from 3.4
++
+ Address_Clause_Overlay_Warnings : Boolean := True;
+ -- GNAT
+ -- Set False to disable address clause warnings
diff -r 00f72d613b79 -r 898681023cbb lang/gcc3/patches/patch-aq
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/gcc3/patches/patch-aq Fri May 28 22:28:09 2004 +0000
@@ -0,0 +1,185 @@
+$NetBSD: patch-aq,v 1.1 2004/05/28 22:28:09 shannonjr Exp $
+
+--- gcc/ada/osint.adb.orig 2002-10-23 01:33:27.000000000 -0600
++++ gcc/ada/osint.adb
+@@ -25,12 +25,12 @@
+ -- --
+ ------------------------------------------------------------------------------
+
+-with Fmap; use Fmap;
++with Fmap; use Fmap;
+ with Hostparm;
+-with Namet; use Namet;
+-with Opt; use Opt;
+-with Output; use Output;
+-with Sdefault; use Sdefault;
++with Namet; use Namet;
++with Opt; use Opt;
++with Output; use Output;
++with Sdefault; use Sdefault;
+ with Table;
+
+ with Unchecked_Conversion;
+@@ -43,6 +43,10 @@ package body Osint is
+ Running_Program : Program_Type := Unspecified;
+ Program_Set : Boolean := False;
+
++ Std_Prefix : String_Ptr;
++ -- Standard prefix, computed dynamically the first time Relocate_Path
++ -- is called, and cached for subsequent calls.
++
+ -------------------------------------
+ -- Use of Name_Find and Name_Enter --
+ -------------------------------------
+@@ -72,6 +76,14 @@ package body Osint is
+ function Concat (String_One : String; String_Two : String) return String;
+ -- Concatenates 2 strings and returns the result of the concatenation
+
++ function Executable_Prefix return String_Ptr;
++ -- Returns the name of the root directory where the executable is stored.
++ -- The executable must be located in a directory called "bin", or
++ -- under root/lib/gcc-lib/..., or under root/libexec/gcc/... Thus, if
++ -- the executable is stored in directory "/foo/bar/bin", this routine
++ -- returns "/foo/bar/".
++ -- Return "" if the location is not recognized as described above.
++
+ function Update_Path (Path : String_Ptr) return String_Ptr;
+ -- Update the specified path to replace the prefix with the location
+ -- where GNAT is installed. See the file prefix.c in GCC for details.
+@@ -607,6 +619,82 @@ package body Osint is
+ return Name_Enter;
+ end Executable_Name;
+
++ -------------------------
++ -- Executable_Prefix --
++ -------------------------
++
++ function Executable_Prefix return String_Ptr is
++ Exec_Name : String (1 .. Len_Arg (0));
++
++ function Get_Install_Dir (Exec : String) return String_Ptr;
++ -- S is the executable name preceeded by the absolute or relative
++ -- path, e.g. "c:\usr\bin\gcc.exe" or "..\bin\gcc".
++
++ function To_Lower (C : Character) return Character;
++ -- Converts C to lower case
++
++ ---------------------
++ -- To_Lower --
++ ---------------------
++
++ function To_Lower (C : Character) return Character is
++ type Lowers_Arr is array (Character range 'A' .. 'Z') of Character;
++ Lowers : constant Lowers_Arr := "abcdefghijklmnopqrstuvwxyz";
++ begin
++ case C is
++ when 'A' .. 'Z' =>
++ return Lowers (C);
++ when others =>
++ return C;
++ end case;
++ end To_Lower;
++
++ ---------------------
++ -- Get_Install_Dir --
++ ---------------------
++
++ function Get_Install_Dir (Exec : String) return String_Ptr is
++ begin
++ for J in reverse Exec'Range loop
++ if Is_Directory_Separator (Exec (J)) then
++ if J < Exec'Last - 5 then
++ if (To_Lower (Exec (J + 1)) = 'l'
++ and then To_Lower (Exec (J + 2)) = 'i'
++ and then To_Lower (Exec (J + 3)) = 'b')
++ or else
++ (To_Lower (Exec (J + 1)) = 'b'
++ and then To_Lower (Exec (J + 2)) = 'i'
++ and then To_Lower (Exec (J + 3)) = 'n')
++ then
++ return new String'(Exec (Exec'First .. J));
++ end if;
++ end if;
++ end if;
++ end loop;
++
++ return new String'("");
++ end Get_Install_Dir;
++
++ -- Beginning of Executable_Prefix
++
++ begin
++ Osint.Fill_Arg (Exec_Name'Address, 0);
++
++ -- First determine if a path prefix was placed in front of the
++ -- executable name.
++
++ for J in reverse Exec_Name'Range loop
++ if Is_Directory_Separator (Exec_Name (J)) then
++ return Get_Install_Dir (Exec_Name);
++ end if;
++ end loop;
++
++ -- If you are here, the user has typed the executable name with no
++ -- directory prefix.
++
++ return Get_Install_Dir (GNAT.OS_Lib.Locate_Exec_On_Path (Exec_Name).all);
++ end Executable_Prefix;
++
+ ------------------
+ -- Exit_Program --
+ ------------------
+@@ -1851,6 +1939,44 @@ package body Osint is
+
+ end Read_Source_File;
+
++ -------------------
Home |
Main Index |
Thread Index |
Old Index