cross-gnattools: force
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools2
+ $(GNATTOOLS_CROSS_MV)
canadian-gnattools: force
$(MAKE) -C ada $(ADA_TOOLS_FLAGS_TO_PASS) gnattools1-re
FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \
$@
+gnattools-cross-mv:
+ $(GNATTOOLS_CROSS_MV)
+
+GNATTOOLS_CROSS_MV=\
+ for tool in $(ADA_TOOLS) ; do \
+ if [ -f $$tool$(exeext) ] ; \
+ then \
+ $(MV) $$tool$(exeext) $$tool-cross$(exeext); \
+ fi; \
+ done
+
# use only for native compiler
gnatlib_and_tools: gnatlib gnattools
# 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:
# which prevent multilib from working, so define a new one.
proc local_find_gnatmake {} {
+ global target_triplet
global tool_root_dir
+ global host_triplet
if ![is_remote host] {
- set file [lookfor_file $tool_root_dir gnatmake]
+ if { "$host_triplet" == "$target_triplet" } {
+ set gnatmake gnatmake
+ } else {
+ set gnatmake gnatmake-cross
+ }
+ set file [lookfor_file $tool_root_dir $gnatmake]
if { $file == "" } {
- set file [lookfor_file $tool_root_dir gcc/gnatmake]
+ set file [lookfor_file $tool_root_dir gcc/$gnatmake]
}
if { $file != "" } {
set root [file dirname $file]
}
proc find_gnatclean {} {
+ global target_triplet
global tool_root_dir
+ global host_triplet
if ![is_remote host] {
- set file [lookfor_file $tool_root_dir gnatclean]
+ if { "$host_triplet" == "$target_triplet" } {
+ set gnatclean gnatclean
+ } else {
+ set gnatclean gnatclean-cross
+ }
+ set file [lookfor_file $tool_root_dir $gnatclean]
if { $file == "" } {
- set file [lookfor_file $tool_root_dir gcc/gnatclean]
+ set file [lookfor_file $tool_root_dir gcc/$gnatclean]
}
if { $file != "" } {
set gnatclean $file;