Commit a7dafa20 by Laurent GUERBY Committed by Laurent Guerby

re PR ada/5911 (Support for multilib in Ada)

gcc/ChangeLog
2008-07-29  Laurent Guerby <laurent@guerby.net>

        PR ada/5911
        * gnattools/Makefile.in: Replace stamp-gnatlib by
        stamp-gnatlib-rts.

gcc/ada/ChangeLog
2008-07-29  Laurent Guerby <laurent@guerby.net>

        PR ada/5911
        * gcc-interface/Makefile.in (MULTISUBDIR, RTSDIR): New variables.
        Pass MULTISUBDIR to recursive make. Use $(RTSDIR) instead of rts.
        Replace stamp-gnatlib* by stamp-gnatlib*-rts.
        * gcc-interface/Make-lang.in: Replace stamp-gnatlib2
        by stamp-gnatlib2-rts.

From-SVN: r138294
parent 70b1e376
2008-07-30 Laurent Guerby <laurent@guerby.net>
PR ada/5911
* gnattools/Makefile.in: Replace stamp-gnatlib by
stamp-gnatlib-rts.
2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/cpp.texi: Update to GFDL 1.2. * doc/cpp.texi: Update to GFDL 1.2.
......
2008-07-30 Laurent Guerby <laurent@guerby.net>
PR ada/5911
* gcc-interface/Makefile.in (MULTISUBDIR, RTSDIR): New variables.
Pass MULTISUBDIR to recursive make. Use $(RTSDIR) instead of rts.
Replace stamp-gnatlib* by stamp-gnatlib*-rts.
* gcc-interface/Make-lang.in: Replace stamp-gnatlib2
by stamp-gnatlib2-rts.
2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
PR documentation/15479 PR documentation/15479
...@@ -302,7 +302,7 @@ TARGET_ADA_SRCS = ...@@ -302,7 +302,7 @@ TARGET_ADA_SRCS =
# stamp target in the parent directory whenever gnat1 is rebuilt # stamp target in the parent directory whenever gnat1 is rebuilt
gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBDEPS) gnat1$(exeext): $(TARGET_ADA_SRCS) $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBDEPS)
$(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBS) $(SYSLIBS) $(GMPLIBS) $(GCC_LINK) -o $@ $(GNAT1_OBJS) $(ADA_BACKEND) $(LIBS) $(SYSLIBS) $(GMPLIBS)
$(RM) stamp-gnatlib2 stamp-tools $(RM) stamp-gnatlib2-rts stamp-tools
gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS) gnatbind$(exeext): ada/b_gnatb.o $(CONFIG_H) $(GNATBIND_OBJS)
$(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS) $(GCC_LINK) -o $@ ada/b_gnatb.o $(GNATBIND_OBJS) $(ALL_CFLAGS) $(LIBS) $(SYSLIBS)
......
...@@ -193,6 +193,10 @@ TARGET_ADA_SRCS = ...@@ -193,6 +193,10 @@ TARGET_ADA_SRCS =
# Type of tools build we are doing; default is not compiling tools. # Type of tools build we are doing; default is not compiling tools.
TOOLSCASE = TOOLSCASE =
# Multilib handling
MULTISUBDIR =
RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
# End of variables for you to override. # End of variables for you to override.
all: all.indirect all: all.indirect
...@@ -1753,17 +1757,17 @@ ADA_INCLUDE_SRCS =\ ...@@ -1753,17 +1757,17 @@ ADA_INCLUDE_SRCS =\
a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \ a-[a-o]*.adb a-[p-z]*.adb a-[a-o]*.ads a-[p-z]*.ads g-*.ad? i-*.ad? \
s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads s-[a-o]*.adb s-[p-z]*.adb s-[a-o]*.ads s-[p-z]*.ads
LIBGNAT=../rts/libgnat.a LIBGNAT=../$(RTSDIR)/libgnat.a
GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES) GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
# when compiling the tools, the runtime has to be first on the path so that # when compiling the tools, the runtime has to be first on the path so that
# it hides the runtime files lying with the rest of the sources # it hides the runtime files lying with the rest of the sources
ifeq ($(TOOLSCASE),native) ifeq ($(TOOLSCASE),native)
vpath %.ads ../rts ../ vpath %.ads ../$(RTSDIR) ../
vpath %.adb ../rts ../ vpath %.adb ../$(RTSDIR) ../
vpath %.c ../rts ../ vpath %.c ../$(RTSDIR) ../
vpath %.h ../rts ../ vpath %.h ../$(RTSDIR) ../
endif endif
# in the cross tools case, everything is compiled with the native # in the cross tools case, everything is compiled with the native
...@@ -1843,8 +1847,8 @@ gnatlink-re: link.o targext.o ...@@ -1843,8 +1847,8 @@ gnatlink-re: link.o targext.o
$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \ $(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
$(TOOLS_LIBS) $(TOOLS_LIBS)
../stamp-gnatlib: ../stamp-gnatlib-$(RTSDIR):
@if [ ! -f stamp-gnatlib ] ; \ @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
then \ then \
$(ECHO) You must first build the GNAT library: make gnatlib; \ $(ECHO) You must first build the GNAT library: make gnatlib; \
false; \ false; \
...@@ -1852,7 +1856,7 @@ gnatlink-re: link.o targext.o ...@@ -1852,7 +1856,7 @@ gnatlink-re: link.o targext.o
true; \ true; \
fi fi
install-gnatlib: ../stamp-gnatlib install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
# Create the directory before deleting it, in case the directory is # Create the directory before deleting it, in case the directory is
# a list of directories (as it may be on VMS). This ensures we are # a list of directories (as it may be on VMS). This ensures we are
# deleting the right one. # deleting the right one.
...@@ -1862,49 +1866,49 @@ install-gnatlib: ../stamp-gnatlib ...@@ -1862,49 +1866,49 @@ install-gnatlib: ../stamp-gnatlib
$(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR) $(RMDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
-$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR) -$(MKDIR) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
-$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR) -$(MKDIR) $(DESTDIR)$(ADA_INCLUDE_DIR)
for file in rts/*.ali; do \ for file in $(RTSDIR)/*.ali; do \
$(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
done done
-$(INSTALL_DATA) rts/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR) -$(INSTALL_DATA) $(RTSDIR)/g-trasym$(objext) $(DESTDIR)$(ADA_RTL_OBJ_DIR)
-cd rts; for file in *$(arext);do \ -cd $(RTSDIR); for file in *$(arext);do \
$(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ $(INSTALL_DATA) $$file $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
$(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \ $(RANLIB_FOR_TARGET) $(DESTDIR)$(ADA_RTL_OBJ_DIR)/$$file; \
done done
-$(foreach file, $(EXTRA_ADALIB_FILES), \ -$(foreach file, $(EXTRA_ADALIB_FILES), \
$(INSTALL_DATA_DATE) rts/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \ $(INSTALL_DATA_DATE) $(RTSDIR)/$(file) $(DESTDIR)$(ADA_RTL_OBJ_DIR) && \
) true ) true
# Install the shared libraries, if any, using $(INSTALL) instead # Install the shared libraries, if any, using $(INSTALL) instead
# of $(INSTALL_DATA). The latter may force a mode inappropriate # of $(INSTALL_DATA). The latter may force a mode inappropriate
# for shared libraries on some targets, e.g. on HP-UX where the x # for shared libraries on some targets, e.g. on HP-UX where the x
# permission is required. # permission is required.
for file in gnat gnarl; do \ for file in gnat gnarl; do \
if [ -f rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \ if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \
$(INSTALL) rts/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(DESTDIR)$(ADA_RTL_OBJ_DIR); \ $(DESTDIR)$(ADA_RTL_OBJ_DIR); \
fi; \ fi; \
if [ -f rts/lib$${file}$(soext) ]; then \ if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \
$(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \ $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \
fi; \ fi; \
done done
# This copy must be done preserving the date on the original file. # This copy must be done preserving the date on the original file.
for file in rts/*.ad?; do \ for file in $(RTSDIR)/*.ad?; do \
$(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \ $(INSTALL_DATA_DATE) $$file $(DESTDIR)$(ADA_INCLUDE_DIR); \
done done
cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb
cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads
../stamp-gnatlib2: ../stamp-gnatlib2-$(RTSDIR):
$(RM) rts/s-*.ali $(RM) $(RTSDIR)/s-*.ali
$(RM) rts/s-*$(objext) $(RM) $(RTSDIR)/s-*$(objext)
$(RM) rts/a-*.ali $(RM) $(RTSDIR)/a-*.ali
$(RM) rts/a-*$(objext) $(RM) $(RTSDIR)/a-*$(objext)
$(RM) rts/*.ali $(RM) $(RTSDIR)/*.ali
$(RM) rts/*$(objext) $(RM) $(RTSDIR)/*$(objext)
$(RM) rts/*$(arext) $(RM) $(RTSDIR)/*$(arext)
$(RM) rts/*$(soext) $(RM) $(RTSDIR)/*$(soext)
touch ../stamp-gnatlib2 touch ../stamp-gnatlib2-$(RTSDIR)
$(RM) ../stamp-gnatlib $(RM) ../stamp-gnatlib-$(RTSDIR)
# NOTE: The $(foreach ...) commands assume ";" is the valid separator between # NOTE: The $(foreach ...) commands assume ";" is the valid separator between
# successive target commands. Although the Gnu make documentation # successive target commands. Although the Gnu make documentation
...@@ -1915,34 +1919,34 @@ install-gnatlib: ../stamp-gnatlib ...@@ -1915,34 +1919,34 @@ install-gnatlib: ../stamp-gnatlib
# GNULLI Begin ########################################################### # GNULLI Begin ###########################################################
../stamp-gnatlib1: Makefile ../stamp-gnatlib2 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
$(RMDIR) rts $(RMDIR) $(RTSDIR)
$(MKDIR) rts $(MKDIR) $(RTSDIR)
$(CHMOD) u+w rts $(CHMOD) u+w $(RTSDIR)
# Copy target independent sources # Copy target independent sources
$(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \ $(foreach f,$(ADA_INCLUDE_SRCS) $(LIBGNAT_SRCS), \
$(LN_S) $(fsrcpfx)$(f) rts ;) true $(LN_S) $(fsrcpfx)$(f) $(RTSDIR) ;) true
# Remove files to be replaced by target dependent sources # Remove files to be replaced by target dependent sources
$(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ $(RM) $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
rts/$(word 1,$(subst <, ,$(PAIR)))) $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR))))
$(RM) rts/*-*-*.ads rts/*-*-*.adb $(RM) $(RTSDIR)/*-*-*.ads $(RTSDIR)/*-*-*.adb
# Copy new target dependent sources # Copy new target dependent sources
$(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \ $(foreach PAIR,$(LIBGNAT_TARGET_PAIRS), \
$(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \ $(LN_S) $(fsrcpfx)$(word 2,$(subst <, ,$(PAIR))) \
rts/$(word 1,$(subst <, ,$(PAIR)));) $(RTSDIR)/$(word 1,$(subst <, ,$(PAIR)));)
$(RM) ../stamp-gnatlib $(RM) ../stamp-gnatlib-$(RTSDIR)
touch ../stamp-gnatlib1 touch ../stamp-gnatlib1-$(RTSDIR)
# GNULLI End ############################################################# # GNULLI End #############################################################
# Don't use semicolon separated shell commands that involve list expansions. # Don't use semicolon separated shell commands that involve list expansions.
# The semicolon triggers a call to DCL on VMS and DCL can't handle command # The semicolon triggers a call to DCL on VMS and DCL can't handle command
# line lengths in excess of 256 characters. # line lengths in excess of 256 characters.
# Example: cd rts; ar rc libfoo.a $(LONG_LIST_OF_OBJS) # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS)
# is guaranteed to overflow the buffer. # is guaranteed to overflow the buffer.
gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2 gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR)
$(MAKE) -C rts \ $(MAKE) -C $(RTSDIR) \
CC="`echo \"$(GCC_FOR_TARGET)\" \ CC="`echo \"$(GCC_FOR_TARGET)\" \
| sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \
...@@ -1950,7 +1954,7 @@ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2 ...@@ -1950,7 +1954,7 @@ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
srcdir=$(fsrcdir) \ srcdir=$(fsrcdir) \
-f ../Makefile $(LIBGNAT_OBJS) -f ../Makefile $(LIBGNAT_OBJS)
$(MAKE) -C rts \ $(MAKE) -C $(RTSDIR) \
CC="`echo \"$(GCC_FOR_TARGET)\" \ CC="`echo \"$(GCC_FOR_TARGET)\" \
| sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ | sed -e 's,^\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \
ADA_INCLUDES="" \ ADA_INCLUDES="" \
...@@ -1960,83 +1964,88 @@ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2 ...@@ -1960,83 +1964,88 @@ gnatlib: ../stamp-gnatlib1 ../stamp-gnatlib2
srcdir=$(fsrcdir) \ srcdir=$(fsrcdir) \
-f ../Makefile \ -f ../Makefile \
$(GNATRTL_OBJS) $(GNATRTL_OBJS)
$(RM) rts/libgnat$(arext) rts/libgnarl$(arext) $(RM) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnarl$(arext)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnat$(arext) \ $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnat$(arext) \
$(addprefix rts/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS)) $(addprefix $(RTSDIR)/,$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS))
ifneq ($(PREFIX_OBJS),) ifneq ($(PREFIX_OBJS),)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgccprefix$(arext) \ $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgccprefix$(arext) \
$(PREFIX_OBJS); $(PREFIX_OBJS);
$(RANLIB_FOR_TARGET) rts/libgccprefix$(arext) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgccprefix$(arext)
endif endif
$(RANLIB_FOR_TARGET) rts/libgnat$(arext) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnat$(arext)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnarl$(arext) \ $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \
$(addprefix rts/,$(GNATRTL_TASKING_OBJS)) $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS))
$(RANLIB_FOR_TARGET) rts/libgnarl$(arext) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgnala$(arext) \ $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \
$(addprefix rts/,$(GNATRTL_LINEARALGEBRA_OBJS)) $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS))
$(RANLIB_FOR_TARGET) rts/libgnala$(arext) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext)
ifeq ($(GMEM_LIB),gmemlib) ifeq ($(GMEM_LIB),gmemlib)
$(AR_FOR_TARGET) $(AR_FLAGS) rts/libgmem$(arext) \ $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \
rts/memtrack.o $(RTSDIR)/memtrack.o
$(RANLIB_FOR_TARGET) rts/libgmem$(arext) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgmem$(arext)
endif endif
$(CHMOD) a-wx rts/*.ali $(CHMOD) a-wx $(RTSDIR)/*.ali
touch ../stamp-gnatlib touch ../stamp-gnatlib-$(RTSDIR)
# Warning: this target assumes that LIBRARY_VERSION has been set correctly. # Warning: this target assumes that LIBRARY_VERSION has been set correctly.
gnatlib-shared-default: gnatlib-shared-default:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(RM) rts/libgna*$(soext) $(RM) $(RTSDIR)/libgna*$(soext)
cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
$(TARGET_LIBGCC2_CFLAGS) \ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(MISCLIB) -lm $(MISCLIB) -lm
cd rts; ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \
$(TARGET_LIBGCC2_CFLAGS) \ $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \ $(GNATRTL_TASKING_OBJS) \
$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(THREADSLIB) $(THREADSLIB)
cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
libgnat$(soext) libgnat$(soext)
cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
libgnarl$(soext) libgnarl$(soext)
gnatlib-shared-dual: gnatlib-shared-dual:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib-shared-default gnatlib-shared-default
$(MV) rts/libgna*$(soext) . $(MV) $(RTSDIR)/libgna*$(soext) .
$(RM) ../stamp-gnatlib2 $(RM) ../stamp-gnatlib2-$(RTSDIR)
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(MV) libgna*$(soext) rts $(MV) libgna*$(soext) $(RTSDIR)
gnatlib-shared-dual-win32: gnatlib-shared-dual-win32:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib-shared-win32 gnatlib-shared-win32
$(MV) rts/libgna*$(soext) . $(MV) $(RTSDIR)/libgna*$(soext) .
$(RM) ../stamp-gnatlib2 $(RM) ../stamp-gnatlib2-$(RTSDIR)
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(MV) libgna*$(soext) rts $(MV) libgna*$(soext) $(RTSDIR)
# ??? we need to add the option to support auto-import of arrays/records to # ??? we need to add the option to support auto-import of arrays/records to
# the GNATLIBFLAGS when this will be supported by GNAT. At this point we will # the GNATLIBFLAGS when this will be supported by GNAT. At this point we will
...@@ -2046,14 +2055,15 @@ gnatlib-shared-win32: ...@@ -2046,14 +2055,15 @@ gnatlib-shared-win32:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(RM) rts/libgna*$(soext) $(RM) $(RTSDIR)/libgna*$(soext)
cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB)
cd rts; ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \ $(GNATRTL_TASKING_OBJS) \
$(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
...@@ -2064,32 +2074,34 @@ gnatlib-shared-darwin: ...@@ -2064,32 +2074,34 @@ gnatlib-shared-darwin:
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
-fno-common" \ -fno-common" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(RM) rts/libgnat$(soext) rts/libgnarl$(soext) $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext)
cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
-o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \
$(SO_OPTS) \ $(SO_OPTS) \
$(MISCLIB) -lm $(MISCLIB) -lm
cd rts; ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \
-o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
$(GNATRTL_TASKING_OBJS) \ $(GNATRTL_TASKING_OBJS) \
$(SO_OPTS) \ $(SO_OPTS) \
$(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(THREADSLIB) -Wl,libgnat$(hyphen)$(LIBRARY_VERSION)$(soext)
cd rts; $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \
libgnat$(soext) libgnat$(soext)
cd rts; $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \
libgnarl$(soext) libgnarl$(soext)
gnatlib-shared-vms: gnatlib-shared-vms:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
gnatlib gnatlib
$(RM) rts/libgna*$(soext) $(RM) $(RTSDIR)/libgna*$(soext)
cd rts && \ cd $(RTSDIR) && \
../../gnatsym -s SYMVEC_$$$$.opt \ ../../gnatsym -s SYMVEC_$$$$.opt \
$(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \ $(LIBGNAT_OBJS) $(GNATRTL_NONTASKING_OBJS) && \
../../xgcc -g -B../../ -shared -shared-libgcc \ ../../xgcc -g -B../../ -shared -shared-libgcc \
...@@ -2098,7 +2110,7 @@ gnatlib-shared-vms: ...@@ -2098,7 +2110,7 @@ gnatlib-shared-vms:
--for-linker=/noinform \ --for-linker=/noinform \
--for-linker=SYMVEC_$$$$.opt \ --for-linker=SYMVEC_$$$$.opt \
--for-linker=gsmatch=equal,$(GSMATCH_VERSION) --for-linker=gsmatch=equal,$(GSMATCH_VERSION)
cd rts && \ cd $(RTSDIR) && \
../../gnatsym -s SYMVEC_$$$$.opt \ ../../gnatsym -s SYMVEC_$$$$.opt \
$(GNATRTL_TASKING_OBJS) && \ $(GNATRTL_TASKING_OBJS) && \
../../xgcc -g -B../../ -shared -shared-libgcc \ ../../xgcc -g -B../../ -shared -shared-libgcc \
...@@ -2113,29 +2125,32 @@ gnatlib-shared: ...@@ -2113,29 +2125,32 @@ gnatlib-shared:
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \
$(GNATLIB_SHARED) $(GNATLIB_SHARED)
gnatlib-sjlj: gnatlib-sjlj:
$(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR)
sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' rts/system.ads > rts/s.ads sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
$(MV) rts/s.ads rts/system.ads $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
EH_MECHANISM="" \ EH_MECHANISM="" \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
gnatlib-zcx: gnatlib-zcx:
$(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1 $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR)
sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' rts/system.ads > rts/s.ads sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads
$(MV) rts/s.ads rts/system.ads $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads
$(MAKE) $(FLAGS_TO_PASS) \ $(MAKE) $(FLAGS_TO_PASS) \
EH_MECHANISM="-gcc" \ EH_MECHANISM="-gcc" \
GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \
GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
MULTISUBDIR="$(MULTISUBDIR)" \
THREAD_KIND="$(THREAD_KIND)" \ THREAD_KIND="$(THREAD_KIND)" \
TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib
......
...@@ -153,8 +153,8 @@ TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@ ...@@ -153,8 +153,8 @@ TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@
gnattools: @default_gnattools_target@ gnattools: @default_gnattools_target@
# Sanity check # Sanity check
$(GCC_DIR)/stamp-gnatlib: $(GCC_DIR)/stamp-gnatlib-rts:
@if [ ! -f $(GCC_DIR)/stamp-gnatlib ] ; \ @if [ ! -f $(GCC_DIR)/stamp-gnatlib-rts ] ; \
then \ then \
echo "Cannot build gnattools while gnatlib is out of date or unbuilt" ; \ echo "Cannot build gnattools while gnatlib is out of date or unbuilt" ; \
false; \ false; \
...@@ -183,7 +183,7 @@ $(GCC_DIR)/stamp-tools: ...@@ -183,7 +183,7 @@ $(GCC_DIR)/stamp-tools:
# to be able to build gnatmake without a version of gnatmake around. Once # to be able to build gnatmake without a version of gnatmake around. Once
# everything has been compiled once, gnatmake can be recompiled with itself # everything has been compiled once, gnatmake can be recompiled with itself
# (see target regnattools) # (see target regnattools)
gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib-rts
# gnattools1 # gnattools1
$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
$(TOOLS_FLAGS_TO_PASS_1) \ $(TOOLS_FLAGS_TO_PASS_1) \
...@@ -195,7 +195,7 @@ gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib ...@@ -195,7 +195,7 @@ gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib
# gnatmake/link can be built with recent gnatmake/link if they are available. # gnatmake/link can be built with recent gnatmake/link if they are available.
# This is especially convenient for building cross tools or for rebuilding # This is especially convenient for building cross tools or for rebuilding
# the tools when the original bootstrap has already be done. # the tools when the original bootstrap has already be done.
regnattools: $(GCC_DIR)/stamp-gnatlib regnattools: $(GCC_DIR)/stamp-gnatlib-rts
# gnattools1-re # gnattools1-re
$(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \
$(TOOLS_FLAGS_TO_PASS_1re) \ $(TOOLS_FLAGS_TO_PASS_1re) \
......
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