re PR ada/88429 (libada build fails with --disable-shared)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 11 Dec 2018 23:04:39 +0000 (23:04 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 11 Dec 2018 23:04:39 +0000 (23:04 +0000)
libada/
PR ada/88429
* configure.ac (default_gnatlib_target): Set to gnatlib instead of
gnatlib-plain if --disable-shared.
* configure: Regenerate.
* Makefile.in (all): Replace gnatlib prerequisite with libada.
(ADA_RTS_SUBDIR): Delete.
(libada): New target, renamed from...
(gnatlib): ...this.  Merge with other library targets.
(gnatlib-plain): Delete.
(install-gnatlib): Rename to...
(install-libada): ...this.
(install): Replace install-gnatlib prerequisite with install-libada.
gcc/ada/
PR ada/88429
* gcc-interface/Makefile.in (./stamp-gnatlib1-$(RTSDIR)): Also pass
MULTISUBDIR to sub-make and add quotes around $(THREAD_KIND).
(gnatlib-shared-dual): Also pass PICFLAG_FOR_TARGET to sub-make.
(gnatlib-sjlj): Also pass MULTISUBDIR to sub-make, but do not pass
PICFLAG_FOR_TARGET.
(gnatlib-zcx): Likewise.

From-SVN: r267034

gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gcc-interface/Makefile.in
libada/ChangeLog
libada/Makefile.in
libada/configure
libada/configure.ac

index 94c7ca75cab5fa06f733fc47abb98681cfc7ad4a..566f560667f1b8ec65553533b6258b70bf172fb0 100644 (file)
@@ -10,7 +10,7 @@
        error when stack pointer is clobbered.
        (expand_asm_stmt): Refactor clobber check in separate function.
 
-2018-12-11  Eric Botcazou  <botcazou@adacore.com>
+2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>
 
        * config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
        accounting for STACK_BOUNDARY 128.
index c0ba34a874fca6cde6eea3f8a716068b0f14705f..f04a052adec574dc10b10615969fc5e2980af441 100644 (file)
@@ -1,7 +1,16 @@
+2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ada/88429
+       * gcc-interface/Makefile.in (./stamp-gnatlib1-$(RTSDIR)): Also pass
+       MULTISUBDIR to sub-make and add quotes around $(THREAD_KIND).
+       (gnatlib-shared-dual): Also pass PICFLAG_FOR_TARGET to sub-make.
+       (gnatlib-sjlj): Also pass MULTISUBDIR to sub-make, but do not pass
+       PICFLAG_FOR_TARGET.
+       (gnatlib-zcx): Likewise.
+
 2018-12-11  Piotr Trojanek  <trojanek@adacore.com>
 
-       * libgnat/a-calend.ads: Add "Global => null" contracts to pure
-       routines.
+       * libgnat/a-calend.ads: Add "Global => null" contract to pure routines.
 
 2018-12-11  Hristian Kirtchev  <kirtchev@adacore.com>
 
index 07dc1e598139c5b2e2a8d66880acaa644bc5d8d9..4e74252bd7405e10b04cb2fcf4b8893964754023 100644 (file)
@@ -1,5 +1,5 @@
 # Makefile for GNU Ada Compiler (GNAT).
-#   Copyright (C) 1994-2017 Free Software Foundation, Inc.
+#   Copyright (C) 1994-2018 Free Software Foundation, Inc.
 
 #This file is part of GCC.
 
@@ -564,7 +564,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
        $(RM) ../stamp-gnatlib-$(RTSDIR)
 
 ../stamp-gnatlib1-$(RTSDIR): Makefile ../stamp-gnatlib2-$(RTSDIR)
-       $(MAKE) THREAD_KIND=$(THREAD_KIND) setup-rts
+       $(MAKE) MULTISUBDIR="$(MULTISUBDIR)" THREAD_KIND="$(THREAD_KIND)" setup-rts
 # Copy tsystem.h
        $(CP) $(srcdir)/tsystem.h $(RTSDIR)
        $(RM) ../stamp-gnatlib-$(RTSDIR)
@@ -688,6 +688,7 @@ gnatlib-shared-dual:
              GNATLIBFLAGS="$(GNATLIBFLAGS)" \
             GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \
             GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \
+            PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \
             MULTISUBDIR="$(MULTISUBDIR)" \
             THREAD_KIND="$(THREAD_KIND)" \
              gnatlib-shared-default
@@ -804,8 +805,11 @@ gnatlib-shared:
 # commenting the pragma instead of deleting the line, as the latter might
 # result in getting multiple blank lines, hence possible style check errors.
 gnatlib-sjlj:
-       $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" \
-       THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
+       $(MAKE) $(FLAGS_TO_PASS) \
+            EH_MECHANISM="" \
+            MULTISUBDIR="$(MULTISUBDIR)" \
+            THREAD_KIND="$(THREAD_KIND)" \
+            ../stamp-gnatlib1-$(RTSDIR)
        sed \
          -e 's/Frontend_Exceptions.*/Frontend_Exceptions       : constant Boolean := True;/' \
          -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := False;/' \
@@ -819,11 +823,14 @@ gnatlib-sjlj:
             FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
             MULTISUBDIR="$(MULTISUBDIR)" \
             THREAD_KIND="$(THREAD_KIND)" \
-            PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
+            gnatlib
 
 gnatlib-zcx:
-       $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \
-         THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR)
+       $(MAKE) $(FLAGS_TO_PASS) \
+            EH_MECHANISM="-gcc" \
+            MULTISUBDIR="$(MULTISUBDIR)" \
+            THREAD_KIND="$(THREAD_KIND)" \
+            ../stamp-gnatlib1-$(RTSDIR)
        sed \
          -e 's/Frontend_Exceptions.*/Frontend_Exceptions       : constant Boolean := False;/' \
          -e 's/ZCX_By_Default.*/ZCX_By_Default            : constant Boolean := True;/' \
