pkgsrc/lang/gcc3/patches/patch-ak

86 lines
3.9 KiB
Text

$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
@@ -1028,6 +1028,30 @@ ifeq ($(strip $(filter-out cygwin32% min
EXTRA_GNATRTL_NONTASKING_OBJS = g-regist.o
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_GNATRTL_TASKING_OBJS=adasignal.o ada_lwp_self.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
@@ -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) \
- ../../gnatpsta$(exeext) ../../gnatxref$(exeext) \
+ ../../gnatxref$(exeext) \
../../gnatfind$(exeext) ../../gnatname$(exeext)
# These tools are only built for the native version.