From 47e62307a7044bc09063b954383d8bedaf57f28c Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 16 May 2016 08:55:12 +0000 Subject: [PATCH] configure.ac: Add ACX_NONCANONICAL_HOST. gnattools/ * configure.ac: Add ACX_NONCANONICAL_HOST. * configure: Regenerate. * Makefile.in: Replace host_alias with host_noncanonical. (gnattools-cross): Do not rename the tools. gcc/ * configure.ac: Add ACX_NONCANONICAL_HOST. * configure: Regenerate. * Makefile.in: Set host_noncanonical. gcc/ada * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian cross case, use host_noncanonical instead of host as prefix. (GNATBIND_FOR_HOST): Likewise. (GNATLINK_FOR_HOST): Likewise. (GNATLS_FOR_HOST): Likewise. From-SVN: r236267 --- gcc/ChangeLog | 6 ++++ gcc/Makefile.in | 1 + gcc/ada/ChangeLog | 8 +++++ gcc/ada/gcc-interface/Make-lang.in | 8 ++--- gcc/configure | 11 ++++-- gcc/configure.ac | 3 ++ gnattools/ChangeLog | 7 ++++ gnattools/Makefile.in | 54 +++--------------------------- gnattools/configure | 3 ++ gnattools/configure.ac | 1 + 10 files changed, 46 insertions(+), 56 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c0f78ed83c8..da0814633fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-05-16 Eric Botcazou + + * configure.ac: Add ACX_NONCANONICAL_HOST. + * configure: Regenerate. + * Makefile.in: Set host_noncanonical. + 2016-05-14 Uros Bizjak PR target/71097 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 6c5adc0bb58..673f87dad89 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -56,6 +56,7 @@ MAKEOVERRIDES = build=@build@ host=@host@ +host_noncanonical=@host_noncanonical@ target=@target@ target_noncanonical:=@target_noncanonical@ diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7cd2d413b6a..6dde4738b5e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2016-05-16 Eric Botcazou + + * gcc-interface/Make-lang.in (GNATMAKE_FOR_HOST): In the canadian + cross case, use host_noncanonical instead of host as prefix. + (GNATBIND_FOR_HOST): Likewise. + (GNATLINK_FOR_HOST): Likewise. + (GNATLS_FOR_HOST): Likewise. + 2016-05-06 Eric Botcazou PR ada/70969 diff --git a/gcc/ada/gcc-interface/Make-lang.in b/gcc/ada/gcc-interface/Make-lang.in index fbfa6c62ea5..47a92687f76 100644 --- a/gcc/ada/gcc-interface/Make-lang.in +++ b/gcc/ada/gcc-interface/Make-lang.in @@ -175,10 +175,10 @@ else # or a cross-native compiler. We provide defaults for tools targeting the # host platform, but they can be overriden by just setting _FOR_HOST # variables. - GNATMAKE_FOR_HOST=$(host)-gnatmake - GNATBIND_FOR_HOST=$(host)-gnatbind - GNATLINK_FOR_HOST=$(host)-gnatlink - GNATLS_FOR_HOST=$(host)-gnatls + GNATMAKE_FOR_HOST=$(host_noncanonical)-gnatmake + GNATBIND_FOR_HOST=$(host_noncanonical)-gnatbind + GNATLINK_FOR_HOST=$(host_noncanonical)-gnatlink + GNATLS_FOR_HOST=$(host_noncanonical)-gnatls ifeq ($(host), $(target)) # This is a cross native. All the sources are taken from the currently diff --git a/gcc/configure b/gcc/configure index 319dcc3125e..c8d8abcb3a5 100755 --- a/gcc/configure +++ b/gcc/configure @@ -822,6 +822,7 @@ host_subdir build_subdir build_libsubdir target_noncanonical +host_noncanonical target_os target_vendor target_cpu @@ -3323,7 +3324,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -# Determine the noncanonical target name, for directory use. +# Determine the noncanonical host name, for Ada. case ${build_alias} in "") build_noncanonical=${build} ;; *) build_noncanonical=${build_alias} ;; @@ -3334,6 +3335,10 @@ esac *) host_noncanonical=${host_alias} ;; esac + + + +# Determine the noncanonical target name, for directory use. case ${target_alias} in "") target_noncanonical=${host_noncanonical} ;; *) target_noncanonical=${target_alias} ;; @@ -18474,7 +18479,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18477 "configure" +#line 18482 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18580,7 +18585,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18583 "configure" +#line 18588 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index d55f8458943..ab91de6e4b1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -35,6 +35,9 @@ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET +# Determine the noncanonical host name, for Ada. +ACX_NONCANONICAL_HOST + # Determine the noncanonical target name, for directory use. ACX_NONCANONICAL_TARGET diff --git a/gnattools/ChangeLog b/gnattools/ChangeLog index 18aa7021d66..9432ce1add5 100644 --- a/gnattools/ChangeLog +++ b/gnattools/ChangeLog @@ -1,3 +1,10 @@ +2016-05-16 Eric Botcazou + + * configure.ac: Add ACX_NONCANONICAL_HOST. + * configure: Regenerate. + * Makefile.in: Replace host_alias with host_noncanonical. + (gnattools-cross): Do not rename the tools. + 2016-04-04 Segher Boessenkool PR bootstrap/70173 diff --git a/gnattools/Makefile.in b/gnattools/Makefile.in index f949ca9b34b..b0860eaf96d 100644 --- a/gnattools/Makefile.in +++ b/gnattools/Makefile.in @@ -25,7 +25,6 @@ libdir = @libdir@ build = @build@ target = @target@ host = @host@ -host_alias = @host_alias@ prefix = @prefix@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ @@ -34,6 +33,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ # Nonstandard autoconf-set variables. LN_S=@LN_S@ target_noncanonical=@target_noncanonical@ +host_noncanonical=@host_noncanonical@ # Variables for the user (or the top level) to override. exeext = @EXEEXT@ @@ -118,10 +118,10 @@ ifeq ($(build), $(host)) 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 + GNATMAKE_FOR_HOST=$(host_noncanonical)-gnatmake + GNATLINK_FOR_HOST=$(host_noncanonical)-gnatlink + GNATBIND_FOR_HOST=$(host_noncanonical)-gnatbind + GNATLS_FOR_HOST=$(host_noncanonical)-gnatls endif # Put the host RTS dir first in the PATH to hide the default runtime @@ -219,50 +219,6 @@ gnattools-cross: $(GCC_DIR)/stamp-tools # 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 # Other # ----- diff --git a/gnattools/configure b/gnattools/configure index 5243ebd70e4..8c75cc06eb5 100755 --- a/gnattools/configure +++ b/gnattools/configure @@ -567,6 +567,7 @@ TOOLS_TARGET_PAIRS default_gnattools_target LN_S target_noncanonical +host_noncanonical target_os target_vendor target_cpu @@ -1990,6 +1991,8 @@ esac *) host_noncanonical=${host_alias} ;; esac + + case ${target_alias} in "") target_noncanonical=${host_noncanonical} ;; *) target_noncanonical=${target_alias} ;; diff --git a/gnattools/configure.ac b/gnattools/configure.ac index 9a7c42ac818..86d8926b6c0 100644 --- a/gnattools/configure.ac +++ b/gnattools/configure.ac @@ -46,6 +46,7 @@ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_CANONICAL_TARGET +ACX_NONCANONICAL_HOST ACX_NONCANONICAL_TARGET # Need to pass this down for now :-P