@@ -837,7 +844,7 @@ gnatlib-zcx:
             FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
             MULTISUBDIR="$(MULTISUBDIR)" \
             THREAD_KIND="$(THREAD_KIND)" \
-            PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib
+            gnatlib
 
 # Compiling object files from source files.
 
index 1dcc1b5d2e1808fcf0af80fe33e03938d8b38c7a..e6f186c47d4eaa47fd248b0efc9b8582888ca7b0 100644 (file)
@@ -1,3 +1,18 @@
+2018-12-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ada/88429
+       * configure.ac (default_gnatlib_target): Set to gnatlib instead of
+       gnatlib-plain if --disable-shared.
+       * configure: Regenerate.
+       * Makefile.in (all): Replace gnatlib prerequisite with libada.
+       (ADA_RTS_SUBDIR): Delete.
+       (libada): New target, renamed from...
+       (gnatlib): ...this.  Merge with other library targets.
+       (gnatlib-plain): Delete.
+       (install-gnatlib): Rename to...
+       (install-libada): ...this.
+       (install): Replace install-gnatlib prerequisite with install-libada.
+
 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
 
        PR bootstrap/82856
index a2f6afef838d5813fe5d5742108226cb0cd87d36..aa6c3273c343392889dcfab94298de8d3046367e 100644 (file)
@@ -16,7 +16,7 @@
 # <http://www.gnu.org/licenses/>.
 
 # Default target; must be first.
-all: gnatlib
+all: libada
        $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
 
 .PHONY: all
@@ -70,7 +70,6 @@ target_noncanonical:=@target_noncanonical@
 version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
 libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
 ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
-ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
 
 # exeext should not be used because it's the *host* exeext.  We're building
 # a *target* library, aren't we?!?  Likewise for CC.  Still, provide bogus
@@ -96,20 +95,12 @@ LIBADA_FLAGS_TO_PASS = \
        "GCC_FOR_TARGET=$(CC)" \
         "CFLAGS=$(CFLAGS)"
 
-# Rules to build gnatlib.
-.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared osconstool
-gnatlib: @default_gnatlib_target@
+.PHONY: libada gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx osconstool
 
-gnatlib-plain: osconstool $(GCC_DIR)/ada/Makefile
-       test -f stamp-libada || \
-       $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) gnatlib \
-       && touch stamp-libada
-       -rm -rf adainclude
-       -rm -rf adalib
-       $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adainclude
-       $(LN_S_RECURSIVE) $(ADA_RTS_DIR) adalib
+# Rules to build and install libada.
+libada: @default_gnatlib_target@
 
-gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
+gnatlib gnatlib-shared gnatlib-sjlj gnatlib-zcx: osconstool $(GCC_DIR)/ada/Makefile
        test -f stamp-libada || \
        $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) $@ \
        && touch stamp-libada
@@ -121,7 +112,7 @@ gnatlib-sjlj gnatlib-zcx gnatlib-shared: osconstool $(GCC_DIR)/ada/Makefile
 osconstool:
        $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) ./bldtools/oscons/xoscons
 
-install-gnatlib: $(GCC_DIR)/ada/Makefile
+install-libada: $(GCC_DIR)/ada/Makefile
        $(MAKE) -C $(GCC_DIR)/ada $(LIBADA_FLAGS_TO_PASS) install-gnatlib
 
 # Check uninstalled version.
@@ -148,7 +139,7 @@ TAGS:
 .PHONY: check installcheck info dvi pdf html
 
 # Installation rules.
-install: install-gnatlib
+install: install-libada
        $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
 
 install-strip: install
index 1b056ac44ac859611c8e6f7c0173ec1ea9af2fd9..743f98afd8eb96a4bef1779236f61b6f82a3d20f 100755 (executable)
@@ -3264,7 +3264,7 @@ fi
 if test ${enable_shared} = yes; then
   default_gnatlib_target="gnatlib-shared"
 else
-  default_gnatlib_target="gnatlib-plain"
+  default_gnatlib_target="gnatlib"
 fi
 
 
index 6c7aca01314533b906d71f037d5c6fa95d906d3e..6c0bb8bed1052f9a42a0136b8c33e95d0afb4fc1 100644 (file)
@@ -129,7 +129,7 @@ AC_PROG_LN_S
 if test ${enable_shared} = yes; then
   default_gnatlib_target="gnatlib-shared"
 else
-  default_gnatlib_target="gnatlib-plain"
+  default_gnatlib_target="gnatlib"
 fi
 AC_SUBST([default_gnatlib_target])