# DP: - Install the shared Ada libraries as '.so.1', not '.so' to conform # DP: to the Debian policy. # DP: - Don't include a runtime link path (-rpath), when linking binaries. # DP: - Build the shared libraries on hppa-linux. # DP: - Instead of building libada as a target library only, build it as # DP: both a host and, if different, target library. # DP: - Build the GNAT tools in their top-level directory; do not use # DP: recursive makefiles. # DP: - Link the GNAT tools dynamically. # This patch seems large, but the hunks in Makefile.in are actually # generated from Makefile.def using autogen. Index: b/src/gcc/ada/gcc-interface/config-lang.in =================================================================== --- a/src/gcc/ada/gcc-interface/config-lang.in +++ b/src/gcc/ada/gcc-interface/config-lang.in @@ -35,7 +35,7 @@ outputs="ada/gcc-interface/Makefile ada/Makefile" target_libs="target-libada" -lang_dirs="gnattools" +lang_dirs="libada gnattools" # Ada is not enabled by default for the time being. build_by_default=no Index: b/src/gcc/ada/link.c =================================================================== --- a/src/gcc/ada/link.c +++ b/src/gcc/ada/link.c @@ -105,9 +105,9 @@ #elif defined (__FreeBSD__) const char *__gnat_object_file_option = "-Wl,@"; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -char __gnat_shared_libgnat_default = STATIC; -char __gnat_shared_libgcc_default = STATIC; +const char *__gnat_run_path_option = ""; +char __gnat_shared_libgnat_default = SHARED; +char __gnat_shared_libgcc_default = SHARED; int __gnat_link_max = 8192; unsigned char __gnat_objlist_file_supported = 1; const char *__gnat_object_library_extension = ".a"; @@ -127,9 +127,9 @@ #elif defined (linux) || defined(__GLIBC__) const char *__gnat_object_file_option = "-Wl,@"; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -char __gnat_shared_libgnat_default = STATIC; -char __gnat_shared_libgcc_default = STATIC; +const char *__gnat_run_path_option = ""; +char __gnat_shared_libgnat_default = SHARED; +char __gnat_shared_libgcc_default = SHARED; int __gnat_link_max = 8192; unsigned char __gnat_objlist_file_supported = 1; const char *__gnat_object_library_extension = ".a"; Index: b/src/gcc/ada/gcc-interface/Makefile.in =================================================================== --- a/src/gcc/ada/gcc-interface/Makefile.in +++ b/src/gcc/ada/gcc-interface/Makefile.in @@ -102,7 +102,7 @@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf -GNATBIND_FLAGS = -static -x +GNATBIND_FLAGS = -shared -x ADA_CFLAGS = ADAFLAGS = -W -Wall -gnatpg -gnata FORCE_DEBUG_ADAFLAGS = -g @@ -262,9 +262,6 @@ LIBDEPS = $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBBACKTRACE) $(LIBIBERTY) # Default is no TGT_LIB; one might be passed down or something TGT_LIB = -TOOLS_LIBS = ../link.o ../targext.o ../../ggc-none.o ../../libcommon-target.a \ - ../../libcommon.a ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \ - ../$(LIBBACKTRACE) ../$(LIBIBERTY) $(SYSLIBS) $(TGT_LIB) # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, @@ -321,30 +318,6 @@ # defined in this file into the environment. .NOEXPORT: -# Lists of files for various purposes. - -GNATLINK_OBJS = gnatlink.o \ - a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \ - gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \ - osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ - sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \ - types.o validsw.o widechar.o - -GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \ - atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \ - erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \ - gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \ - make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \ - mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o \ - output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o \ - prj-conf.o prj-pp.o prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o \ - prj-proc.o prj-strt.o prj-tree.o prj-util.o restrict.o rident.o s-exctab.o \ - s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \ - s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \ - sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \ - switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o uintp.o \ - uname.o urealp.o usage.o widechar.o \ - $(EXTRA_GNATMAKE_OBJS) # Make arch match the current multilib so that the RTS selection code # picks up the right files. For a given target this must be coherent @@ -1450,6 +1423,11 @@ LIBRARY_VERSION := $(LIB_VERSION) endif +ifeq ($(strip $(filter-out hppa% unknown linux gnu,$(targ))),) + GNATLIB_SHARED = gnatlib-shared-dual + LIBRARY_VERSION := $(LIB_VERSION) +endif + # HP/PA HP-UX 10 ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),) LIBGNAT_TARGET_PAIRS = \ @@ -2481,151 +2459,6 @@ $(patsubst %$(objext),%.adb,$(GNATRTL_OBJS)), \ $(ADA_EXCLUDE_SRCS)) -LIBGNAT=../$(RTSDIR)/libgnat.a - -TOOLS_FLAGS_TO_PASS= \ - "CC=$(CC)" \ - "CFLAGS=$(CFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "ADAFLAGS=$(ADAFLAGS)" \ - "INCLUDES=$(INCLUDES_FOR_SUBDIR)"\ - "ADA_INCLUDES=$(ADA_INCLUDES) $(ADA_INCLUDES_FOR_SUBDIR)"\ - "libsubdir=$(libsubdir)" \ - "exeext=$(exeext)" \ - "fsrcdir=$(fsrcdir)" \ - "srcdir=$(fsrcdir)" \ - "TOOLS_LIBS=$(TOOLS_LIBS) $(TGT_LIB)" \ - "GNATMAKE=$(GNATMAKE)" \ - "GNATLINK=$(GNATLINK)" \ - "GNATBIND=$(GNATBIND)" - -GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES) $(LDFLAGS) - -# Build directory for the tools. Let's copy the target-dependent -# sources using the same mechanism as for gnatlib. The other sources are -# accessed using the vpath directive below -# Note: dummy target, stamp-tools is mainly handled by gnattools. - -../stamp-tools: - touch ../stamp-tools - -# 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 -ifeq ($(TOOLSCASE),native) - vpath %.ads ../$(RTSDIR) ../ - vpath %.adb ../$(RTSDIR) ../ - vpath %.c ../$(RTSDIR) ../ - vpath %.h ../$(RTSDIR) ../ -endif - -# in the cross tools case, everything is compiled with the native -# gnatmake/link. Therefore only -I needs to be modified in ADA_INCLUDES -ifeq ($(TOOLSCASE),cross) - vpath %.ads ../ - vpath %.adb ../ - vpath %.c ../ - vpath %.h ../ -endif - -# 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 -# to be able to build gnatmake without a version of gnatmake around. Once -# everything has been compiled once, gnatmake can be recompiled with itself -# (see target gnattools1-re) -gnattools1: ../stamp-tools ../stamp-gnatlib-$(RTSDIR) - $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \ - TOOLSCASE=native \ - ../../gnatmake$(exeext) ../../gnatlink$(exeext) - -# gnatmake/link can be built with recent gnatmake/link if they are available. -# This is especially convenient for building cross tools or for rebuilding -# the tools when the original bootstrap has already be done. -gnattools1-re: ../stamp-tools - $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \ - TOOLSCASE=cross INCLUDES="" gnatmake-re gnatlink-re - -# these tools are built with gnatmake & are common to native and cross -gnattools2: ../stamp-tools - $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \ - TOOLSCASE=native common-tools $(EXTRA_GNATTOOLS) - -# those tools are only built for the cross version -gnattools4: ../stamp-tools -ifeq ($(ENABLE_VXADDR2LINE),true) - $(MAKE) -C tools -f ../Makefile $(TOOLS_FLAGS_TO_PASS) \ - TOOLSCASE=cross top_buildir=../../.. \ - ../../vxaddr2line$(exeext) -endif - -common-tools: ../stamp-tools - $(GNATMAKE) -j0 -c -b $(ADA_INCLUDES) \ - --GNATBIND="$(GNATBIND)" --GCC="$(CC) $(ALL_ADAFLAGS)" \ - gnatchop gnatcmd gnatkr gnatls gnatprep gnatxref gnatfind gnatname \ - gnatclean -bargs $(ADA_INCLUDES) $(GNATBIND_FLAGS) - $(GNATLINK) -v gnatcmd -o ../../gnat$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatchop -o ../../gnatchop$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatkr -o ../../gnatkr$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatls -o ../../gnatls$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatprep -o ../../gnatprep$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatxref -o ../../gnatxref$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatfind -o ../../gnatfind$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatname -o ../../gnatname$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(GNATLINK) -v gnatclean -o ../../gnatclean$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -../../gnatsym$(exeext): ../stamp-tools - $(GNATMAKE) -c $(ADA_INCLUDES) gnatsym --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatsym - $(GNATLINK) -v gnatsym -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -../../gnatdll$(exeext): ../stamp-tools - $(GNATMAKE) -c $(ADA_INCLUDES) gnatdll --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatdll - $(GNATLINK) -v gnatdll -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -../../vxaddr2line$(exeext): ../stamp-tools - $(GNATMAKE) -c $(ADA_INCLUDES) vxaddr2line --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vxaddr2line - $(GNATLINK) -v vxaddr2line -o $@ --GCC="$(GCC_LINK)" ../targext.o $(CLIB) - -gnatmake-re: ../stamp-tools - $(GNATMAKE) -j0 $(ADA_INCLUDES) -u sdefault --GCC="$(CC) $(MOST_ADA_FLAGS)" - $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatmake --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatmake - $(GNATLINK) -v gnatmake -o ../../gnatmake$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -# Note the use of the "mv" command in order to allow gnatlink to be linked with -# with the former version of gnatlink itself which cannot override itself. -# gnatlink-re cannot be run at the same time as gnatmake-re, hence the -# dependency -gnatlink-re: ../stamp-tools gnatmake-re - $(GNATMAKE) -j0 -c $(ADA_INCLUDES) gnatlink --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlink - $(GNATLINK) -v gnatlink -o ../../gnatlinknew$(exeext) \ - --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - $(MV) ../../gnatlinknew$(exeext) ../../gnatlink$(exeext) - -# Needs to be built with CC=gcc -# Since the RTL should be built with the latest compiler, remove the -# stamp target in the parent directory whenever gnat1 is rebuilt - -# Likewise for the tools -../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS) - +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS) - -../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS) - +$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS) - ../stamp-gnatlib-$(RTSDIR): @if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \ then \ @@ -2662,14 +2495,10 @@ # Also install the .dSYM directories if they exist (these directories # contain the debug information for the shared libraries on darwin) for file in gnat gnarl; do \ - if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \ - $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ + if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).1 ]; then \ + $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).1 \ $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ fi; \ - if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \ - $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ - $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \ - fi; \ if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \ $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \ $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ @@ -2682,19 +2511,7 @@ cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.adb cd $(DESTDIR)$(ADA_INCLUDE_DIR); $(CHMOD) a-wx *.ads -../stamp-gnatlib2-$(RTSDIR): - $(RM) $(RTSDIR)/s-*.ali - $(RM) $(RTSDIR)/s-*$(objext) - $(RM) $(RTSDIR)/a-*.ali - $(RM) $(RTSDIR)/a-*$(objext) - $(RM) $(RTSDIR)/*.ali - $(RM) $(RTSDIR)/*$(objext) - $(RM) $(RTSDIR)/*$(arext) - $(RM) $(RTSDIR)/*$(soext) - touch ../stamp-gnatlib2-$(RTSDIR) - $(RM) ../stamp-gnatlib-$(RTSDIR) - -../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR) +../stamp-gnatlib1-$(RTSDIR): Makefile $(RMDIR) $(RTSDIR) $(MKDIR) $(RTSDIR) $(CHMOD) u+w $(RTSDIR) @@ -2759,7 +2576,7 @@ # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS) # is guaranteed to overflow the buffer. -gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads +gnatlib: ../stamp-gnatlib1-$(RTSDIR) $(RTSDIR)/s-oscons.ads # C files $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ @@ -2796,32 +2613,47 @@ # Warning: this target assumes that LIBRARY_VERSION has been set correctly. gnatlib-shared-default: - $(MAKE) $(FLAGS_TO_PASS) \ - GNATLIBFLAGS="$(GNATLIBFLAGS)" \ - GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ - GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \ - MULTISUBDIR="$(MULTISUBDIR)" \ - THREAD_KIND="$(THREAD_KIND)" \ - gnatlib - $(RM) $(RTSDIR)/libgna*$(soext) + $(MAKE) -C $(RTSDIR) \ + CC="`echo \"$(GCC_FOR_TARGET)\" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ + CFLAGS="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \ + FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ + srcdir=$(fsrcdir) \ + -f ../Makefile $(LIBGNAT_OBJS) + $(MAKE) -C $(RTSDIR) \ + CC="`echo \"$(GCC_FOR_TARGET)\" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + ADA_INCLUDES="" \ + CFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ + ADAFLAGS="$(GNATLIBFLAGS) $(PICFLAG_FOR_TARGET)" \ + FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ + srcdir=$(fsrcdir) \ + -f ../Makefile \ + $(GNATRTL_OBJS) + $(RM) $(RTSDIR)/libgna*$(soext) $(RTSDIR)/libgna*$(soext).1 cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ $(PICFLAG_FOR_TARGET) \ - -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ + -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ - $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ + $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext).1 \ $(MISCLIB) -lm cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ $(PICFLAG_FOR_TARGET) \ - -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ + -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \ $(GNATRTL_TASKING_OBJS) \ - $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ + $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext).1 \ $(THREADSLIB) - cd $(RTSDIR); $(LN_S) libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ - libgnat$(soext) - cd $(RTSDIR); $(LN_S) libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ - libgnarl$(soext) + cd $(RTSDIR); for lib in gnat gnarl; do \ + l=lib$${lib}$(hyphen)$(LIBRARY_VERSION)$(soext); \ + $(LN_S) $$l.1 $$l; \ + done +# Delete the object files, lest they be linked statically into the tools +# executables. Only the .ali, .a and .so files must remain. + rm -f $(RTSDIR)/*.o + $(CHMOD) a-wx $(RTSDIR)/*.ali gnatlib-shared-dual: $(MAKE) $(FLAGS_TO_PASS) \ @@ -2830,17 +2662,15 @@ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - gnatlib-shared-default - $(MV) $(RTSDIR)/libgna*$(soext) . - $(RM) ../stamp-gnatlib2-$(RTSDIR) + gnatlib + $(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - gnatlib - $(MV) libgna*$(soext) $(RTSDIR) + gnatlib-shared-default gnatlib-shared-dual-win32: $(MAKE) $(FLAGS_TO_PASS) \ @@ -2850,17 +2680,15 @@ PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - gnatlib-shared-win32 - $(MV) $(RTSDIR)/libgna*$(soext) . - $(RM) ../stamp-gnatlib2-$(RTSDIR) + gnatlib + $(RM) $(RTSDIR)/*.o $(RTSDIR)/*.ali $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - gnatlib - $(MV) libgna*$(soext) $(RTSDIR) + gnatlib-shared-win32 # ??? 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 @@ -2998,28 +2826,6 @@ THREAD_KIND="$(THREAD_KIND)" \ PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib -# Compiling object files from source files. - -# Note that dependencies on obstack.h are not written -# because that file is not part of GCC. -# Dependencies on gvarargs.h are not written -# because all that file does, when not compiling with GCC, -# is include the system varargs.h. - -b_gnatl.adb : $(GNATLINK_OBJS) - $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.adb gnatlink.ali - -b_gnatl.o : b_gnatl.adb - $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \ - $< $(OUTPUT_OPTION) - -b_gnatm.adb : $(GNATMAKE_OBJS) - $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.adb gnatmake.ali - -b_gnatm.o : b_gnatm.adb - $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \ - $< $(OUTPUT_OPTION) - ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_RTL_OBJ_DIR = $(libsubdir)/adalib Index: b/src/gnattools/Makefile.in =================================================================== --- a/src/gnattools/Makefile.in +++ b/src/gnattools/Makefile.in @@ -5,12 +5,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT 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 # along with this program; see the file COPYING3. If not see # . @@ -18,6 +18,9 @@ # Default target; must be first. all: gnattools +.NOTPARALLEL: # don't run multiple gnatmakes in parallel in the same directory +.SUFFIXES: + # Standard autoconf-set variables. SHELL = @SHELL@ srcdir = @srcdir@ @@ -35,112 +38,25 @@ LN_S=@LN_S@ target_noncanonical=@target_noncanonical@ -# Variables for the user (or the top level) to override. -exeext = @EXEEXT@ -objext=.o -TRACE=no -ADA_FOR_BUILD= -ADA_FOR_TARGET= -LDFLAGS= -PWD_COMMAND = $${PWDCMD-pwd} - -# The tedious process of getting CFLAGS right. -CFLAGS=-g -GCC_WARN_CFLAGS = -W -Wall -WARN_CFLAGS = @warn_cflags@ - -ADA_CFLAGS=@ADA_CFLAGS@ - -# Variables for gnattools. -ADAFLAGS= -gnatpg -gnata - -# For finding the GCC build dir, which is used far too much -GCC_DIR=../gcc - -# Absolute srcdir for gcc (why do we want absolute? I dunno) -fsrcdir := $(shell cd $(srcdir)/../gcc/; ${PWD_COMMAND}) - -# Useful "subroutines" for the excess includes -INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada -I$(fsrcdir)/config \ - -I$(fsrcdir)/../include -I$(fsrcdir) -ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada - CXX_LFLAGS = \ -B../../../$(target_noncanonical)/libstdc++-v3/src/.libs \ -B../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs \ -L../../../$(target_noncanonical)/libstdc++-v3/src/.libs \ -L../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs -# Variables for gnattools, native -TOOLS_FLAGS_TO_PASS_NATIVE= \ - "CC=../../xgcc -B../../" \ - "CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \ - "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "ADAFLAGS=$(ADAFLAGS)" \ - "ADA_CFLAGS=$(ADA_CFLAGS)" \ - "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \ - "ADA_INCLUDES=-I- -I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\ - "exeext=$(exeext)" \ - "fsrcdir=$(fsrcdir)" \ - "srcdir=$(fsrcdir)" \ - "GNATMAKE=../../gnatmake" \ - "GNATLINK=../../gnatlink" \ - "GNATBIND=../../gnatbind" \ - "TOOLSCASE=native" - -# Variables for regnattools -TOOLS_FLAGS_TO_PASS_RE= \ - "CC=../../xgcc -B../../" \ - "CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \ - "CFLAGS=$(CFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "ADAFLAGS=$(ADAFLAGS)" \ - "ADA_CFLAGS=$(ADA_CFLAGS)" \ - "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \ - "ADA_INCLUDES=-I../rts $(ADA_INCLUDES_FOR_SUBDIR)"\ - "exeext=$(exeext)" \ - "fsrcdir=$(fsrcdir)" \ - "srcdir=$(fsrcdir)" \ - "GNATMAKE=../../gnatmake" \ - "GNATLINK=../../gnatlink" \ - "GNATBIND=../../gnatbind" \ - "TOOLSCASE=cross" - -# Variables for gnattools, cross -ifeq ($(build), $(host)) - GNATMAKE_FOR_HOST=gnatmake - GNATLINK_FOR_HOST=gnatlink - GNATBIND_FOR_HOST=gnatbind - GNATLS_FOR_HOST=gnatls -else - GNATMAKE_FOR_HOST=$(host_alias)-gnatmake - GNATLINK_FOR_HOST=$(host_alias)-gnatlink - GNATBIND_FOR_HOST=$(host_alias)-gnatbind - GNATLS_FOR_HOST=$(host_alias)-gnatls -endif - -# Put the host RTS dir first in the PATH to hide the default runtime -# files that are among the sources -RTS_DIR:=$(strip $(subst \,/,$(shell $(GNATLS_FOR_HOST) -v | grep adalib ))) - -TOOLS_FLAGS_TO_PASS_CROSS= \ - "CC=$(CC)" \ - "CXX=$(CXX)" \ - "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ - "LDFLAGS=$(LDFLAGS)" \ - "ADAFLAGS=$(ADAFLAGS)" \ - "ADA_CFLAGS=$(ADA_CFLAGS)" \ - "INCLUDES=$(INCLUDES_FOR_SUBDIR)" \ - "ADA_INCLUDES=-I$(RTS_DIR)/../adainclude -I$(RTS_DIR) $(ADA_INCLUDES_FOR_SUBDIR)" \ - "exeext=$(exeext)" \ - "fsrcdir=$(fsrcdir)" \ - "srcdir=$(fsrcdir)" \ - "GNATMAKE=$(GNATMAKE_FOR_HOST)" \ - "GNATLINK=$(GNATLINK_FOR_HOST)" \ - "GNATBIND=$(GNATBIND_FOR_HOST)" \ - "TOOLSCASE=cross" \ - "LIBGNAT=" +CFLAGS=-O2 -Wall +INCLUDES = -I@srcdir@/../gcc/ada -I@srcdir@/../gcc +ADA_CFLAGS=-O2 -gnatn +ADA_INCLUDES=-nostdinc -I- -I. -I../gcc/ada/rts -I@srcdir@/../gcc/ada +LIB_VERSION=$(strip $(shell grep ' Library_Version :' \ + @srcdir@/../gcc/ada/gnatvsn.ads | sed -e 's/.*"\(.*\)".*/\1/')) +SHARED_ADA_LIBS := -L../gcc/ada/rts -lgnat-$(LIB_VERSION) +STATIC_ADA_LIBS := ../gcc/ada/rts/libgnat.a +STATIC_GCC_LIBS := ../gcc/libcommon-target.a ../gcc/libcommon.a ../libcpp/libcpp.a \ +../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a + +# We will use the just-built compiler to compile and link everything. +GCC=../gcc/xgcc -B../gcc/ # File lists # ---------- @@ -149,116 +65,228 @@ EXTRA_GNATTOOLS = @EXTRA_GNATTOOLS@ TOOLS_TARGET_PAIRS = @TOOLS_TARGET_PAIRS@ +# Stage 1 builds xgcc and gnatbind; we can use them to build +# gnatmake-static and gnatlink-static, then use gnatmake-static and +# gnatlink-static to build the other tools. The reason we first build +# statically-linked versions of gnatmake and gnatlink is so we can run +# them with confidence on all build platforms, without LD_LIBRARY_PATH +# or some such variable. + +# The tools we will build using gnatmake-static and gnatlink-static. +TOOLS := gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatls gnatlink +TOOLS += gnatmake gnatname gnatprep gnatxref + +# Since we don't have gnatmake, we must specify the full list of +# object files necessary to build gnatmake and gnatlink. +# TODO: remove from these lists the objects that are part of +# libgnatvsn and libgnatprj. +GNATLINK_OBJS = \ +ali.o \ +alloc.o \ +butil.o \ +casing.o \ +csets.o \ +debug.o \ +fmap.o \ +fname.o \ +gnatlink.o \ +gnatvsn.o \ +hostparm.o \ +indepsw.o \ +namet.o \ +opt.o \ +osint.o \ +output.o \ +rident.o \ +sdefault.o \ +snames.o \ +stylesw.o \ +switch.o \ +table.o \ +targparm.o \ +tree_io.o \ +types.o \ +validsw.o \ +widechar.o + +GNATMAKE_OBJS = \ +ali-util.o \ +ali.o \ +alloc.o \ +aspects.o \ +atree.o \ +binderr.o \ +butil.o \ +casing.o \ +csets.o \ +debug.o \ +einfo.o\ +elists.o \ +err_vars.o \ +errout.o \ +erroutc.o \ +errutil.o \ +fmap.o \ +fname-sf.o \ +fname-uf.o \ +fname.o \ +gnatmake.o \ +gnatvsn.o \ +hostparm.o \ +krunch.o \ +lib.o \ +make.o \ +makeusg.o \ +makeutl.o \ +mlib-fil.o \ +mlib-prj.o \ +mlib-tgt.o \ +mlib-tgt-specific.o \ +mlib-utl.o \ +mlib.o \ +namet.o \ +nlists.o \ +opt.o \ +osint-m.o \ +osint.o \ +output.o \ +prj-attr-pm.o \ +prj-attr.o \ +prj-com.o \ +prj-conf.o \ +prj-dect.o \ +prj-env.o \ +prj-err.o \ +prj-ext.o \ +prj-nmsc.o \ +prj-pars.o \ +prj-part.o \ +prj-pp.o \ +prj-proc.o \ +prj-strt.o \ +prj-tree.o \ +prj-util.o \ +prj.o \ +restrict.o \ +rident.o \ +scans.o \ +scng.o \ +sdefault.o \ +sem_aux.o \ +sfn_scan.o \ +sinfo.o \ +sinput-c.o \ +sinput-p.o \ +sinput.o \ +snames.o \ +stand.o \ +stringt.o \ +styleg.o \ +stylesw.o \ +switch-m.o \ +switch.o \ +table.o \ +targparm.o \ +tempdir.o \ +tree_io.o \ +types.o \ +uintp.o \ +uname.o \ +urealp.o \ +usage.o \ +validsw.o \ +widechar.o \ +$(EXTRA_GNATMAKE_OBJS) + # Makefile targets # ---------------- .PHONY: gnattools gnattools-native gnattools-cross regnattools gnattools: @default_gnattools_target@ -# Sanity check -$(GCC_DIR)/stamp-gnatlib-rts: - @if [ ! -f $(GCC_DIR)/stamp-gnatlib-rts ] ; \ - then \ - echo "Cannot build gnattools while gnatlib is out of date or unbuilt" ; \ - false; \ - else \ - true; \ - fi - - # Build directory for the tools. Let's copy the target-dependent # sources using the same mechanism as for gnatlib. The other sources are -# accessed using the vpath directive in ada/Makefile.in +# accessed using the vpath directive. + +stamp-gnattools-sources: + $(LN_S) ../gcc/ada/sdefault.adb ../gcc/ada/snames.ads ../gcc/ada/snames.adb . + $(foreach PAIR,$(TOOLS_TARGET_PAIRS), \ + rm -f $(word 1,$(subst <, ,$(PAIR)));\ + $(LN_S) @srcdir@/../gcc/ada/$(word 2,$(subst <, ,$(PAIR))) \ + $(word 1,$(subst <, ,$(PAIR)));) + touch $@ + +gnattools-native: ../gcc/ada/rts/libgnat-$(LIB_VERSION).so +gnattools-native: stamp-gnattools-sources +gnattools-native: $(TOOLS) + +$(TOOLS) gnatcmd: | gnatmake-static gnatlink-static + +vpath %.c @srcdir@/../gcc/ada:@srcdir@/../gcc +vpath %.h @srcdir@/../gcc/ada +vpath %.adb .:@srcdir@/../gcc/ada +vpath %.ads @srcdir@/../gcc/ada + +# gnatlink + +gnatlink-static: $(GNATLINK_OBJS) b_gnatl.o link.o + $(GCC) -o $@ $^ ../gcc/ada/rts/libgnat.a $(STATIC_GCC_LIBS) + +gnatlink: $(GNATLINK_OBJS) b_gnatl.o link.o + $(GCC) -o $@ $^ $(SHARED_ADA_LIBS) $(STATIC_GCC_LIBS) + +b_gnatl.adb: $(GNATLINK_OBJS) + ../gcc/gnatbind -o $@ $(ADA_INCLUDES) gnatlink.ali + +# gnatmake + +gnatmake-static: $(GNATMAKE_OBJS) b_gnatm.o link.o + $(GCC) -o $@ $(ADA_CFLAGS) $^ $(STATIC_ADA_LIBS) $(STATIC_GCC_LIBS) + +gnatmake: $(GNATMAKE_OBJS) b_gnatm.o link.o + $(GCC) -o $@ $(ADA_CFLAGS) $^ $(SHARED_ADA_LIBS) $(STATIC_GCC_LIBS) + +b_gnatm.adb: $(GNATMAKE_OBJS) + ../gcc/gnatbind -o $@ $(ADA_INCLUDES) gnatmake.ali + +# Other tools +gnatkr: + ./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \ + --GCC="$(GCC)" \ + --GNATBIND=../gcc/gnatbind + ./gnatlink-static -o $@ $@.ali $(ADA_INCLUDES) $(SHARED_ADA_LIBS) \ + --GCC="$(GCC) $(ADA_INCLUDES)" $(STATIC_GCC_LIBS) + +gnat: gnatcmd + cp -lp $< $@ + +gnatbind gnatchop gnatclean gnatcmd gnatfind gnatls gnatname gnatprep gnatxref: \ +link.o + ./gnatmake-static -c -b $@ $(ADA_CFLAGS) $(ADA_INCLUDES) \ + --GCC="$(GCC)" \ + --GNATBIND=../gcc/gnatbind + ./gnatlink-static -o $@ $@.ali $^ \ + $(ADA_INCLUDES) $(SHARED_ADA_LIBS) $(STATIC_GCC_LIBS) \ + --GCC="$(GCC) $(ADA_INCLUDES)" + +# Force compiling sdefault.adb, not .ads, to produce sdefault.o +sdefault.o: sdefault.adb + +sdefault.adb: stamp-gnattools-sources + +# Because these sources don't exist when the Makefile is evaluated: +snames.o: snames.adb snames.ads + +snames.adb snames.ads: stamp-gnattools-sources + +%.o: %.adb + $(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES) + +%.o: %.ads + $(GCC) -c -o $@ $< $(ADA_CFLAGS) $(ADA_INCLUDES) -$(GCC_DIR)/stamp-tools: - -rm -rf $(GCC_DIR)/ada/tools - -mkdir -p $(GCC_DIR)/ada/tools - -(cd $(GCC_DIR)/ada/tools; $(LN_S) ../sdefault.adb ../snames.ads ../snames.adb .) - -$(foreach PAIR,$(TOOLS_TARGET_PAIRS), \ - rm -f $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));\ - $(LN_S) $(fsrcdir)/ada/$(word 2,$(subst <, ,$(PAIR))) \ - $(GCC_DIR)/ada/tools/$(word 1,$(subst <, ,$(PAIR)));) - touch $(GCC_DIR)/stamp-tools - -# 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 -# to be able to build gnatmake without a version of gnatmake around. Once -# everything has been compiled once, gnatmake can be recompiled with itself -# (see target regnattools) -gnattools-native: $(GCC_DIR)/stamp-tools $(GCC_DIR)/stamp-gnatlib-rts - # gnattools1 - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_NATIVE) \ - ../../gnatmake$(exeext) ../../gnatlink$(exeext) - # gnattools2 - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools - -# gnatmake/link can be built with recent gnatmake/link if they are available. -# This is especially convenient for building cross tools or for rebuilding -# the tools when the original bootstrap has already be done. -regnattools: $(GCC_DIR)/stamp-gnatlib-rts - # gnattools1-re - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_RE) INCLUDES="" \ - gnatmake-re gnatlink-re - # gnattools2 - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools - -gnattools-cross: $(GCC_DIR)/stamp-tools - # gnattools1-re - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_CROSS) INCLUDES="" \ - gnatmake-re gnatlink-re - # gnattools2 - $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ - $(TOOLS_FLAGS_TO_PASS_CROSS) common-tools - # Rename cross tools to where the GCC makefile wants them when - # installing. FIXME: installation should be done elsewhere. - if [ -f $(GCC_DIR)/gnatbind$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatbind$(exeext) $(GCC_DIR)/gnatbind-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatchop$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatchop$(exeext) $(GCC_DIR)/gnatchop-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnat$(exeext) ] ; then \ - mv $(GCC_DIR)/gnat$(exeext) $(GCC_DIR)/gnat-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatkr$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatkr$(exeext) $(GCC_DIR)/gnatkr-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatlink$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatlink$(exeext) $(GCC_DIR)/gnatlink-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatls$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatls$(exeext) $(GCC_DIR)/gnatls-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatmake$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatmake$(exeext) $(GCC_DIR)/gnatmake-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatmem$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatmem$(exeext) $(GCC_DIR)/gnatmem-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatname$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatname$(exeext) $(GCC_DIR)/gnatname-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatprep$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatprep$(exeext) $(GCC_DIR)/gnatprep-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatxref$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatxref$(exeext) $(GCC_DIR)/gnatxref-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatfind$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatfind$(exeext) $(GCC_DIR)/gnatfind-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatclean$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatclean$(exeext) $(GCC_DIR)/gnatclean-cross$(exeext); \ - fi - if [ -f $(GCC_DIR)/gnatsym$(exeext) ] ; then \ - mv $(GCC_DIR)/gnatsym$(exeext) $(GCC_DIR)/gnatsym-cross$(exeext); \ - fi +%.o: %.c + $(GCC) -c -o $@ $< $(CFLAGS) $(INCLUDES) # Other # ----- @@ -288,6 +316,7 @@ # Installation rules. install: + $(INSTALL) -s gnatmake gnatlink $(TOOLS) $(DESTDIR)$(bindir) install-strip: install @@ -301,8 +330,10 @@ # Cleaning rules. mostlyclean: + $(RM) gnatmake gnatlink $(TOOLS) *.o *.ali clean: + $(RM) *.ads *.adb stamp-gnattools-sources distclean: $(RM) Makefile config.status config.log Index: b/src/libada/Makefile.in =================================================================== --- a/src/libada/Makefile.in +++ b/src/libada/Makefile.in @@ -64,7 +64,7 @@ -fexceptions -DIN_RTS @have_getipinfo@ host_subdir = @host_subdir@ -GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc +GCC_DIR=$(MULTIBUILDTOP)../$(host_subdir)/gcc target_noncanonical:=@target_noncanonical@ version := $(shell cat $(srcdir)/../gcc/BASE-VER) Index: b/src/Makefile.def =================================================================== --- a/src/Makefile.def +++ b/src/Makefile.def @@ -109,7 +109,20 @@ missing=distclean; missing=maintainer-clean; }; host_modules= { module= utils; no_check=true; }; -host_modules= { module= gnattools; }; +host_modules= { module= libada; no_install=true; no_check=true; + missing= info; + missing= dvi; + missing= html; + missing= TAGS; + missing= install-info; + missing= installcheck; }; +host_modules= { module= gnattools; no_check=true; + missing= info; + missing= dvi; + missing= html; + missing= TAGS; + missing= install-info; + missing= installcheck; }; host_modules= { module= lto-plugin; bootstrap=true; extra_configure_flags=--enable-shared; }; @@ -148,7 +161,13 @@ target_modules = { module= zlib; }; target_modules = { module= boehm-gc; }; target_modules = { module= rda; }; -target_modules = { module= libada; }; +target_modules = { module= libada; no_install=true; no_check=true; + missing= info; + missing= dvi; + missing= html; + missing= TAGS; + missing= install-info; + missing= installcheck; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; target_modules = { module= libitm; lib_path=.libs; }; target_modules = { module= libatomic; lib_path=.libs; }; @@ -335,7 +354,7 @@ dependencies = { module=all-fixincludes; on=all-libiberty; }; -dependencies = { module=all-gnattools; on=all-target-libada; }; +dependencies = { module=all-gnattools; on=all-libada; }; dependencies = { module=all-gnattools; on=all-target-libstdc++-v3; }; dependencies = { module=all-lto-plugin; on=all-libiberty; }; Index: b/src/Makefile.in =================================================================== --- a/src/Makefile.in +++ b/src/Makefile.in @@ -924,6 +924,7 @@ maybe-configure-tk \ maybe-configure-libtermcap \ maybe-configure-utils \ + maybe-configure-libada \ maybe-configure-gnattools \ maybe-configure-lto-plugin .PHONY: configure-target @@ -1071,6 +1072,7 @@ all-host: maybe-all-tk all-host: maybe-all-libtermcap all-host: maybe-all-utils +all-host: maybe-all-libada all-host: maybe-all-gnattools @if lto-plugin-no-bootstrap all-host: maybe-all-lto-plugin @@ -1171,6 +1173,7 @@ info-host: maybe-info-tk info-host: maybe-info-libtermcap info-host: maybe-info-utils +info-host: maybe-info-libada info-host: maybe-info-gnattools info-host: maybe-info-lto-plugin @@ -1254,6 +1257,7 @@ dvi-host: maybe-dvi-tk dvi-host: maybe-dvi-libtermcap dvi-host: maybe-dvi-utils +dvi-host: maybe-dvi-libada dvi-host: maybe-dvi-gnattools dvi-host: maybe-dvi-lto-plugin @@ -1337,6 +1341,7 @@ pdf-host: maybe-pdf-tk pdf-host: maybe-pdf-libtermcap pdf-host: maybe-pdf-utils +pdf-host: maybe-pdf-libada pdf-host: maybe-pdf-gnattools pdf-host: maybe-pdf-lto-plugin @@ -1420,6 +1425,7 @@ html-host: maybe-html-tk html-host: maybe-html-libtermcap html-host: maybe-html-utils +html-host: maybe-html-libada html-host: maybe-html-gnattools html-host: maybe-html-lto-plugin @@ -1503,6 +1509,7 @@ TAGS-host: maybe-TAGS-tk TAGS-host: maybe-TAGS-libtermcap TAGS-host: maybe-TAGS-utils +TAGS-host: maybe-TAGS-libada TAGS-host: maybe-TAGS-gnattools TAGS-host: maybe-TAGS-lto-plugin @@ -1586,6 +1593,7 @@ install-info-host: maybe-install-info-tk install-info-host: maybe-install-info-libtermcap install-info-host: maybe-install-info-utils +install-info-host: maybe-install-info-libada install-info-host: maybe-install-info-gnattools install-info-host: maybe-install-info-lto-plugin @@ -1669,6 +1677,7 @@ install-pdf-host: maybe-install-pdf-tk install-pdf-host: maybe-install-pdf-libtermcap install-pdf-host: maybe-install-pdf-utils +install-pdf-host: maybe-install-pdf-libada install-pdf-host: maybe-install-pdf-gnattools install-pdf-host: maybe-install-pdf-lto-plugin @@ -1752,6 +1761,7 @@ install-html-host: maybe-install-html-tk install-html-host: maybe-install-html-libtermcap install-html-host: maybe-install-html-utils +install-html-host: maybe-install-html-libada install-html-host: maybe-install-html-gnattools install-html-host: maybe-install-html-lto-plugin @@ -1835,6 +1845,7 @@ installcheck-host: maybe-installcheck-tk installcheck-host: maybe-installcheck-libtermcap installcheck-host: maybe-installcheck-utils +installcheck-host: maybe-installcheck-libada installcheck-host: maybe-installcheck-gnattools installcheck-host: maybe-installcheck-lto-plugin @@ -1918,6 +1929,7 @@ mostlyclean-host: maybe-mostlyclean-tk mostlyclean-host: maybe-mostlyclean-libtermcap mostlyclean-host: maybe-mostlyclean-utils +mostlyclean-host: maybe-mostlyclean-libada mostlyclean-host: maybe-mostlyclean-gnattools mostlyclean-host: maybe-mostlyclean-lto-plugin @@ -2001,6 +2013,7 @@ clean-host: maybe-clean-tk clean-host: maybe-clean-libtermcap clean-host: maybe-clean-utils +clean-host: maybe-clean-libada clean-host: maybe-clean-gnattools clean-host: maybe-clean-lto-plugin @@ -2084,6 +2097,7 @@ distclean-host: maybe-distclean-tk distclean-host: maybe-distclean-libtermcap distclean-host: maybe-distclean-utils +distclean-host: maybe-distclean-libada distclean-host: maybe-distclean-gnattools distclean-host: maybe-distclean-lto-plugin @@ -2167,6 +2181,7 @@ maintainer-clean-host: maybe-maintainer-clean-tk maintainer-clean-host: maybe-maintainer-clean-libtermcap maintainer-clean-host: maybe-maintainer-clean-utils +maintainer-clean-host: maybe-maintainer-clean-libada maintainer-clean-host: maybe-maintainer-clean-gnattools maintainer-clean-host: maybe-maintainer-clean-lto-plugin @@ -2305,6 +2320,7 @@ maybe-check-tk \ maybe-check-libtermcap \ maybe-check-utils \ + maybe-check-libada \ maybe-check-gnattools \ maybe-check-lto-plugin @@ -2414,6 +2430,7 @@ maybe-install-tk \ maybe-install-libtermcap \ maybe-install-utils \ + maybe-install-libada \ maybe-install-gnattools \ maybe-install-lto-plugin @@ -2461,6 +2478,7 @@ maybe-install-tk \ maybe-install-libtermcap \ maybe-install-utils \ + maybe-install-libada \ maybe-install-gnattools \ maybe-install-lto-plugin @@ -2564,6 +2582,7 @@ maybe-install-strip-tk \ maybe-install-strip-libtermcap \ maybe-install-strip-utils \ + maybe-install-strip-libada \ maybe-install-strip-gnattools \ maybe-install-strip-lto-plugin @@ -29883,6 +29902,331 @@ +.PHONY: configure-libada maybe-configure-libada +maybe-configure-libada: +@if gcc-bootstrap +configure-libada: stage_current +@endif gcc-bootstrap +@if libada +maybe-configure-libada: configure-libada +configure-libada: + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + test ! -f $(HOST_SUBDIR)/libada/Makefile || exit 0; \ + $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libada ; \ + $(HOST_EXPORTS) \ + echo Configuring in $(HOST_SUBDIR)/libada; \ + cd "$(HOST_SUBDIR)/libada" || exit 1; \ + case $(srcdir) in \ + /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ + *) topdir=`echo $(HOST_SUBDIR)/libada/ | \ + sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ + esac; \ + srcdiroption="--srcdir=$${topdir}/libada"; \ + libsrcdir="$$s/libada"; \ + $(SHELL) $${libsrcdir}/configure \ + $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ + --target=${target_alias} $${srcdiroption} \ + || exit 1 +@endif libada + + + + + +.PHONY: all-libada maybe-all-libada +maybe-all-libada: +@if gcc-bootstrap +all-libada: stage_current +@endif gcc-bootstrap +@if libada +TARGET-libada=all +maybe-all-libada: all-libada +all-libada: configure-libada + @: $(MAKE); $(unstage) + @r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) \ + $(TARGET-libada)) +@endif libada + + + + +.PHONY: check-libada maybe-check-libada +maybe-check-libada: +@if libada +maybe-check-libada: check-libada + +check-libada: + +@endif libada + +.PHONY: install-libada maybe-install-libada +maybe-install-libada: +@if libada +maybe-install-libada: install-libada + +install-libada: + +@endif libada + +.PHONY: install-strip-libada maybe-install-strip-libada +maybe-install-strip-libada: +@if libada +maybe-install-strip-libada: install-strip-libada + +install-strip-libada: + +@endif libada + +# Other targets (info, dvi, pdf, etc.) + +.PHONY: maybe-info-libada info-libada +maybe-info-libada: +@if libada +maybe-info-libada: info-libada + +# libada doesn't support info. +info-libada: + +@endif libada + +.PHONY: maybe-dvi-libada dvi-libada +maybe-dvi-libada: +@if libada +maybe-dvi-libada: dvi-libada + +# libada doesn't support dvi. +dvi-libada: + +@endif libada + +.PHONY: maybe-pdf-libada pdf-libada +maybe-pdf-libada: +@if libada +maybe-pdf-libada: pdf-libada + +pdf-libada: \ + configure-libada + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing pdf in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + pdf) \ + || exit 1 + +@endif libada + +.PHONY: maybe-html-libada html-libada +maybe-html-libada: +@if libada +maybe-html-libada: html-libada + +# libada doesn't support html. +html-libada: + +@endif libada + +.PHONY: maybe-TAGS-libada TAGS-libada +maybe-TAGS-libada: +@if libada +maybe-TAGS-libada: TAGS-libada + +# libada doesn't support TAGS. +TAGS-libada: + +@endif libada + +.PHONY: maybe-install-info-libada install-info-libada +maybe-install-info-libada: +@if libada +maybe-install-info-libada: install-info-libada + +# libada doesn't support install-info. +install-info-libada: + +@endif libada + +.PHONY: maybe-install-pdf-libada install-pdf-libada +maybe-install-pdf-libada: +@if libada +maybe-install-pdf-libada: install-pdf-libada + +install-pdf-libada: \ + configure-libada \ + pdf-libada + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-pdf in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-pdf) \ + || exit 1 + +@endif libada + +.PHONY: maybe-install-html-libada install-html-libada +maybe-install-html-libada: +@if libada +maybe-install-html-libada: install-html-libada + +install-html-libada: \ + configure-libada \ + html-libada + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing install-html in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + install-html) \ + || exit 1 + +@endif libada + +.PHONY: maybe-installcheck-libada installcheck-libada +maybe-installcheck-libada: +@if libada +maybe-installcheck-libada: installcheck-libada + +# libada doesn't support installcheck. +installcheck-libada: + +@endif libada + +.PHONY: maybe-mostlyclean-libada mostlyclean-libada +maybe-mostlyclean-libada: +@if libada +maybe-mostlyclean-libada: mostlyclean-libada + +mostlyclean-libada: + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing mostlyclean in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + mostlyclean) \ + || exit 1 + +@endif libada + +.PHONY: maybe-clean-libada clean-libada +maybe-clean-libada: +@if libada +maybe-clean-libada: clean-libada + +clean-libada: + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing clean in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + clean) \ + || exit 1 + +@endif libada + +.PHONY: maybe-distclean-libada distclean-libada +maybe-distclean-libada: +@if libada +maybe-distclean-libada: distclean-libada + +distclean-libada: + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing distclean in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + distclean) \ + || exit 1 + +@endif libada + +.PHONY: maybe-maintainer-clean-libada maintainer-clean-libada +maybe-maintainer-clean-libada: +@if libada +maybe-maintainer-clean-libada: maintainer-clean-libada + +maintainer-clean-libada: + @: $(MAKE); $(unstage) + @[ -f ./libada/Makefile ] || exit 0; \ + r=`${PWD_COMMAND}`; export r; \ + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ + $(HOST_EXPORTS) \ + for flag in $(EXTRA_HOST_FLAGS) ; do \ + eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ + done; \ + echo "Doing maintainer-clean in libada" ; \ + (cd $(HOST_SUBDIR)/libada && \ + $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ + "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ + "RANLIB=$${RANLIB}" \ + "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ + maintainer-clean) \ + || exit 1 + +@endif libada + + + .PHONY: configure-gnattools maybe-configure-gnattools maybe-configure-gnattools: @if gcc-bootstrap @@ -29943,12 +30287,6 @@ maybe-check-gnattools: check-gnattools check-gnattools: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(FLAGS_TO_PASS) check) @endif gnattools @@ -29989,24 +30327,8 @@ @if gnattools maybe-info-gnattools: info-gnattools -info-gnattools: \ - configure-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing info in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 +# gnattools doesn't support info. +info-gnattools: @endif gnattools @@ -30015,24 +30337,8 @@ @if gnattools maybe-dvi-gnattools: dvi-gnattools -dvi-gnattools: \ - configure-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing dvi in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 +# gnattools doesn't support dvi. +dvi-gnattools: @endif gnattools @@ -30067,24 +30373,8 @@ @if gnattools maybe-html-gnattools: html-gnattools -html-gnattools: \ - configure-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing html in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 +# gnattools doesn't support html. +html-gnattools: @endif gnattools @@ -30093,24 +30383,8 @@ @if gnattools maybe-TAGS-gnattools: TAGS-gnattools -TAGS-gnattools: \ - configure-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing TAGS in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 +# gnattools doesn't support TAGS. +TAGS-gnattools: @endif gnattools @@ -30119,25 +30393,8 @@ @if gnattools maybe-install-info-gnattools: install-info-gnattools -install-info-gnattools: \ - configure-gnattools \ - info-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-info in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 +# gnattools doesn't support install-info. +install-info-gnattools: @endif gnattools @@ -30200,24 +30457,8 @@ @if gnattools maybe-installcheck-gnattools: installcheck-gnattools -installcheck-gnattools: \ - configure-gnattools - @: $(MAKE); $(unstage) - @[ -f ./gnattools/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) ; do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing installcheck in gnattools" ; \ - (cd $(HOST_SUBDIR)/gnattools && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 +# gnattools doesn't support installcheck. +installcheck-gnattools: @endif gnattools @@ -42405,13 +42646,8 @@ @if target-libada maybe-check-target-libada: check-target-libada +# Dummy target for uncheckable module. check-target-libada: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) check) @endif target-libada @@ -42420,13 +42656,8 @@ @if target-libada maybe-install-target-libada: install-target-libada -install-target-libada: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install) +# Dummy target for uninstallable. +install-target-libada: @endif target-libada @@ -42435,13 +42666,8 @@ @if target-libada maybe-install-strip-target-libada: install-strip-target-libada -install-strip-target-libada: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(TARGET_FLAGS_TO_PASS) install-strip) +# Dummy target for uninstallable. +install-strip-target-libada: @endif target-libada @@ -42452,24 +42678,8 @@ @if target-libada maybe-info-target-libada: info-target-libada -info-target-libada: \ - configure-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing info in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 +# libada doesn't support info. +info-target-libada: @endif target-libada @@ -42478,24 +42688,8 @@ @if target-libada maybe-dvi-target-libada: dvi-target-libada -dvi-target-libada: \ - configure-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing dvi in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 +# libada doesn't support dvi. +dvi-target-libada: @endif target-libada @@ -42530,24 +42724,8 @@ @if target-libada maybe-html-target-libada: html-target-libada -html-target-libada: \ - configure-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing html in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 +# libada doesn't support html. +html-target-libada: @endif target-libada @@ -42556,24 +42734,8 @@ @if target-libada maybe-TAGS-target-libada: TAGS-target-libada -TAGS-target-libada: \ - configure-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing TAGS in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 +# libada doesn't support TAGS. +TAGS-target-libada: @endif target-libada @@ -42582,25 +42744,8 @@ @if target-libada maybe-install-info-target-libada: install-info-target-libada -install-info-target-libada: \ - configure-target-libada \ - info-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing install-info in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 +# libada doesn't support install-info. +install-info-target-libada: @endif target-libada @@ -42663,24 +42808,8 @@ @if target-libada maybe-installcheck-target-libada: installcheck-target-libada -installcheck-target-libada: \ - configure-target-libada - @: $(MAKE); $(unstage) - @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(NORMAL_TARGET_EXPORTS) \ - echo "Doing installcheck in $(TARGET_SUBDIR)/libada" ; \ - for flag in $(EXTRA_TARGET_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - (cd $(TARGET_SUBDIR)/libada && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 +# libada doesn't support installcheck. +installcheck-target-libada: @endif target-libada @@ -47248,7 +47377,7 @@ all-stage4-fixincludes: maybe-all-stage4-libiberty all-stageprofile-fixincludes: maybe-all-stageprofile-libiberty all-stagefeedback-fixincludes: maybe-all-stagefeedback-libiberty -all-gnattools: maybe-all-target-libada +all-gnattools: maybe-all-libada all-gnattools: maybe-all-target-libstdc++-v3 all-lto-plugin: maybe-all-libiberty Index: b/src/configure.ac =================================================================== --- a/src/configure.ac +++ b/src/configure.ac @@ -133,7 +133,7 @@ # these libraries are used by various programs built for the host environment # -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libdecnumber gmp mpfr mpc isl cloog libelf libiconv libada" # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -265,7 +265,7 @@ # Some are only suitable for cross toolchains. # Remove these if host=target. -cross_only="target-libgloss target-newlib target-opcodes" +cross_only="target-libgloss target-newlib target-opcodes target-libada" case $is_cross_compiler in no) skipdirs="${skipdirs} ${cross_only}" ;; Index: b/src/gcc/ada/gcc-interface/Make-lang.in =================================================================== --- a/src/gcc/ada/gcc-interface/Make-lang.in +++ b/src/gcc/ada/gcc-interface/Make-lang.in @@ -87,10 +87,6 @@ "INSTALL_DATA=$(INSTALL_DATA)" \ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" -# List of Ada tools to build and install -ADA_TOOLS=gnatbind gnatchop gnat gnatkr gnatlink gnatls gnatmake \ - gnatname gnatprep gnatxref gnatfind gnatclean gnatsym - # Say how to compile Ada programs. .SUFFIXES: .ada .adb .ads @@ -635,13 +631,6 @@ # Build hooks: ada.all.cross: - for tool in $(ADA_TOOLS) ; do \ - if [ -f $$tool$(exeext) ] ; \ - then \ - $(MV) $$tool$(exeext) $$tool-cross$(exeext); \ - fi; \ - done - ada.start.encap: ada.rest.encap: ada.man: @@ -759,42 +748,7 @@ # Install hooks: # gnat1 is installed elsewhere as part of $(COMPILERS). -# Install the binder program as gnatbind (native) or $(prefix)gnatbind -# (cross). $(prefix) comes from the --program-prefix configure option, -# or from the --target option if the former is not specified. -# Do the same for the rest of the Ada tools (gnatchop, gnat, gnatkr, -# gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gnatfind, -# gnatclean, gnatsym). -# gnatsym is only built on some platforms, including VMS. -# gnatdll is only used on Windows. -# vxaddr2line is only used for cross VxWorks ports (it calls the underlying -# cross addr2line). ada.install-common: - $(MKDIR) $(DESTDIR)$(bindir) - -if [ -f gnat1$(exeext) ] ; \ - then \ - for tool in $(ADA_TOOLS) ; do \ - install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \ - $(RM) $(DESTDIR)$(bindir)/$$install_name; \ - if [ -f $$tool-cross$(exeext) ] ; \ - then \ - $(INSTALL_PROGRAM) $$tool-cross$(exeext) $(DESTDIR)$(bindir)/$$install_name; \ - else \ - $(INSTALL_PROGRAM) $$tool$(exeext) $(DESTDIR)$(bindir)/$$install_name; \ - fi ; \ - done; \ - $(RM) $(DESTDIR)$(bindir)/gnatdll$(exeext); \ - $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \ - if [ -f vxaddr2line$(exeext) ] ; \ - then \ - $(RM) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \ - $(INSTALL_PROGRAM) vxaddr2line$(exeext) $(DESTDIR)$(bindir)/vxaddr2line$(exeext); \ - fi ; \ - fi - -# -# Finally, install the library -# -if [ -f gnat1$(exeext) ] ; \ then \ $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \ @@ -810,10 +764,6 @@ ada.install-plugin: ada.uninstall: - for tool in $(ADA_TOOLS) ; do \ - install_name=`echo $$tool|sed '$(program_transform_name)'`$(exeext); \ - -$(RM) $(DESTDIR)$(bindir)/$$install_name; \ - done -$(RM) $(DESTDIR)$(tooldir)/bin/gnatdll$(exeext) -$(RM) $(DESTDIR)$(tooldir)/bin/vxaddr2line$(exeext)