re PR ada/55946 (wrong tools used for build of gnattools [native-cross])
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. Co-Authored-By: Iain Sandoe <iain@codesourcery.com> From-SVN: r205945
This commit is contained in:
parent
3742998dca
commit
c8601e4115
5 changed files with 49 additions and 14 deletions
|
@ -1,3 +1,12 @@
|
|||
2013-12-13 Eric Botcazou <ebotcazou@adacore.com>
|
||||
Iain Sandoe <iain@codesourcery.com>
|
||||
|
||||
PR ada/55946
|
||||
* gcc-interface/Make-lang.in (ada/doctools/xgnatugn): Use gnatmake.
|
||||
* gcc-interface/Makefile.in (GCC_LINK): Add LDFLAGS.
|
||||
(../../gnatmake): Remove LDFLAGS.
|
||||
(../../gnatlink): Likewise.
|
||||
|
||||
2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
PR ada/59382
|
||||
|
|
|
@ -658,7 +658,7 @@ ada.tags: force
|
|||
ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb
|
||||
-$(MKDIR) ada/doctools
|
||||
$(CP) $^ ada/doctools
|
||||
cd ada/doctools && $(GNATMAKE) -q xgnatugn
|
||||
cd ada/doctools && gnatmake -q xgnatugn
|
||||
|
||||
# Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on
|
||||
# xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info
|
||||
|
|
|
@ -2415,7 +2415,7 @@ TOOLS_FLAGS_TO_PASS= \
|
|||
"GNATLINK=$(GNATLINK)" \
|
||||
"GNATBIND=$(GNATBIND)"
|
||||
|
||||
GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
|
||||
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
|
||||
|
@ -2537,12 +2537,10 @@ gnatlink-re: ../stamp-tools gnatmake-re
|
|||
|
||||
# Likewise for the tools
|
||||
../../gnatmake$(exeext): $(P) b_gnatm.o $(GNATMAKE_OBJS)
|
||||
+$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) \
|
||||
$(TOOLS_LIBS)
|
||||
+$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatm.o $(GNATMAKE_OBJS) $(TOOLS_LIBS)
|
||||
|
||||
../../gnatlink$(exeext): $(P) b_gnatl.o $(GNATLINK_OBJS)
|
||||
+$(GCC_LINK) $(ALL_CFLAGS) $(LDFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) \
|
||||
$(TOOLS_LIBS)
|
||||
+$(GCC_LINK) $(ALL_CFLAGS) -o $@ b_gnatl.o $(GNATLINK_OBJS) $(TOOLS_LIBS)
|
||||
|
||||
../stamp-gnatlib-$(RTSDIR):
|
||||
@if [ ! -f stamp-gnatlib-$(RTSDIR) ] ; \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 \
|
||||
|
|
Loading…
Add table
Reference in a new issue