diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-12 22:50:07 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-12 22:50:07 +0000 |
commit | 9a3248c9a9dc5857e053f39d9912123bbcef5e96 (patch) | |
tree | 02c4df5dbe3d9240d6a820494453be54806358b2 /gnattools | |
parent | 67d385b18014f7aa1734ab340963e4de64275b1a (diff) | |
download | gcc-9a3248c9a9dc5857e053f39d9912123bbcef5e96.tar.gz |
PR ada/55946
gnattools/
* Makefile.in (host): Define.
(host_alias): Likewise.
(TOOLS_FLAGS_TO_PASS_RE): Add LDFLAGS.
(GNATMAKE_FOR_HOST): Define.
(GNATLINK_FOR_HOST): Likewise.
(GNATBIND_FOR_HOST): Likewise.
(GNATLS_FOR_HOST): Likewise.
(RTS_DIR): Move around and use GNATLS_FOR_HOST.
(TOOLS_FLAGS_TO_PASS_CROSS): Use the other *_HOST variables.
gcc/ada/
* gcc-interface/Make-lang.in (ada/doctools/xgnatugn): Use gnatmake.
* gcc-interface/Makefile.in (GCC_LINK): Add LDFLAGS.
(../../gnatmake): Remove LDFLAGS.
(../../gnatlink): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gnattools')
-rw-r--r-- | gnattools/ChangeLog | 14 | ||||
-rw-r--r-- | gnattools/Makefile.in | 30 |
2 files changed, 36 insertions, 8 deletions
diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog index 98f528a4cd5..a2dbb2f21ab 100644 --- a/gnattools/ChangeLog +++ b/gnattools/ChangeLog @@ -1,3 +1,17 @@ +2013-12-13 Eric Botcazou <ebotcazou@adacore.com> + Iain Sandoe <iain@codesourcery.com> + + PR ada/55946 + * Makefile.in (host): Define. + (host_alias): Likewise. + (TOOLS_FLAGS_TO_PASS_RE): Add LDFLAGS. + (GNATMAKE_FOR_HOST): Define. + (GNATLINK_FOR_HOST): Likewise. + (GNATBIND_FOR_HOST): Likewise. + (GNATLS_FOR_HOST): Likewise. + (RTS_DIR): Move around and use GNATLS_FOR_HOST. + (TOOLS_FLAGS_TO_PASS_CROSS): Use the other *_HOST variables. + 2013-12-04 Eric Botcazou <ebotcazou@adacore.com> PR ada/59382 diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in index fdd649194df..4ec7afd5dd8 100644 --- a/gnattools/Makefile.in +++ b/gnattools/Makefile.in @@ -24,6 +24,8 @@ srcdir = @srcdir@ libdir = @libdir@ build = @build@ target = @target@ +host = @host@ +host_alias = @host_alias@ prefix = @prefix@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -92,6 +94,7 @@ 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)" \ @@ -105,6 +108,22 @@ TOOLS_FLAGS_TO_PASS_RE= \ "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)" \ @@ -117,9 +136,9 @@ TOOLS_FLAGS_TO_PASS_CROSS= \ "exeext=$(exeext)" \ "fsrcdir=$(fsrcdir)" \ "srcdir=$(fsrcdir)" \ - "GNATMAKE=gnatmake" \ - "GNATLINK=gnatlink" \ - "GNATBIND=gnatbind" \ + "GNATMAKE=$(GNATMAKE_FOR_HOST)" \ + "GNATLINK=$(GNATLINK_FOR_HOST)" \ + "GNATBIND=$(GNATBIND_FOR_HOST)" \ "TOOLSCASE=cross" \ "LIBGNAT=" @@ -188,11 +207,6 @@ regnattools: $(GCC_DIR)/stamp-gnatlib-rts $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ $(TOOLS_FLAGS_TO_PASS_NATIVE) common-tools -# For cross builds of gnattools, -# put the host RTS dir first in the PATH to hide the default runtime -# files that are among the sources -# FIXME: This should be done in configure. -RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib ))) gnattools-cross: $(GCC_DIR)/stamp-tools # gnattools1-re $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \ |