public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [ada, build] Restore Solaris/amd64 Ada bootstrap (PR ada/57188)
@ 2013-05-08  9:27 Rainer Orth
  2013-05-13 11:10 ` Rainer Orth
  2013-05-28  7:28 ` [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188)) Thomas Schwinge
  0 siblings, 2 replies; 33+ messages in thread
From: Rainer Orth @ 2013-05-08  9:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet

[-- Attachment #1: Type: text/plain, Size: 1371 bytes --]

As described in the PR, amd64-pc-solaris2.1[01] Ada bootstrap was failing
for some time.  It has turned out that this patch is the culprit:

2013-04-23  Eric Botcazou  <ebotcazou@adacore.com>
            Pascal Obry    <obry@adacore.com>

        * gcc-interface/Makefile.in (targ): Fix target name check.

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -259,7 +259,7 @@ TOOLS_LIBS = targext.o link.o ../../ggc-
 # manufacturer, and operating system and assign each of those to its own
 # variable.
 host:=$(subst -, ,$(host_canonical))
-targ:=$(subst -, ,$(target))
+targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
 arch:=$(word 1,$(targ))
 ifeq ($(words $(targ)),2)
   manu:=

I couldn't find the gcc-patches posting for this patch, thus I'm missing
the rationale for it.  It seems rather counterintuitive and fragile to
me, replacing the canonical $target by the far more varied $target_alias.

If there's really a good reason to keep that patch nonetheless, the
following patch fixes Solaris/x64 bootstrap.

Bootstrapped without regression on amd64-pc-solaris2.10 and
i386-pc-solaris2.11.  Ok for mainline?

	Rainer


2013-05-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR ada/57188
	* gcc-interface/Makefile.in: Allow for amd64 solaris2.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: solx64-ada-bootstrap.patch --]
[-- Type: text/x-patch, Size: 642 bytes --]

# HG changeset patch
# Parent 39be8981e0816719cfdfb2ee73eb7df6dc2d4811
Restore Solaris/amd64 Ada bootstrap (PR ada/57188)

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -1098,7 +1098,7 @@ ifeq ($(strip $(filter-out sparc% sun so
 endif
 
 # x86 and x86-64 solaris
-ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \

[-- Attachment #3: Type: text/plain, Size: 143 bytes --]


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] Restore Solaris/amd64 Ada bootstrap (PR ada/57188)
  2013-05-08  9:27 [ada, build] Restore Solaris/amd64 Ada bootstrap (PR ada/57188) Rainer Orth
@ 2013-05-13 11:10 ` Rainer Orth
  2013-05-28  7:28 ` [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188)) Thomas Schwinge
  1 sibling, 0 replies; 33+ messages in thread
From: Rainer Orth @ 2013-05-13 11:10 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> As described in the PR, amd64-pc-solaris2.1[01] Ada bootstrap was failing
> for some time.  It has turned out that this patch is the culprit:
>
> 2013-04-23  Eric Botcazou  <ebotcazou@adacore.com>
>             Pascal Obry    <obry@adacore.com>
>
>         * gcc-interface/Makefile.in (targ): Fix target name check.
[...]
> I couldn't find the gcc-patches posting for this patch, thus I'm missing
> the rationale for it.  It seems rather counterintuitive and fragile to
> me, replacing the canonical $target by the far more varied $target_alias.
>
> If there's really a good reason to keep that patch nonetheless, the
> following patch fixes Solaris/x64 bootstrap.
>
> Bootstrapped without regression on amd64-pc-solaris2.10 and
> i386-pc-solaris2.11.  Ok for mainline?

The patch was approved by Arno in the PR, so I've installed it.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188))
  2013-05-08  9:27 [ada, build] Restore Solaris/amd64 Ada bootstrap (PR ada/57188) Rainer Orth
  2013-05-13 11:10 ` Rainer Orth
@ 2013-05-28  7:28 ` Thomas Schwinge
  2013-05-29 10:50   ` [ada, build] host/target configuration Thomas Schwinge
  2014-03-16 10:07   ` Andreas Schwab
  1 sibling, 2 replies; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-28  7:28 UTC (permalink / raw)
  To: gcc-patches; +Cc: Arnaud Charlet, Rainer Orth, ebotcazou, obry

[-- Attachment #1: Type: text/plain, Size: 26506 bytes --]

Hi!

On Wed, 08 May 2013 11:27:09 +0200, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> As described in the PR, amd64-pc-solaris2.1[01] Ada bootstrap was failing
> for some time.  It has turned out that this patch is the culprit:
> 
> 2013-04-23  Eric Botcazou  <ebotcazou@adacore.com>
>             Pascal Obry    <obry@adacore.com>
> 
>         * gcc-interface/Makefile.in (targ): Fix target name check.
> 
> diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
> --- a/gcc/ada/gcc-interface/Makefile.in
> +++ b/gcc/ada/gcc-interface/Makefile.in
> @@ -259,7 +259,7 @@ TOOLS_LIBS = targext.o link.o ../../ggc-
>  # manufacturer, and operating system and assign each of those to its own
>  # variable.
>  host:=$(subst -, ,$(host_canonical))
> -targ:=$(subst -, ,$(target))
> +targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
>  arch:=$(word 1,$(targ))
>  ifeq ($(words $(targ)),2)
>    manu:=
|    osys:=$(word 2,$(targ))
|  else
|    manu:=$(word 2,$(targ))
|    osys:=$(word 3,$(targ))
|  endif

> I couldn't find the gcc-patches posting for this patch, thus I'm missing
> the rationale for it.  It seems rather counterintuitive and fragile to
> me, replacing the canonical $target by the far more varied $target_alias.

I concur, and this has now caused confusion for the (pending upstream
re-submission) x86 GNU/Hurd port, too, for which, upon removing -gnu from
the target of i686-pc-gnu0.3, now a mere 0.3 remains for osys...

> If there's really a good reason to keep that patch nonetheless, [...]

How about we use something like the following (untested) patch?  In
essence, replace the manual parsing in gcc/ada/gcc-interface/Makefile.in
by using the values the configure script already computed for us.  This
is largely straightforward (I would hope); please especially review the
more involved cases such as the one where I'm now using linux%eabi -- for
example, does that do the right thing or interfere with the Android
configurations?

The target_cpu_canonical substitution has been added in commit
369e542b3ad1c0acfa9bfaeb72b338d8db5ba2ef (2009-02-27, r144463, schwab)
but unused ever since, thus removed.

I'll now be testing for x86 GNU/Linux and GNU/Hurd; further testing
appreciated.

Other than rebuilding from scratch, how do I rebuild only the affected
Ada/GNAT bits after regenerating gcc/ada/gcc-interface/Makefile?  It
doesn't just work, and »make clean-target-libada clean-gnattools« doesn't
help either?

diff --git gcc/ada/gcc-interface/Makefile.in gcc/ada/gcc-interface/Makefile.in
index eeb8c7f..c07722b 100644
--- gcc/ada/gcc-interface/Makefile.in
+++ gcc/ada/gcc-interface/Makefile.in
@@ -151,12 +151,15 @@ GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
 program_transform_name =
 objdir = .
 
-target_alias=@target_alias@
 target=@target@
+target_cpu=@target_cpu@
+target_vendor=@target_vendor@
+target_os=@target_os@
+host_cpu=@host_cpu@
+host_vendor=@host_vendor@
+host_os=@host_os@
 xmake_file = @xmake_file@
 tmake_file = @tmake_file@
-host_canonical=@host@
-target_cpu_default=@target_cpu_default@
 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
 
@@ -255,20 +258,6 @@ TOOLS_LIBS = targext.o link.o ../../ggc-none.o ../../libcommon-target.a \
   ../../../libbacktrace/.libs/libbacktrace.a ../../../libiberty/libiberty.a \
   $(SYSLIBS) $(TGT_LIB)
 
-# Convert the target variable into a space separated list of architecture,
-# manufacturer, and operating system and assign each of those to its own
-# variable.
-host:=$(subst -, ,$(host_canonical))
-targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
-arch:=$(word 1,$(targ))
-ifeq ($(words $(targ)),2)
-  manu:=
-  osys:=$(word 2,$(targ))
-else
-  manu:=$(word 2,$(targ))
-  osys:=$(word 3,$(targ))
-endif
-
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation
@@ -280,7 +269,7 @@ ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
 # Likewise, but valid for subdirectories of the current dir.
 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
 # that directory conflicts with a system header file.
-ifneq ($(findstring vxworks,$(osys)),)
+ifneq ($(findstring vxworks,$(target_os)),)
   INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
 			-iquote $(fsrcdir)/ada \
 			-I$(fsrcdir)/../include $(GMPINC)
@@ -348,16 +337,16 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
  uname.o urealp.o usage.o widechar.o \
  $(EXTRA_GNATMAKE_OBJS)
 
-# Make arch match the current multilib so that the RTS selection code
+# Make target_cpu match the current multilib so that the RTS selection code
 # picks up the right files. For a given target this must be coherent
 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
 
-ifeq ($(strip $(filter-out %x86_64, $(arch))),)
+ifeq ($(strip $(filter-out %x86_64, $(target_cpu))),)
   ifeq ($(strip $(MULTISUBDIR)),/32)
-    arch:=i686
+    target_cpu := i686
   else
     ifeq ($(strip $(MULTISUBDIR)),/x32)
-      arch:=x32
+      target_cpu := x32
     endif
   endif
 endif
@@ -460,7 +449,7 @@ EXTRA_LIBGNAT_SRCS=
 # If what's left is null then it's a match.
 
 # m68k VxWorks
-ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out m68k% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -503,7 +492,7 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks
-ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
+ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -609,7 +598,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks 653
-ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
+ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
@@ -671,7 +660,7 @@ ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks MILS
-ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
+ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vx6-raven-cert.adb \
@@ -721,7 +710,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
 endif
 
 # VxWorksae / VxWorks 653 for x86 (vxsim) - ?? VxWorks mils not implemented
-ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
+ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for kernel + vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
@@ -781,7 +770,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
 endif
 
 # Sparc VxWorks
-ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -808,7 +797,7 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
 
-  ifeq ($(strip $(filter-out sparc erc32 leon leon3, $(arch))),)
+  ifeq ($(strip $(filter-out sparc erc32 leon leon3, $(target_cpu))),)
     # 32-bits
     LIBGNAT_TARGET_PAIRS += \
     s-vxwork.ads<s-vxwork-sparc.ads \
@@ -833,7 +822,7 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
 endif
 
 # x86 VxWorks
-ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
+ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   i-vxwork.ads<i-vxwork-x86.ads \
@@ -924,7 +913,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
 endif
 
 # ARM VxWorks
-ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -960,7 +949,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
 endif
 
 # MIPS VxWorks
-ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -995,7 +984,7 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
-ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
+ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1023,7 +1012,7 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(tar
 endif
 
 # Sparc Solaris
-ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
+ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1047,7 +1036,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
-  ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
+  ifeq ($(strip $(filter-out sparc sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
     ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
@@ -1098,7 +1087,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
 endif
 
 # x86 and x86-64 solaris
-ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1123,7 +1112,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
   $(X86_64_TARGET_PAIRS) \
   system.ads<system-solaris-x86_64.ads
 
-  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
+  ifeq ($(strip $(filter-out %86 solaris2%,$(target_cpu) $(target_os))),)
     ifeq ($(strip $(MULTISUBDIR)),/amd64)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
@@ -1155,7 +1144,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
 endif
 
 # x86 Linux
-ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   a-synbar.adb<a-synbar-posix.adb \
@@ -1216,7 +1205,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
 endif
 
 # x86 kfreebsd
-ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1247,7 +1236,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
   MISCLIB = -lutil
 endif
 
-ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   a-numaux.adb<a-numaux-x86.adb \
@@ -1276,7 +1265,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
 endif
 
 # x86 FreeBSD
-ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1305,7 +1294,7 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
 endif
 
 # x86-64 FreeBSD
-ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1334,7 +1323,7 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
 endif
 
 # x86 GNU/Hurd
-ifeq ($(strip $(filter-out %86 gnu%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 gnu%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
     a-intnam.ads<a-intnam-freebsd.ads \
     s-inmaop.adb<s-inmaop-posix.adb \
@@ -1363,7 +1352,7 @@ ifeq ($(strip $(filter-out %86 gnu%,$(arch) $(osys))),)
 endif
 
 # S390 Linux
-ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1384,7 +1373,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
   LIBGNAT_TARGET_PAIRS_64 = \
   system.ads<system-linux-s390x.ads
 
-  ifeq ($(strip $(filter-out s390x,$(arch))),)
+  ifeq ($(strip $(filter-out s390x,$(target_cpu))),)
     ifeq ($(strip $(MULTISUBDIR)),/32)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
@@ -1409,7 +1398,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
 endif
 
 # HP/PA HP-UX 10
-ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
+ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-excpol.adb<a-excpol-abort.adb \
   a-intnam.ads<a-intnam-hpux.ads \
@@ -1429,7 +1418,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
 endif
 
 # HP/PA HP-UX 11
-ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
+ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-hpux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1456,7 +1445,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
 endif
 
 # IBM AIX
-ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
+ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-aix.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1500,7 +1489,7 @@ ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
 endif
 
 # RTEMS
-ifeq ($(strip $(filter-out rtems%,$(osys))),)
+ifeq ($(strip $(filter-out rtems%,$(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   system.ads<system-rtems.ads \
   a-intnam.ads<a-intnam-rtems.ads \
@@ -1518,7 +1507,7 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),)
 endif
 
 # OpenVMS (host)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
 
 soext  = .exe
 hyphen = _
@@ -1528,7 +1517,7 @@ LN_S = cp -p
 endif
 
 # OpenVMS (target)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
     a-caldel.adb<a-caldel-vms.adb \
     a-calend.adb<a-calend-vms.adb \
@@ -1562,7 +1551,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
     s-tpopde.adb<s-tpopde-vms.adb \
     s-tpopde.ads<s-tpopde-vms.ads
 
-  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
+  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(target_cpu) $(target_vendor) $(target_os))),)
     LIBGNAT_TARGET_PAIRS += \
       g-enblsp.adb<g-enblsp-vms-ia64.adb \
       g-trasym.adb<g-trasym-vms-ia64.adb \
@@ -1582,7 +1571,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
       symbols.adb<symbols-vms.adb \
       symbols-processing.adb<symbols-processing-vms-ia64.adb
   else
-    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
+    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
       LIBGNAT_TARGET_PAIRS += \
         g-enblsp.adb<g-enblsp-vms-alpha.adb \
         g-trasym.adb<g-trasym-vms-alpha.adb \
@@ -1621,21 +1610,21 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
 endif
 
 # *-elf
-ifeq ($(strip $(filter-out lmp avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
+ifeq ($(strip $(filter-out lmp avr none powerpc% eabispe leon% erc32% unknown elf,$(target_cpu) $(target_vendor) $(target_os))),)
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
   indepsw.adb<indepsw-gnu.adb
 endif
 
 # Cygwin/Mingw32
-ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
+ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
   # Cygwin provides a full Posix environment, and so we use the default
   # versions of s-memory and g-socthi rather than the Windows-specific
   # MinGW versions.  Ideally we would use all the default versions for
   # Cygwin and none of the MinGW versions, but for historical reasons
   # the Cygwin port has always been a CygMing frankenhybrid and it is
   # a long-term project to disentangle them.
-  ifeq ($(strip $(filter-out cygwin%,$(osys))),)
+  ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
     LIBGNAT_TARGET_PAIRS = \
     s-memory.adb<s-memory.adb \
     g-socthi.ads<g-socthi.ads \
@@ -1693,7 +1682,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
     s-osprim.adb<s-osprim-mingw.adb \
     s-taprop.adb<s-taprop-mingw.adb
 
-    ifeq ($(strip $(filter-out x86_64%,$(arch))),)
+    ifeq ($(strip $(filter-out x86_64%,$(target_cpu))),)
       ifeq ($(strip $(MULTISUBDIR)),/32)
 	LIBGNAT_TARGET_PAIRS += \
 	  $(X86_TARGET_PAIRS) \
@@ -1744,7 +1733,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
 endif
 
 # Mips Linux
-ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mips linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1768,7 +1757,7 @@ ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
 endif
 
 # Mips/el Linux
-ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mipsel linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1811,7 +1800,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
 endif
 
 # Mips64/el Linux
-ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mips64el linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1854,7 +1843,7 @@ ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
 endif
 
 # PowerPC and e500v2 Linux
-ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out powerpc% e500% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -1917,7 +1906,7 @@ ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
-ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
+ifeq ($(strip $(filter-out arm% linux%eabi,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1932,7 +1921,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
   s-taspri.ads<s-taspri-posix-noaltstack.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb
 
-  ifeq ($(strip $(filter-out arm%b,$(arch))),)
+  ifeq ($(strip $(filter-out arm%b,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
     system.ads<system-linux-armeb.ads
   else
@@ -1953,7 +1942,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
 endif
 
 # Sparc Linux
-ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1995,7 +1984,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
 endif
 
 # HP/PA Linux
-ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2024,7 +2013,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
 endif
 
 # SH4 Linux
-ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2054,7 +2043,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
 endif
 
 # IA64 Linux
-ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2093,7 +2082,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
 endif
 
 # IA64 HP-UX
-ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
+ifeq ($(strip $(filter-out ia64% hp hpux%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-hpux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2122,7 +2111,7 @@ ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
 endif
 
 # Alpha Linux
-ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2153,7 +2142,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
 endif
 
 # x86-64 Linux
-ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2190,7 +2179,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
-ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2228,7 +2217,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
 endif
 
 # Darwin (Mac OS X)
-ifeq ($(strip $(filter-out darwin%,$(osys))),)
+ifeq ($(strip $(filter-out darwin%,$(target_os))),)
   SO_OPTS = -shared-libgcc
   LIBGNAT_TARGET_PAIRS = \
     a-intnam.ads<a-intnam-darwin.ads \
@@ -2239,7 +2228,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     s-taspri.ads<s-taspri-posix.ads \
     s-tpopsp.adb<s-tpopsp-posix-foreign.adb
 
-  ifeq ($(strip $(filter-out %86,$(arch))),)
+  ifeq ($(strip $(filter-out %86,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-susv3.adb \
       s-osprim.adb<s-osprim-darwin.adb \
@@ -2259,7 +2248,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
   endif
 
-  ifeq ($(strip $(filter-out %x86_64,$(arch))),)
+  ifeq ($(strip $(filter-out %x86_64,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-susv3.adb \
       s-osprim.adb<s-osprim-darwin.adb \
@@ -2279,7 +2268,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
   endif
 
-  ifeq ($(strip $(filter-out powerpc%,$(arch))),)
+  ifeq ($(strip $(filter-out powerpc%,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-posix.adb \
       s-osprim.adb<s-osprim-posix.adb \
@@ -2309,7 +2298,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
 endif
 
 # ARM Nucleus
-ifeq ($(strip $(filter-out arm nucleus%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out arm nucleus%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   system.ads<system-nucleus-arm.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -2651,7 +2640,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
 	$(RM) ../stamp-gnatlib-$(RTSDIR)
 	touch ../stamp-gnatlib1-$(RTSDIR)
 
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
 OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
              -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
 


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-28  7:28 ` [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188)) Thomas Schwinge
@ 2013-05-29 10:50   ` Thomas Schwinge
  2013-05-29 14:22     ` Paolo Bonzini
  2014-03-16 10:07   ` Andreas Schwab
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-29 10:50 UTC (permalink / raw)
  To: gcc-patches
  Cc: Arnaud Charlet, Rainer Orth, ebotcazou, obry, bonzini, dj,
	neroden, aoliva, Ralf.Wildenhues

[-- Attachment #1: Type: text/plain, Size: 28309 bytes --]

Hi!

On Tue, 28 May 2013 09:28:28 +0200, I wrote:
> On Wed, 08 May 2013 11:27:09 +0200, Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> wrote:
> > As described in [PR ada/57188], amd64-pc-solaris2.1[01] Ada bootstrap was failing
> > for some time.  It has turned out that this patch is the culprit:
> > 
> > 2013-04-23  Eric Botcazou  <ebotcazou@adacore.com>
> >             Pascal Obry    <obry@adacore.com>
> > 
> >         * gcc-interface/Makefile.in (targ): Fix target name check.
> > 
> > diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
> > --- a/gcc/ada/gcc-interface/Makefile.in
> > +++ b/gcc/ada/gcc-interface/Makefile.in
> > @@ -259,7 +259,7 @@ TOOLS_LIBS = targext.o link.o ../../ggc-
> >  # manufacturer, and operating system and assign each of those to its own
> >  # variable.
> >  host:=$(subst -, ,$(host_canonical))
> > -targ:=$(subst -, ,$(target))
> > +targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
> >  arch:=$(word 1,$(targ))
> >  ifeq ($(words $(targ)),2)
> >    manu:=
> |    osys:=$(word 2,$(targ))
> |  else
> |    manu:=$(word 2,$(targ))
> |    osys:=$(word 3,$(targ))
> |  endif
> 
> > I couldn't find the gcc-patches posting for this patch, thus I'm missing
> > the rationale for it.  It seems rather counterintuitive and fragile to
> > me, replacing the canonical $target by the far more varied $target_alias.
> 
> I concur, and this has now caused confusion for the (pending upstream
> re-submission) x86 GNU/Hurd port, too, for which, upon removing -gnu from
> the target of i686-pc-gnu0.3, now a mere 0.3 remains for osys...
> 
> > If there's really a good reason to keep that patch nonetheless, [...]
> 
> How about we use something like the following [...] patch?  In
> essence, replace the manual parsing in gcc/ada/gcc-interface/Makefile.in
> by using the values the configure script already computed for us.  This
> is largely straightforward (I would hope); please especially review the
> more involved cases such as the one where I'm now using linux%eabi -- for
> example, does that do the right thing or interfere with the Android
> configurations?
> 
> The target_cpu_canonical substitution has been added in commit
> 369e542b3ad1c0acfa9bfaeb72b338d8db5ba2ef (2009-02-27, r144463, schwab)
> but unused ever since, thus removed.
> 
> I'll now be testing for x86 GNU/Linux and GNU/Hurd; further testing
> appreciated.

For these two configurations, I have now successfully tested the patch I
posted.  Further review/testing appreciated.  (Adding »build machinery
(*.in)« maintainers.)


> Other than rebuilding from scratch, how do I rebuild only the affected
> Ada/GNAT bits after regenerating gcc/ada/gcc-interface/Makefile?  It
> doesn't just work, and »make clean-target-libada clean-gnattools« doesn't
> help either?


gcc/ada/
	* gcc-interface/Makefile.in (target_alias, host_canonical)
	(target_cpu_default): Don't substitute.
	(target_cpu, target_vendor, target_os, host_cpu, host_vendor)
	(host_os): Substitute.
	(host, targ, arch, manu, osys): Don't set, and replace their
	usage with the newly substituted target_* and host_* variables.

> diff --git gcc/ada/gcc-interface/Makefile.in gcc/ada/gcc-interface/Makefile.in
> index eeb8c7f..c07722b 100644
> --- gcc/ada/gcc-interface/Makefile.in
> +++ gcc/ada/gcc-interface/Makefile.in
> @@ -151,12 +151,15 @@ GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
>  program_transform_name =
>  objdir = .
>  
> -target_alias=@target_alias@
>  target=@target@
> +target_cpu=@target_cpu@
> +target_vendor=@target_vendor@
> +target_os=@target_os@
> +host_cpu=@host_cpu@
> +host_vendor=@host_vendor@
> +host_os=@host_os@
>  xmake_file = @xmake_file@
>  tmake_file = @tmake_file@
> -host_canonical=@host@
> -target_cpu_default=@target_cpu_default@
>  #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
>  #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
>  
> @@ -255,20 +258,6 @@ TOOLS_LIBS = targext.o link.o ../../ggc-none.o ../../libcommon-target.a \
>    ../../../libbacktrace/.libs/libbacktrace.a ../../../libiberty/libiberty.a \
>    $(SYSLIBS) $(TGT_LIB)
>  
> -# Convert the target variable into a space separated list of architecture,
> -# manufacturer, and operating system and assign each of those to its own
> -# variable.
> -host:=$(subst -, ,$(host_canonical))
> -targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
> -arch:=$(word 1,$(targ))
> -ifeq ($(words $(targ)),2)
> -  manu:=
> -  osys:=$(word 2,$(targ))
> -else
> -  manu:=$(word 2,$(targ))
> -  osys:=$(word 3,$(targ))
> -endif
> -
>  # Specify the directories to be searched for header files.
>  # Both . and srcdir are used, in that order,
>  # so that tm.h and config.h will be found in the compilation
> @@ -280,7 +269,7 @@ ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
>  # Likewise, but valid for subdirectories of the current dir.
>  # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
>  # that directory conflicts with a system header file.
> -ifneq ($(findstring vxworks,$(osys)),)
> +ifneq ($(findstring vxworks,$(target_os)),)
>    INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
>  			-iquote $(fsrcdir)/ada \
>  			-I$(fsrcdir)/../include $(GMPINC)
> @@ -348,16 +337,16 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
>   uname.o urealp.o usage.o widechar.o \
>   $(EXTRA_GNATMAKE_OBJS)
>  
> -# Make arch match the current multilib so that the RTS selection code
> +# Make target_cpu match the current multilib so that the RTS selection code
>  # picks up the right files. For a given target this must be coherent
>  # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
>  
> -ifeq ($(strip $(filter-out %x86_64, $(arch))),)
> +ifeq ($(strip $(filter-out %x86_64, $(target_cpu))),)
>    ifeq ($(strip $(MULTISUBDIR)),/32)
> -    arch:=i686
> +    target_cpu := i686
>    else
>      ifeq ($(strip $(MULTISUBDIR)),/x32)
> -      arch:=x32
> +      target_cpu := x32
>      endif
>    endif
>  endif
> @@ -460,7 +449,7 @@ EXTRA_LIBGNAT_SRCS=
>  # If what's left is null then it's a match.
>  
>  # m68k VxWorks
> -ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
> +ifeq ($(strip $(filter-out m68k% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -503,7 +492,7 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
>  endif
>  
>  # PowerPC and e500v2 VxWorks
> -ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
> +ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -609,7 +598,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
>  endif
>  
>  # PowerPC and e500v2 VxWorks 653
> -ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
> +ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(target_cpu) $(target_vendor) $(target_os))),)
>    # target pairs for vthreads runtime
>    LIBGNAT_TARGET_PAIRS = \
>    a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
> @@ -671,7 +660,7 @@ ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
>  endif
>  
>  # PowerPC and e500v2 VxWorks MILS
> -ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
> +ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
>    # target pairs for vthreads runtime
>    LIBGNAT_TARGET_PAIRS = \
>    a-elchha.adb<a-elchha-vx6-raven-cert.adb \
> @@ -721,7 +710,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
>  endif
>  
>  # VxWorksae / VxWorks 653 for x86 (vxsim) - ?? VxWorks mils not implemented
> -ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
> +ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
>    # target pairs for kernel + vthreads runtime
>    LIBGNAT_TARGET_PAIRS = \
>    a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
> @@ -781,7 +770,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
>  endif
>  
>  # Sparc VxWorks
> -ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
> +ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -808,7 +797,7 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
>    mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
>    indepsw.adb<indepsw-gnu.adb
>  
> -  ifeq ($(strip $(filter-out sparc erc32 leon leon3, $(arch))),)
> +  ifeq ($(strip $(filter-out sparc erc32 leon leon3, $(target_cpu))),)
>      # 32-bits
>      LIBGNAT_TARGET_PAIRS += \
>      s-vxwork.ads<s-vxwork-sparc.ads \
> @@ -833,7 +822,7 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
>  endif
>  
>  # x86 VxWorks
> -ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
> +ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    i-vxwork.ads<i-vxwork-x86.ads \
> @@ -924,7 +913,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
>  endif
>  
>  # ARM VxWorks
> -ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
> +ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -960,7 +949,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
>  endif
>  
>  # MIPS VxWorks
> -ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
> +ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-vxworks.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -995,7 +984,7 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
>    EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
>  endif
>  
> -ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
> +ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1023,7 +1012,7 @@ ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(tar
>  endif
>  
>  # Sparc Solaris
> -ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
> +ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-solaris.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1047,7 +1036,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
>    $(ATOMICS_TARGET_PAIRS) \
>    $(ATOMICS_BUILTINS_TARGET_PAIRS)
>  
> -  ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
> +  ifeq ($(strip $(filter-out sparc sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
>      ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
>        LIBGNAT_TARGET_PAIRS = \
>        $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
> @@ -1098,7 +1087,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
>  endif
>  
>  # x86 and x86-64 solaris
> -ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-solaris.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1123,7 +1112,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
>    $(X86_64_TARGET_PAIRS) \
>    system.ads<system-solaris-x86_64.ads
>  
> -  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
> +  ifeq ($(strip $(filter-out %86 solaris2%,$(target_cpu) $(target_os))),)
>      ifeq ($(strip $(MULTISUBDIR)),/amd64)
>        LIBGNAT_TARGET_PAIRS = \
>        $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
> @@ -1155,7 +1144,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
>  endif
>  
>  # x86 Linux
> -ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    a-synbar.adb<a-synbar-posix.adb \
> @@ -1216,7 +1205,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
>  endif
>  
>  # x86 kfreebsd
> -ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-freebsd.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1247,7 +1236,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
>    MISCLIB = -lutil
>  endif
>  
> -ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-freebsd.ads \
>    a-numaux.adb<a-numaux-x86.adb \
> @@ -1276,7 +1265,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
>  endif
>  
>  # x86 FreeBSD
> -ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-freebsd.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1305,7 +1294,7 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
>  endif
>  
>  # x86-64 FreeBSD
> -ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-freebsd.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1334,7 +1323,7 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
>  endif
>  
>  # x86 GNU/Hurd
> -ifeq ($(strip $(filter-out %86 gnu%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %86 gnu%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>      a-intnam.ads<a-intnam-freebsd.ads \
>      s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1363,7 +1352,7 @@ ifeq ($(strip $(filter-out %86 gnu%,$(arch) $(osys))),)
>  endif
>  
>  # S390 Linux
> -ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1384,7 +1373,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
>    LIBGNAT_TARGET_PAIRS_64 = \
>    system.ads<system-linux-s390x.ads
>  
> -  ifeq ($(strip $(filter-out s390x,$(arch))),)
> +  ifeq ($(strip $(filter-out s390x,$(target_cpu))),)
>      ifeq ($(strip $(MULTISUBDIR)),/32)
>        LIBGNAT_TARGET_PAIRS = \
>        $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
> @@ -1409,7 +1398,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
>  endif
>  
>  # HP/PA HP-UX 10
> -ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
> +ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-excpol.adb<a-excpol-abort.adb \
>    a-intnam.ads<a-intnam-hpux.ads \
> @@ -1429,7 +1418,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
>  endif
>  
>  # HP/PA HP-UX 11
> -ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
> +ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-hpux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1456,7 +1445,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
>  endif
>  
>  # IBM AIX
> -ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
> +ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-aix.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1500,7 +1489,7 @@ ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
>  endif
>  
>  # RTEMS
> -ifeq ($(strip $(filter-out rtems%,$(osys))),)
> +ifeq ($(strip $(filter-out rtems%,$(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    system.ads<system-rtems.ads \
>    a-intnam.ads<a-intnam-rtems.ads \
> @@ -1518,7 +1507,7 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),)
>  endif
>  
>  # OpenVMS (host)
> -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
> +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
>  
>  soext  = .exe
>  hyphen = _
> @@ -1528,7 +1517,7 @@ LN_S = cp -p
>  endif
>  
>  # OpenVMS (target)
> -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
> +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>      a-caldel.adb<a-caldel-vms.adb \
>      a-calend.adb<a-calend-vms.adb \
> @@ -1562,7 +1551,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
>      s-tpopde.adb<s-tpopde-vms.adb \
>      s-tpopde.ads<s-tpopde-vms.ads
>  
> -  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
> +  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(target_cpu) $(target_vendor) $(target_os))),)
>      LIBGNAT_TARGET_PAIRS += \
>        g-enblsp.adb<g-enblsp-vms-ia64.adb \
>        g-trasym.adb<g-trasym-vms-ia64.adb \
> @@ -1582,7 +1571,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
>        symbols.adb<symbols-vms.adb \
>        symbols-processing.adb<symbols-processing-vms-ia64.adb
>    else
> -    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
> +    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
>        LIBGNAT_TARGET_PAIRS += \
>          g-enblsp.adb<g-enblsp-vms-alpha.adb \
>          g-trasym.adb<g-trasym-vms-alpha.adb \
> @@ -1621,21 +1610,21 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
>  endif
>  
>  # *-elf
> -ifeq ($(strip $(filter-out lmp avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
> +ifeq ($(strip $(filter-out lmp avr none powerpc% eabispe leon% erc32% unknown elf,$(target_cpu) $(target_vendor) $(target_os))),)
>    TOOLS_TARGET_PAIRS=\
>    mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
>    indepsw.adb<indepsw-gnu.adb
>  endif
>  
>  # Cygwin/Mingw32
> -ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
> +ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
>    # Cygwin provides a full Posix environment, and so we use the default
>    # versions of s-memory and g-socthi rather than the Windows-specific
>    # MinGW versions.  Ideally we would use all the default versions for
>    # Cygwin and none of the MinGW versions, but for historical reasons
>    # the Cygwin port has always been a CygMing frankenhybrid and it is
>    # a long-term project to disentangle them.
> -  ifeq ($(strip $(filter-out cygwin%,$(osys))),)
> +  ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
>      LIBGNAT_TARGET_PAIRS = \
>      s-memory.adb<s-memory.adb \
>      g-socthi.ads<g-socthi.ads \
> @@ -1693,7 +1682,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
>      s-osprim.adb<s-osprim-mingw.adb \
>      s-taprop.adb<s-taprop-mingw.adb
>  
> -    ifeq ($(strip $(filter-out x86_64%,$(arch))),)
> +    ifeq ($(strip $(filter-out x86_64%,$(target_cpu))),)
>        ifeq ($(strip $(MULTISUBDIR)),/32)
>  	LIBGNAT_TARGET_PAIRS += \
>  	  $(X86_TARGET_PAIRS) \
> @@ -1744,7 +1733,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
>  endif
>  
>  # Mips Linux
> -ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out mips linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1768,7 +1757,7 @@ ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
>  endif
>  
>  # Mips/el Linux
> -ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out mipsel linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1811,7 +1800,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
>  endif
>  
>  # Mips64/el Linux
> -ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out mips64el linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1854,7 +1843,7 @@ ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
>  endif
>  
>  # PowerPC and e500v2 Linux
> -ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out powerpc% e500% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-exetim.adb<a-exetim-posix.adb \
>    a-exetim.ads<a-exetim-default.ads \
> @@ -1917,7 +1906,7 @@ ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
>    LIBRARY_VERSION := $(LIB_VERSION)
>  endif
>  
> -ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
> +ifeq ($(strip $(filter-out arm% linux%eabi,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1932,7 +1921,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
>    s-taspri.ads<s-taspri-posix-noaltstack.ads \
>    s-tpopsp.adb<s-tpopsp-posix-foreign.adb
>  
> -  ifeq ($(strip $(filter-out arm%b,$(arch))),)
> +  ifeq ($(strip $(filter-out arm%b,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>      system.ads<system-linux-armeb.ads
>    else
> @@ -1953,7 +1942,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
>  endif
>  
>  # Sparc Linux
> -ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS_COMMON = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -1995,7 +1984,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
>  endif
>  
>  # HP/PA Linux
> -ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -2024,7 +2013,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
>  endif
>  
>  # SH4 Linux
> -ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -2054,7 +2043,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
>  endif
>  
>  # IA64 Linux
> -ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-exetim.adb<a-exetim-posix.adb \
>    a-exetim.ads<a-exetim-default.ads \
> @@ -2093,7 +2082,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
>  endif
>  
>  # IA64 HP-UX
> -ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
> +ifeq ($(strip $(filter-out ia64% hp hpux%,$(target_cpu) $(target_vendor) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-hpux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -2122,7 +2111,7 @@ ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
>  endif
>  
>  # Alpha Linux
> -ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-intnam.ads<a-intnam-linux.ads \
>    s-inmaop.adb<s-inmaop-posix.adb \
> @@ -2153,7 +2142,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
>  endif
>  
>  # x86-64 Linux
> -ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-exetim.adb<a-exetim-posix.adb \
>    a-exetim.ads<a-exetim-default.ads \
> @@ -2190,7 +2179,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
>    LIBRARY_VERSION := $(LIB_VERSION)
>  endif
>  
> -ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    a-exetim.adb<a-exetim-posix.adb \
>    a-exetim.ads<a-exetim-default.ads \
> @@ -2228,7 +2217,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
>  endif
>  
>  # Darwin (Mac OS X)
> -ifeq ($(strip $(filter-out darwin%,$(osys))),)
> +ifeq ($(strip $(filter-out darwin%,$(target_os))),)
>    SO_OPTS = -shared-libgcc
>    LIBGNAT_TARGET_PAIRS = \
>      a-intnam.ads<a-intnam-darwin.ads \
> @@ -2239,7 +2228,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
>      s-taspri.ads<s-taspri-posix.ads \
>      s-tpopsp.adb<s-tpopsp-posix-foreign.adb
>  
> -  ifeq ($(strip $(filter-out %86,$(arch))),)
> +  ifeq ($(strip $(filter-out %86,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<s-intman-susv3.adb \
>        s-osprim.adb<s-osprim-darwin.adb \
> @@ -2259,7 +2248,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
>      EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
>    endif
>  
> -  ifeq ($(strip $(filter-out %x86_64,$(arch))),)
> +  ifeq ($(strip $(filter-out %x86_64,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<s-intman-susv3.adb \
>        s-osprim.adb<s-osprim-darwin.adb \
> @@ -2279,7 +2268,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
>      EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
>    endif
>  
> -  ifeq ($(strip $(filter-out powerpc%,$(arch))),)
> +  ifeq ($(strip $(filter-out powerpc%,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<s-intman-posix.adb \
>        s-osprim.adb<s-osprim-posix.adb \
> @@ -2309,7 +2298,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
>  endif
>  
>  # ARM Nucleus
> -ifeq ($(strip $(filter-out arm nucleus%,$(arch) $(osys))),)
> +ifeq ($(strip $(filter-out arm nucleus%,$(target_cpu) $(target_os))),)
>    LIBGNAT_TARGET_PAIRS = \
>    system.ads<system-nucleus-arm.ads \
>    a-numaux.ads<a-numaux-vxworks.ads \
> @@ -2651,7 +2640,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
>  	$(RM) ../stamp-gnatlib-$(RTSDIR)
>  	touch ../stamp-gnatlib1-$(RTSDIR)
>  
> -ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
> +ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
>  OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
>               -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
>  


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-29 10:50   ` [ada, build] host/target configuration Thomas Schwinge
@ 2013-05-29 14:22     ` Paolo Bonzini
  2013-05-29 21:36       ` Thomas Schwinge
                         ` (2 more replies)
  0 siblings, 3 replies; 33+ messages in thread
From: Paolo Bonzini @ 2013-05-29 14:22 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, ebotcazou, obry, dj,
	neroden, aoliva, Ralf.Wildenhues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 29/05/2013 12:50, Thomas Schwinge ha scritto:
>>> How about we use something like the following [...] patch?  In 
>>> essence, replace the manual parsing in
>>> gcc/ada/gcc-interface/Makefile.in by using the values the
>>> configure script already computed for us.  This is largely
>>> straightforward (I would hope); please especially review the 
>>> more involved cases such as the one where I'm now using
>>> linux%eabi -- for example, does that do the right thing or
>>> interfere with the Android configurations?
>>> 
>>> The target_cpu_canonical substitution has been added in commit 
>>> 369e542b3ad1c0acfa9bfaeb72b338d8db5ba2ef (2009-02-27, r144463,
>>> schwab) but unused ever since, thus removed.
>>> 
>>> I'll now be testing for x86 GNU/Linux and GNU/Hurd; further
>>> testing appreciated.
> For these two configurations, I have now successfully tested the
> patch I posted.  Further review/testing appreciated.  (Adding
> »build machinery (*.in)« maintainers.)
> 
> 

I agree that using $(target_os) and linux% matches is a better way to
strip out the "-gnu"s.

The patch is long, but I think I reviewed it carefully enough.  It's
okay for mainline.

Regarding the android change:

> -ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if
> $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),) +ifeq
> ($(strip $(filter-out arm% linux%eabi,$(target_cpu)
> $(target_os))),)

This is okay, it will match arm-none-linux-androideabi both before and
after (perhaps linux-%eabi would be more readable).

However, it seems that the first androideabi snippet was dead code.
Can you delete it in a follow-up?

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRpg7xAAoJEBvWZb6bTYbyEKgP/RI1fU8fEdzH1UK+3BG8sqgF
DSoK0mo25PBIGHYT8p4Qe2a9tE2fZys93NHufPmQnVQ1M/YqmB5JyspCoe0mqke0
fQUMI8DpV0f+g9MquIZFDYrceR4qGEaFZ9KlnHGcpErA5zs1Wb7Shj6SoWt4I3b3
2dQy61hD7DcVe1xctG349xU6Hc2j34VCk8axUcpFCm9iD6UBB8GAUmZCk6egkIJr
BWs9anasAhmh1E4aEOjGFvhWQcB23pmxSkIIk5wSkKBHZpHURIwXqOUmK1I0ebme
j7ee2+9SzSwk0emY4lBdDg14byVSvRMKnMDpFdIfHTJvYEqm6ha8jeNxBKqM/xvk
pz7AX1jwfsX22QSWiZuqcqqYBR0y7qVA0/5rjyFitLB85PY+yIfe5BNH4d5KdeuF
yDuss+n6vZrYCnyRpk0P4VbLQ5gnrtqDhxTKPABf3eMNFI6iyyadRh0qLQVrnyX5
qmUciuZTMouC4rAx1H/oAAHZbPmeHWS6cH7ggO0WlS5Us/Ws/s3OdFUePygXhQpL
xpOgqjSaDhE6s4PQAZkX79EOqvtEJynX/gGi3NTyZey/Fsp9n5JFperjAUfPG/Bt
2Cu7tDmcXLKlNKeaL7IuLppVPmVicfXTUAnYemWja78ijbbKLeD2W5OGzsfxTMuV
QoH7oqV2NqSIayTAmYg6
=Sh4D
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-29 14:22     ` Paolo Bonzini
@ 2013-05-29 21:36       ` Thomas Schwinge
  2013-05-30  7:26         ` Paolo Bonzini
  2013-05-30  7:21       ` Eric Botcazou
  2013-05-30 13:44       ` Arnaud Charlet
  2 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-29 21:36 UTC (permalink / raw)
  To: Paolo Bonzini, doko, charlet
  Cc: gcc-patches, Rainer Orth, ebotcazou, obry, dj, neroden, aoliva,
	Ralf.Wildenhues

[-- Attachment #1: Type: text/plain, Size: 3648 bytes --]

Hi!

On Wed, 29 May 2013 16:21:38 +0200, Paolo Bonzini <bonzini@gnu.org> wrote:
> Il 29/05/2013 12:50, Thomas Schwinge ha scritto:
> >>> How about we use something like the following [...] patch?  In 
> >>> essence, replace the manual parsing in
> >>> gcc/ada/gcc-interface/Makefile.in by using the values the
> >>> configure script already computed for us.  This is largely
> >>> straightforward (I would hope); please especially review the 
> >>> more involved cases such as the one where I'm now using
> >>> linux%eabi -- for example, does that do the right thing or
> >>> interfere with the Android configurations?

> I agree that using $(target_os) and linux% matches is a better way to
> strip out the "-gnu"s.
> 
> The patch is long, but I think I reviewed it carefully enough.  It's
> okay for mainline.

Thanks for the review.  Before I commit however:

> Regarding the android change:
> 
> > -ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
> > +ifeq ($(strip $(filter-out arm% linux%eabi,$(target_cpu) $(target_os))),)
> 
> This is okay, it will match arm-none-linux-androideabi both before and
> after

Well, upon more carful inspection I came to realize that the old/still
current code accepts arm-*-linux-*eabi but also plain arm-*-linux, which
my new code no longer accepts.  Is the old/still current behavior
intentional here, or a bug?  It has been introduced in commit
f49eb158fa5618dbd1130e47281e0bae13798ec6 (r192475):

gcc/ada/
2012-10-15  Matthias Klose  <doko@ubuntu.com>

	* gcc-interface/Makefile.in: Match arm*-*-linux-*eabi* for
	ARM Linux/GNU.

    -ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),)
    +ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)

From the description, I understand that change to mean any ARM,
Linux-kernel, EABI configuration with any kind of user-land, so my new
interpretation seems correct, and the current code wrong to also accept
plain arm-*-linux.  That change just cite should just have replaced
linux-gnueabi with linux-%eabi?

> (perhaps linux-%eabi would be more readable).

As soon as we've clarified the previous question, I'll do that change.


> However, it seems that the first androideabi snippet was dead code.
> Can you delete it in a follow-up?

That has been added in commit 7a5ee35f18bc945ec8abbcd1377c446352504e6e
(r193238):

2012-11-06  Arnaud Charlet  <charlet@adacore.com>

	[...]
	* gcc-interface/Makefile.in: Add runtime pairs for Android.
	Rework handling of s-oscons.ads.
	* s-osinte-android.ads, s-osinte-android.adb: New files.

    +ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
    +  LIBGNAT_TARGET_PAIRS = \
    +  [...]
    +  s-osinte.adb<s-osinte-android.adb \
    +  s-osinte.ads<s-osinte-android.ads \
    +  [...]

Indeed I agree that the second snippet in the Makefile.in (as changed by
Matthias on 2012-10-15) triggers anytime the first one (as added by
Arnaud on 2012-11-06) triggered, so Arnaud's LIBGNAT_TARGET_PAIRS setting
will always be overwritten by Matthias', so to speak, and thus the new
s-osinte-android.* files never be used in the current code.  Arnaud,
Matthias, please clarify the intended behavior?  Of course I would assume
that for *-android* configurations the new s-osinte-android.* files be
used, but as Arnaud's change has gone in after Matthias', so this can
never have worked (unless I'm confused)?


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-29 14:22     ` Paolo Bonzini
  2013-05-29 21:36       ` Thomas Schwinge
@ 2013-05-30  7:21       ` Eric Botcazou
  2013-05-30  7:27         ` Paolo Bonzini
  2013-05-31  7:10         ` Thomas Schwinge
  2013-05-30 13:44       ` Arnaud Charlet
  2 siblings, 2 replies; 33+ messages in thread
From: Eric Botcazou @ 2013-05-30  7:21 UTC (permalink / raw)
  To: gcc-patches
  Cc: Paolo Bonzini, Thomas Schwinge, Arnaud Charlet, Rainer Orth,
	obry, dj, neroden, aoliva, Ralf.Wildenhues

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

> However, it seems that the first androideabi snippet was dead code.
> Can you delete it in a follow-up?

No, it's not dead code, just broken at the moment, now fixed by:


2013-05-30  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc-interface/Makefile.in (arm% androideabi): Robustify.


-- 
Eric Botcazou

[-- Attachment #2: p.diff --]
[-- Type: text/x-patch, Size: 558 bytes --]

Index: gcc-interface/Makefile.in
===================================================================
--- gcc-interface/Makefile.in	(revision 199343)
+++ gcc-interface/Makefile.in	(working copy)
@@ -995,7 +995,7 @@ ifeq ($(strip $(filter-out mips% wrs vx%
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
-ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
+ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-29 21:36       ` Thomas Schwinge
@ 2013-05-30  7:26         ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2013-05-30  7:26 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: doko, charlet, gcc-patches, Rainer Orth, ebotcazou, obry, dj,
	neroden, aoliva, Ralf.Wildenhues

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Il 29/05/2013 23:36, Thomas Schwinge ha scritto:
> Hi!
> 
> On Wed, 29 May 2013 16:21:38 +0200, Paolo Bonzini <bonzini@gnu.org>
> wrote:
>> Il 29/05/2013 12:50, Thomas Schwinge ha scritto:
>>>>> How about we use something like the following [...] patch?
>>>>> In essence, replace the manual parsing in 
>>>>> gcc/ada/gcc-interface/Makefile.in by using the values the 
>>>>> configure script already computed for us.  This is largely 
>>>>> straightforward (I would hope); please especially review
>>>>> the more involved cases such as the one where I'm now
>>>>> using linux%eabi -- for example, does that do the right
>>>>> thing or interfere with the Android configurations?
> 
>> I agree that using $(target_os) and linux% matches is a better
>> way to strip out the "-gnu"s.
>> 
>> The patch is long, but I think I reviewed it carefully enough.
>> It's okay for mainline.
> 
> Thanks for the review.  Before I commit however:
> 
>> Regarding the android change:
>> 
>>> -ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if
>>> $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),) 
>>> +ifeq ($(strip $(filter-out arm% linux%eabi,$(target_cpu)
>>> $(target_os))),)
>> 
>> This is okay, it will match arm-none-linux-androideabi both
>> before and after
> 
> Well, upon more carful inspection I came to realize that the
> old/still current code accepts arm-*-linux-*eabi but also plain
> arm-*-linux, which my new code no longer accepts.  Is the old/still
> current behavior intentional here, or a bug?  It has been
> introduced in commit f49eb158fa5618dbd1130e47281e0bae13798ec6
> (r192475):

Looking at http://thread.gmane.org/gmane.comp.gcc.patches/265800, it's
a bug.  The right way would have been something like

$(if $(findstring eabi,$(word 4,$(targ))),,no-match)

Your patch fixes it.

It would be really really nice to move all this to fragments, using a
saner bash case statement to pick the right one.  It's a huge amount
of work though.

> gcc/ada/ 2012-10-15  Matthias Klose  <doko@ubuntu.com>
> 
> * gcc-interface/Makefile.in: Match arm*-*-linux-*eabi* for ARM
> Linux/GNU.
> 
> -ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch)
> $(osys)-$(word 4,$(targ)))),) +ifeq ($(strip $(filter-out
> arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word
> 4,$(targ))),,$(word 4,$(targ)))),)
> 
> From the description, I understand that change to mean any ARM, 
> Linux-kernel, EABI configuration with any kind of user-land, so my
> new interpretation seems correct, and the current code wrong to
> also accept plain arm-*-linux.  That change just cite should just
> have replaced linux-gnueabi with linux-%eabi?
> 
>> (perhaps linux-%eabi would be more readable).
> 
> As soon as we've clarified the previous question, I'll do that
> change.

Thanks.

>> However, it seems that the first androideabi snippet was dead
>> code. Can you delete it in a follow-up?
> 
> That has been added in commit
> 7a5ee35f18bc945ec8abbcd1377c446352504e6e (r193238):
> 
> 2012-11-06  Arnaud Charlet  <charlet@adacore.com>
> 
> [...] * gcc-interface/Makefile.in: Add runtime pairs for Android. 
> Rework handling of s-oscons.ads. * s-osinte-android.ads,
> s-osinte-android.adb: New files.
> 
> +ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch)
> $(osys)-$(word 4,$(targ)))),) +  LIBGNAT_TARGET_PAIRS = \ +  [...] 
> +  s-osinte.adb<s-osinte-android.adb \ +
> s-osinte.ads<s-osinte-android.ads \ +  [...]
> 
> Indeed I agree that the second snippet in the Makefile.in (as
> changed by Matthias on 2012-10-15) triggers anytime the first one
> (as added by Arnaud on 2012-11-06) triggered, so Arnaud's
> LIBGNAT_TARGET_PAIRS setting will always be overwritten by
> Matthias', so to speak, and thus the new s-osinte-android.* files
> never be used in the current code.  Arnaud, Matthias, please
> clarify the intended behavior?  Of course I would assume that for
> *-android* configurations the new s-osinte-android.* files be used,
> but as Arnaud's change has gone in after Matthias', so this can 
> never have worked (unless I'm confused)?

I think it is an unintended conflict, but then I'd leave it to Arnaud
to move the second snippet after the first.

(This shows that, in such a conversion to bash case statements, the
order should be reversed).

Paolo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRpv8VAAoJEBvWZb6bTYbydrAP/2l4gMGykKZGtqbj+/9ta0jm
IlKJ3tZ1u8LupMX75Rb6l7Cx3268WLoAZY1gGceQZuSWX6cD1KNkHR8uMEsgXwmR
WAyRmp8m0FXcQEGC2rdUvRmV0OXIJU/EWhNGiH70pCxteLR8z3/rFAlRUNXGko/o
1od0RaR2jlT2+EBNaKE6PwMdFG94b0qeXEEpFy3/f7jr/5e+E5tcq1YuMg06xs6Q
xMIG9QyQlUUbR5o/1J4MVdDGbL0APqMm/E0R7aUsGHpNFBdn2hurEvVx72ZWWXv/
loEBDIkiNQAdv0JGRSJ+NhreoyZbbRXHzZnMXc0coQyLe+wmn396MAWaCadF7Vie
lKXN0HRUHTHzeroZPExxOvcXWx/+orgZLlXMMdC/jG3oGiouNQnEuJbKul53hmWz
VD1g7gCDyvZBaksFfZcV9GKQKbstf0y4ONOSJP2MyqIhLAzDLy59winv9ph95ymM
B/DFN+u3XWMIh0LV4+ngL2afhRpbLyhP0BOzrnNqiJ5fB9RiRhEHXJ4VCnMongB2
DAX2Fw2bsqKgJDi5pKesvXpozyAou2rRi+MQPKvkuHSI5xMg0w1qMgmesoLugPEu
Z1vMAr8Hx76l8435or3R5yVAZaTKBGrLKZ/ZH+I9btiukG0jfXyEpGmKZXvN1kgE
1Xzwose5CFQk5OnZLYXZ
=NsI2
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30  7:21       ` Eric Botcazou
@ 2013-05-30  7:27         ` Paolo Bonzini
  2013-05-30  7:34           ` Eric Botcazou
  2013-05-31  7:10         ` Thomas Schwinge
  1 sibling, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2013-05-30  7:27 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: gcc-patches, Thomas Schwinge, Arnaud Charlet, Rainer Orth, obry,
	dj, neroden, aoliva, Ralf.Wildenhues

Il 30/05/2013 09:21, Eric Botcazou ha scritto:
>> However, it seems that the first androideabi snippet was dead code.
>> Can you delete it in a follow-up?
> 
> No, it's not dead code, just broken at the moment, now fixed by:
> 
> 
> 2013-05-30  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gcc-interface/Makefile.in (arm% androideabi): Robustify.
> 
> 

I don't think this fixes it.  The problem is that the second eabi
conditional overrides the first (the one for Android).

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30  7:27         ` Paolo Bonzini
@ 2013-05-30  7:34           ` Eric Botcazou
  2013-05-30  7:37             ` Paolo Bonzini
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Botcazou @ 2013-05-30  7:34 UTC (permalink / raw)
  To: gcc-patches
  Cc: Paolo Bonzini, Thomas Schwinge, Arnaud Charlet, Rainer Orth,
	obry, dj, neroden, aoliva, Ralf.Wildenhues

> I don't think this fixes it.  The problem is that the second eabi
> conditional overrides the first (the one for Android).

Then let's fix the second eabi or swap them, but the first one must stay.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30  7:34           ` Eric Botcazou
@ 2013-05-30  7:37             ` Paolo Bonzini
  0 siblings, 0 replies; 33+ messages in thread
From: Paolo Bonzini @ 2013-05-30  7:37 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: gcc-patches, Thomas Schwinge, Arnaud Charlet, Rainer Orth, obry,
	dj, neroden, aoliva, Ralf.Wildenhues

Il 30/05/2013 09:33, Eric Botcazou ha scritto:
>> I don't think this fixes it.  The problem is that the second eabi
>> > conditional overrides the first (the one for Android).
> Then let's fix the second eabi or swap them, but the first one must stay.

Yes, got it.  Swapping them looks like the right thing to do.

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-29 14:22     ` Paolo Bonzini
  2013-05-29 21:36       ` Thomas Schwinge
  2013-05-30  7:21       ` Eric Botcazou
@ 2013-05-30 13:44       ` Arnaud Charlet
  2013-05-30 21:08         ` Olivier Hainque
  2 siblings, 1 reply; 33+ messages in thread
From: Arnaud Charlet @ 2013-05-30 13:44 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Thomas Schwinge, gcc-patches, Rainer Orth, ebotcazou, obry, dj,
	neroden, aoliva, Ralf.Wildenhues, Arnaud Charlet

> >>> The target_cpu_canonical substitution has been added in commit
> >>> 369e542b3ad1c0acfa9bfaeb72b338d8db5ba2ef (2009-02-27, r144463,
> >>> schwab) but unused ever since, thus removed.
> >>> 
> >>> I'll now be testing for x86 GNU/Linux and GNU/Hurd; further
> >>> testing appreciated.
> > For these two configurations, I have now successfully tested the
> > patch I posted.  Further review/testing appreciated.  (Adding
> > »build machinery (*.in)« maintainers.)
> > 
> > 
> 
> I agree that using $(target_os) and linux% matches is a better way to
> strip out the "-gnu"s.
> 
> The patch is long, but I think I reviewed it carefully enough.  It's
> okay for mainline.

Not so fast, we are talking about the Ada build machinery which requires
an Ada maintainer to review it.

The patch seems to go in the right direction but needs careful review
which hasn't been done yet, so please hold on your change for now, thanks.

In other words, this change will impact basically all targets, so needs
either much more testing, or more review, which is on going.

Arno

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30 13:44       ` Arnaud Charlet
@ 2013-05-30 21:08         ` Olivier Hainque
  2013-05-31 13:41           ` Olivier Hainque
  0 siblings, 1 reply; 33+ messages in thread
From: Olivier Hainque @ 2013-05-30 21:08 UTC (permalink / raw)
  To: Arnaud Charlet
  Cc: Olivier Hainque, Paolo Bonzini, Thomas Schwinge, gcc-patches,
	Rainer Orth, ebotcazou, obry, dj, neroden, aoliva,
	Ralf.Wildenhues


On May 30, 2013, at 15:44 , Arnaud Charlet <charlet@adacore.com> wrote:
> In other words, this change will impact basically all targets, so needs
> either much more testing, or more review, which is on going.

 Part of the issue comes from the need to support some targets
 with non-canonical names (in the configure --target sense) for
 which we want the canonical behavior except for a few variations
 in the Ada RTSes, for example powerpc-wrs-vxworksmils instead of
 powerpc-wrs-vxworksae.

 Adjusting the loads of case selections everywhere, missing some
 cases at times, to attempt materializing the 99.9% equivalence
 turned out problematic, and leveraging config.sub sounded a lot
 simpler and more appropriate.

 The idea of the "target->target_alias" change in gcc-interface/Makefile.in
 for Ada was to let us still distinguish for the purpose of the Ada RTSes in
 particular.

 This happens to be significant in a limited amount of cases only.

 We need to assess which ones and how best we could deal
 with the differences in a different manner if possible.

 Olivier

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30  7:21       ` Eric Botcazou
  2013-05-30  7:27         ` Paolo Bonzini
@ 2013-05-31  7:10         ` Thomas Schwinge
  2013-05-31  8:04           ` Eric Botcazou
  1 sibling, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-31  7:10 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: Paolo Bonzini, Arnaud Charlet, Rainer Orth, obry, dj, neroden,
	aoliva, Ralf.Wildenhues, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 840 bytes --]

Hi!

On Thu, 30 May 2013 09:21:12 +0200, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > However, it seems that the first androideabi snippet was dead code.
> > Can you delete it in a follow-up?
> 
> No, it's not dead code, just broken at the moment, now fixed by:
> 
> 
> 2013-05-30  Eric Botcazou  <ebotcazou@adacore.com>
> 
> 	* gcc-interface/Makefile.in (arm% androideabi): Robustify.

> -ifeq ($(strip $(filter-out arm% linux-androideabi,$(arch) $(osys)-$(word 4,$(targ)))),)
> +ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),)

I don't understand this change.  This used to match configurations
arm*-[vendor]-linux-androideabi; now it only matches
arm*-[vendor]-androideabi, which isn't in use (for a Android system is
always based on the Linux kernel, in my understanding).


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31  7:10         ` Thomas Schwinge
@ 2013-05-31  8:04           ` Eric Botcazou
  2013-05-31 10:46             ` Paolo Bonzini
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Botcazou @ 2013-05-31  8:04 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: gcc-patches, Paolo Bonzini, Arnaud Charlet, Rainer Orth, obry,
	dj, neroden, aoliva, Ralf.Wildenhues

> I don't understand this change.  This used to match configurations
> arm*-[vendor]-linux-androideabi; now it only matches
> arm*-[vendor]-androideabi, which isn't in use (for a Android system is
> always based on the Linux kernel, in my understanding).

This is meant to match arm-linux-androideabi, which didn't match anymore after 
the initial problematic targ change but needs to.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31  8:04           ` Eric Botcazou
@ 2013-05-31 10:46             ` Paolo Bonzini
  2013-05-31 11:15               ` Eric Botcazou
  0 siblings, 1 reply; 33+ messages in thread
From: Paolo Bonzini @ 2013-05-31 10:46 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: Thomas Schwinge, gcc-patches, Arnaud Charlet, Rainer Orth, obry,
	dj, neroden, aoliva, Ralf.Wildenhues

Il 31/05/2013 10:03, Eric Botcazou ha scritto:
>> I don't understand this change.  This used to match configurations
>> arm*-[vendor]-linux-androideabi; now it only matches
>> arm*-[vendor]-androideabi, which isn't in use (for a Android system is
>> always based on the Linux kernel, in my understanding).
> 
> This is meant to match arm-linux-androideabi, which didn't match anymore after 
> the initial problematic targ change but needs to.
> 

Do you mean arm-linux-androideabi, or arm-none-linux-androideabi?

Paolo

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 10:46             ` Paolo Bonzini
@ 2013-05-31 11:15               ` Eric Botcazou
  2013-05-31 11:30                 ` Thomas Schwinge
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Botcazou @ 2013-05-31 11:15 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: gcc-patches, Thomas Schwinge, Arnaud Charlet, Rainer Orth, obry,
	dj, neroden, aoliva, Ralf.Wildenhues

> Do you mean arm-linux-androideabi, or arm-none-linux-androideabi?

Thr former, but I guess that we want to support the latter as well.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 11:15               ` Eric Botcazou
@ 2013-05-31 11:30                 ` Thomas Schwinge
  2013-05-31 19:55                   ` Eric Botcazou
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-31 11:30 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, obry, dj, neroden,
	aoliva, Ralf.Wildenhues, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 453 bytes --]

Hi!

On Fri, 31 May 2013 13:14:39 +0200, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > Do you mean arm-linux-androideabi, or arm-none-linux-androideabi?
> 
> Thr former, but I guess that we want to support the latter as well.

In my reading, the code supported both these before your recent change,
and now supports neither, as I reported this morning.  With which
configurations exactly have you tested your change?


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-30 21:08         ` Olivier Hainque
@ 2013-05-31 13:41           ` Olivier Hainque
  2013-06-02 19:19             ` Alexandre Oliva
  0 siblings, 1 reply; 33+ messages in thread
From: Olivier Hainque @ 2013-05-31 13:41 UTC (permalink / raw)
  To: Arnaud Charlet
  Cc: Olivier Hainque, Paolo Bonzini, Thomas Schwinge, gcc-patches,
	Rainer Orth, ebotcazou, obry, dj, neroden, aoliva,
	Ralf.Wildenhues


On May 30, 2013, at 23:08 , Olivier Hainque <hainque@adacore.com> wrote:
> The idea of the "target->target_alias" change in gcc-interface/Makefile.in
> for Ada was to let us still distinguish for the purpose of the Ada RTSes in
> particular.
> 
> This happens to be significant in a limited amount of cases only.


 A very limited number of cases actually.

 * e500v? canonicalized as powerpc (in our tree), which is a
   non-issue because the pairs are all identical.

 * leon vs sparc-leon maybe, I'm not so sure but this should be
   straightforward to adjust in any case

 * vxworksmils canonicalized into vxworksae


 A safe and simple approach to this issue would be to

 - revert to our former computations, based on target and
   not target_alias. Revert the subsequent adjustments as
   well.

 - Remove the pointless and confusing references to e500,
   adjusting comments to indicate that e500 is canonicalized
   into powerpc

 - Use target_alias explicitly just at the points where
   we know that we need to depart from the canonical name

 The proposed idea of using the configure computed names instead of doing our
 own computations is interesting. It's sort of orthogonal and seems potentially
 disruptive as well, so I'd defer to a later moment.



 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 11:30                 ` Thomas Schwinge
@ 2013-05-31 19:55                   ` Eric Botcazou
  2013-05-31 20:32                     ` Thomas Schwinge
  0 siblings, 1 reply; 33+ messages in thread
From: Eric Botcazou @ 2013-05-31 19:55 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, obry, dj, neroden,
	aoliva, Ralf.Wildenhues, Paolo Bonzini

> In my reading, the code supported both these before your recent change,
> and now supports neither, as I reported this morning.

Did you test it?

> With which configurations exactly have you tested your change?

arm-linux-androideabi

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 19:55                   ` Eric Botcazou
@ 2013-05-31 20:32                     ` Thomas Schwinge
  2013-06-02  8:45                       ` Eric Botcazou
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2013-05-31 20:32 UTC (permalink / raw)
  To: Eric Botcazou
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, obry, dj, neroden,
	aoliva, Ralf.Wildenhues, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 2072 bytes --]

Hi!

On Fri, 31 May 2013 21:54:55 +0200, Eric Botcazou <ebotcazou@adacore.com> wrote:
> > In my reading, the code supported both these before your recent change,
> > and now supports neither, as I reported this morning.
> 
> Did you test it?

I didn't; now I have, and...

> > With which configurations exactly have you tested your change?
> 
> arm-linux-androideabi

..., you're right that this one works, but it only works by chance:

    targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
    arch:=$(word 1,$(targ))
    ifeq ($(words $(targ)),2)
      manu:=
      osys:=$(word 2,$(targ))
    else
      manu:=$(word 2,$(targ))
      osys:=$(word 3,$(targ))
    endif
    
    default:
    	@echo "target_alias = »$(target_alias)«"
    	@echo "targ = »$(targ)«"
    	@echo "arch = »$(arch)«"
    	@echo "manu = »$(manu)«"
    	@echo "osys = »$(osys)«"
    ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),)
    	@echo matched
    else
    	@echo not matched
    endif

We get:

    $ make target_alias=arm-linux-androideabi
    target_alias = »arm-linux-androideabi«
    targ = »arm linux androideabi«
    arch = »arm«
    manu = »linux«
    osys = »androideabi«
    matched

So, your case works because the manu/osys parsing wrongly detects/assigns
a manufacturer »linux« and an operating system androideabi.  Then, the
following case fails, which is expected to yield identical results, with
"complete triplets" -- which I took for granted in my reasoning about the
Makefile code:

    $ make target_alias=arm-unknown-linux-androideabi
    target_alias = »arm-unknown-linux-androideabi«
    targ = »arm unknown linux androideabi«
    arch = »arm«
    manu = »unknown«
    osys = »linux«
    not matched


My suggested change would make all these work -- however I have not yet
had the time to fully digest your other emails with the reasoning that
you need configure GCC with non-canonical target and target_alias set
differently.


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 20:32                     ` Thomas Schwinge
@ 2013-06-02  8:45                       ` Eric Botcazou
  0 siblings, 0 replies; 33+ messages in thread
From: Eric Botcazou @ 2013-06-02  8:45 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, obry, dj, neroden,
	aoliva, Ralf.Wildenhues, Paolo Bonzini

> So, your case works because the manu/osys parsing wrongly detects/assigns
> a manufacturer »linux« and an operating system androideabi.  Then, the
> following case fails, which is expected to yield identical results, with
> "complete triplets" -- which I took for granted in my reasoning about the
> Makefile code:
> 
>     $ make target_alias=arm-unknown-linux-androideabi
>     target_alias = »arm-unknown-linux-androideabi«
>     targ = »arm unknown linux androideabi«
>     arch = »arm«
>     manu = »unknown«
>     osys = »linux«
>     not matched
> 
> 
> My suggested change would make all these work -- however I have not yet
> had the time to fully digest your other emails with the reasoning that
> you need configure GCC with non-canonical target and target_alias set
> differently.

The whole discussion started from wrong premises since, contrary to what the 
ChangeLog says, neither Pascal nor I have nothing to do with the original, 
problematic change (see PR ada/57188 for my take on it).  We all agree that 
the mess should be fixed somehow or other and Olivier is working on it.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-31 13:41           ` Olivier Hainque
@ 2013-06-02 19:19             ` Alexandre Oliva
  2013-06-03 21:00               ` Olivier Hainque
  0 siblings, 1 reply; 33+ messages in thread
From: Alexandre Oliva @ 2013-06-02 19:19 UTC (permalink / raw)
  To: Olivier Hainque
  Cc: Arnaud Charlet, Paolo Bonzini, Thomas Schwinge, gcc-patches,
	Rainer Orth, ebotcazou, obry, dj, neroden, Ralf.Wildenhues

On May 31, 2013, Olivier Hainque <hainque@adacore.com> wrote:

>  - revert to our former computations, based on target and
>    not target_alias. Revert the subsequent adjustments as
>    well.

*nod*

>  - Use target_alias explicitly just at the points where
>    we know that we need to depart from the canonical name

I suggest another approach: if there are significant differences between
the run-time systems, they ought to be preserved in the canonical target
names.  So, adjust config.sub so that it preserve them, and then we can
decide based on the canonical target name only.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-06-02 19:19             ` Alexandre Oliva
@ 2013-06-03 21:00               ` Olivier Hainque
  2013-06-04 15:13                 ` Olivier Hainque
  0 siblings, 1 reply; 33+ messages in thread
From: Olivier Hainque @ 2013-06-03 21:00 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Olivier Hainque, Arnaud Charlet, Paolo Bonzini, Thomas Schwinge,
	gcc-patches, Rainer Orth, ebotcazou, obry, dj, neroden,
	Ralf.Wildenhues


On Jun 2, 2013, at 21:18 , Alexandre Oliva <aoliva@redhat.com> wrote:
>> - Use target_alias explicitly just at the points where
>>   we know that we need to depart from the canonical name
> 
> I suggest another approach: if there are significant differences between
> the run-time systems, they ought to be preserved in the canonical target
> names.  So, adjust config.sub so that it preserve them, and then we can
> decide based on the canonical target name only.

 Can we do that without adding loads of
 instances of this canonical names in all the
 switch/case statements around ?

 The idea was trying not to go there because
 this is a maintenance pain, essentially pointless
 if the only differences are a couple of Ada
 RTS unit selections.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-06-03 21:00               ` Olivier Hainque
@ 2013-06-04 15:13                 ` Olivier Hainque
  0 siblings, 0 replies; 33+ messages in thread
From: Olivier Hainque @ 2013-06-04 15:13 UTC (permalink / raw)
  To: Alexandre Oliva
  Cc: Olivier Hainque, Arnaud Charlet, Paolo Bonzini, Thomas Schwinge,
	gcc-patches, Rainer Orth, ebotcazou, obry, dj, neroden,
	Ralf.Wildenhues


On Jun 3, 2013, at 22:59 , Olivier Hainque <hainque@adacore.com> wrote:
>> I suggest another approach: if there are significant differences between
>> the run-time systems, they ought to be preserved in the canonical target
>> names.  So, adjust config.sub so that it preserve them, and then we can
>> decide based on the canonical target name only.
> 
> Can we do that without adding loads of
> instances of this canonical names in all the
> switch/case statements around ?
> 
> The idea was trying not to go there because
> this is a maintenance pain, essentially pointless
> if the only differences are a couple of Ada
> RTS unit selections.

 I can't help but thinking there might be something else that would deserve
 using a different canonical name. I need to dig in further to determine.

 Olivier

^ permalink raw reply	[flat|nested] 33+ messages in thread

* back to the Ada target vs target_alias issue wrt target pairs
@ 2013-09-12 10:10     ` Olivier Hainque
  2014-03-16 10:30       ` [ada, build] host/target configuration Thomas Schwinge
  0 siblings, 1 reply; 33+ messages in thread
From: Olivier Hainque @ 2013-09-12 10:10 UTC (permalink / raw)
  To: GCC Patches; +Cc: Thomas Schwinge

[-- Attachment #1: Type: text/plain, Size: 2354 bytes --]

Hello,

This is a followup on Thomas' proposal at

  http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01617.html

re the use of $target_alias vs $target derivatives in the GNAT Makefiles to
select target specific pairs for runtime and tools.

As part of this dicsussion, we:

- agreed that moving back to a scheme based on canonical
  $target parts was better than relying on $target_alias,

- mentioned that we had cases where we needed target_alias
  and that we were going to reconsider these,

- agreed that Thomas' suggestion was a real improvement, and indicated
  that we were willing to experiment in-house before committing.

Assuming we could indeed go back to a scheme where we rely essentially on
canonical $target based values, the suggestion was to use standard variables
computed by configure (target_cpu etc) instead of our ad-hoc computations
(arch, osys etc).

We experimented with this suggestion together with a change in the way we
handle vxworksmils internally, which was the main motivation for the use of
the non-canonical $target_alias in pair selections. It turned out that vxwmils
has enough specificities of its own to better be handled as a canonical os
name anyway.

We're very happy with the change so I'm about to commit it, after bootstrap
and regtest on x86_64-suse-linux, plus checks that the new version produces
the same pairs as the original code for a panel of targets.

Thanks a lot to Thomas and other participants for the input
on this topic.

With Kind Regards,

Olivier

2013-10-11  Thomas Schwinge  <thomas@codesourcery.com>
            Olivier Hainque  <hainque@adacore.com>

	* gcc-interface/Makefile.in: Import target_cpu, target_vendor,
        target_os and their host_ counterparts. Remove host_canonical and
        target_cpu_default, unused. Remove local ad-hoc computations of
        "host", "targ", "arch", "osys" and "manu". Replace uses of these by
        uses of the now imported family, hence back to filters against
        canonical values. Remove filters on e500 for target_cpu, expected to
        be canonicalized into powerpc. Invert the logic filtering on 64bit
        sparc for VxWorks. Simplify the filtering logic for bareboard tools
        target pairs, now using straight elf/eabi filters on the target_os
        part only.


[-- Attachment #2: ada-target_alias.diff --]
[-- Type: application/octet-stream, Size: 23163 bytes --]

diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index 0c4057c..b851683 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -153,10 +153,14 @@ objdir = .
 
 target_alias=@target_alias@
 target=@target@
+target_cpu=@target_cpu@
+target_vendor=@target_vendor@
+target_os=@target_os@
+host_cpu=@host_cpu@
+host_vendor=@host_vendor@
+host_os=@host_os@
 xmake_file = @xmake_file@
 tmake_file = @tmake_file@
-host_canonical=@host@
-target_cpu_default=@target_cpu_default@
 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`
 #mainversion=`sed -e 's/.*\"\([0-9]*\.[0-9]*\).*/\1/' < $(srcdir)/version.c`
 
@@ -254,20 +258,6 @@ TOOLS_LIBS = ../link.o ../targext.o ../../ggc-none.o ../../libcommon-target.a \
   ../../libcommon.a ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \
   ../$(LIBBACKTRACE) ../$(LIBIBERTY) $(SYSLIBS) $(TGT_LIB)
 
-# Convert the target variable into a space separated list of architecture,
-# manufacturer, and operating system and assign each of those to its own
-# variable.
-host:=$(subst -, ,$(host_canonical))
-targ:=$(subst -, ,$(subst -gnu, ,$(target_alias)))
-arch:=$(word 1,$(targ))
-ifeq ($(words $(targ)),2)
-  manu:=
-  osys:=$(word 2,$(targ))
-else
-  manu:=$(word 2,$(targ))
-  osys:=$(word 3,$(targ))
-endif
-
 # Specify the directories to be searched for header files.
 # Both . and srcdir are used, in that order,
 # so that tm.h and config.h will be found in the compilation
@@ -279,7 +269,7 @@ ADA_INCLUDES = -I- -I. -I$(srcdir)/ada
 # Likewise, but valid for subdirectories of the current dir.
 # FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in
 # that directory conflicts with a system header file.
-ifneq ($(findstring vxworks,$(osys)),)
+ifneq ($(findstring vxworks,$(target_os)),)
   INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \
 			-iquote $(fsrcdir)/ada \
 			-I$(fsrcdir)/../include $(GMPINC)
@@ -351,12 +341,12 @@ GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \
 # picks up the right files. For a given target this must be coherent
 # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*.
 
-ifeq ($(strip $(filter-out %x86_64, $(arch))),)
+ifeq ($(strip $(filter-out %x86_64, $(target_cpu))),)
   ifeq ($(strip $(MULTISUBDIR)),/32)
-    arch:=i686
+    target_cpu:=i686
   else
     ifeq ($(strip $(MULTISUBDIR)),/x32)
-      arch:=x32
+      target_cpu:=x32
     endif
   endif
 endif
@@ -459,7 +449,7 @@ EXTRA_LIBGNAT_SRCS=
 # If what's left is null then it's a match.
 
 # m68k VxWorks
-ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out m68k% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -502,7 +492,7 @@ ifeq ($(strip $(filter-out m68k% wrs vx%,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks
-ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
+ifeq ($(strip $(filter-out powerpc% wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -608,7 +598,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworks,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks 653
-ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
+ifeq ($(strip $(filter-out powerpc% wrs vxworksae,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
@@ -670,7 +660,7 @@ ifeq ($(strip $(filter-out powerpc% e500v2 wrs vxworksae,$(targ))),)
 endif
 
 # PowerPC and e500v2 VxWorks MILS
-ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
+ifeq ($(strip $(filter-out powerpc% wrs vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vx6-raven-cert.adb \
@@ -720,7 +710,7 @@ ifeq ($(strip $(filter-out e500% powerpc% wrs vxworksmils,$(targ))),)
 endif
 
 # VxWorksae / VxWorks 653 for x86 (vxsim) - ?? VxWorks mils not implemented
-ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
+ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(target_cpu) $(target_vendor) $(target_os))),)
   # target pairs for kernel + vthreads runtime
   LIBGNAT_TARGET_PAIRS = \
   a-elchha.adb<a-elchha-vxworks-ppc-full.adb \
@@ -780,7 +770,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworksae vxworksmils,$(targ))),)
 endif
 
 # Sparc VxWorks
-ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out sparc% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -807,16 +797,16 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
   mlib-tgt-specific.adb<mlib-tgt-specific-vxworks.adb \
   indepsw.adb<indepsw-gnu.adb
 
-  ifeq ($(strip $(filter-out sparc erc32 leon leon3, $(arch))),)
-    # 32-bits
-    LIBGNAT_TARGET_PAIRS += \
-    s-vxwork.ads<s-vxwork-sparc.ads \
-    system.ads<system-vxworks-sparc-kernel.ads
-  else
+  ifeq ($(strip $(filter-out sparc64 sparcv9, $(target_cpu))),)
     # 64-bits
     LIBGNAT_TARGET_PAIRS += \
     s-vxwork.ads<s-vxwork-sparcv9.ads \
     system.ads<system-vxworks-sparcv9.ads
+  else
+    # 32-bits
+    LIBGNAT_TARGET_PAIRS += \
+    s-vxwork.ads<s-vxwork-sparc.ads \
+    system.ads<system-vxworks-sparc-kernel.ads
   endif
 
   ifeq ($(strip $(filter-out kernel,$(THREAD_KIND))),)
@@ -832,7 +822,7 @@ ifeq ($(strip $(filter-out sparc% leon% wrs vx%,$(targ))),)
 endif
 
 # x86 VxWorks
-ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
+ifeq ($(strip $(filter-out %86 wrs vxworks,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   i-vxwork.ads<i-vxwork-x86.ads \
@@ -923,7 +913,7 @@ ifeq ($(strip $(filter-out %86 wrs vxworks,$(targ))),)
 endif
 
 # ARM VxWorks
-ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out arm% coff wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -959,7 +949,7 @@ ifeq ($(strip $(filter-out arm% coff wrs vx%,$(targ))),)
 endif
 
 # MIPS VxWorks
-ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
+ifeq ($(strip $(filter-out mips% wrs vx%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-vxworks.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -994,7 +984,8 @@ ifeq ($(strip $(filter-out mips% wrs vx%,$(targ))),)
   EXTRA_LIBGNAT_OBJS+=vx_stack_info.o
 endif
 
-ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),)
+# ARM linux, Android eabi
+ifeq ($(strip $(filter-out arm% linux-androideabi,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1022,7 +1013,7 @@ ifeq ($(strip $(filter-out arm% androideabi,$(arch) $(osys))),)
 endif
 
 # Sparc Solaris
-ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
+ifeq ($(strip $(filter-out sparc% sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1046,7 +1037,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
   $(ATOMICS_TARGET_PAIRS) \
   $(ATOMICS_BUILTINS_TARGET_PAIRS)
 
-  ifeq ($(strip $(filter-out sparc sun solaris%,$(targ))),)
+  ifeq ($(strip $(filter-out sparc sun solaris%,$(target_cpu) $(target_vendor) $(target_os))),)
     ifeq ($(strip $(MULTISUBDIR)),/sparcv9)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
@@ -1097,7 +1088,7 @@ ifeq ($(strip $(filter-out sparc% sun solaris%,$(targ))),)
 endif
 
 # x86 and x86-64 solaris
-ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 %x86_64 solaris2%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-solaris.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1122,7 +1113,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
   $(X86_64_TARGET_PAIRS) \
   system.ads<system-solaris-x86_64.ads
 
-  ifeq ($(strip $(filter-out %86 solaris2%,$(arch) $(osys))),)
+  ifeq ($(strip $(filter-out %86 solaris2%,$(target_cpu) $(target_os))),)
     ifeq ($(strip $(MULTISUBDIR)),/amd64)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_64)
@@ -1154,7 +1145,7 @@ ifeq ($(strip $(filter-out %86 %x86_64 %amd64 solaris2%,$(arch) $(osys))),)
 endif
 
 # x86 Linux
-ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   a-synbar.adb<a-synbar-posix.adb \
@@ -1215,7 +1206,7 @@ ifeq ($(strip $(filter-out %86 linux%,$(arch) $(osys))),)
 endif
 
 # x86 kfreebsd
-ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1246,7 +1237,7 @@ ifeq ($(strip $(filter-out %86 kfreebsd%,$(arch) $(osys))),)
   MISCLIB = -lutil
 endif
 
-ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   a-numaux.adb<a-numaux-x86.adb \
@@ -1275,7 +1266,7 @@ ifeq ($(strip $(filter-out x86_64 kfreebsd%,$(arch) $(osys))),)
 endif
 
 # x86 FreeBSD
-ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1304,7 +1295,7 @@ ifeq ($(strip $(filter-out %86 freebsd%,$(arch) $(osys))),)
 endif
 
 # x86-64 FreeBSD
-ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-freebsd.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1333,7 +1324,7 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(osys))),)
 endif
 
 # S390 Linux
-ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out s390% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1354,7 +1345,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
   LIBGNAT_TARGET_PAIRS_64 = \
   system.ads<system-linux-s390x.ads
 
-  ifeq ($(strip $(filter-out s390x,$(arch))),)
+  ifeq ($(strip $(filter-out s390x,$(target_cpu))),)
     ifeq ($(strip $(MULTISUBDIR)),/32)
       LIBGNAT_TARGET_PAIRS = \
       $(LIBGNAT_TARGET_PAIRS_COMMON) $(LIBGNAT_TARGET_PAIRS_32)
@@ -1379,7 +1370,7 @@ ifeq ($(strip $(filter-out s390% linux%,$(arch) $(osys))),)
 endif
 
 # HP/PA HP-UX 10
-ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
+ifeq ($(strip $(filter-out hppa% hp hpux10%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-excpol.adb<a-excpol-abort.adb \
   a-intnam.ads<a-intnam-hpux.ads \
@@ -1399,7 +1390,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),)
 endif
 
 # HP/PA HP-UX 11
-ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
+ifeq ($(strip $(filter-out hppa% hp hpux11%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-hpux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1426,7 +1417,7 @@ ifeq ($(strip $(filter-out hppa% hp hpux11%,$(targ))),)
 endif
 
 # IBM AIX
-ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
+ifeq ($(strip $(filter-out ibm aix%,$(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-aix.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1470,7 +1461,7 @@ ifeq ($(strip $(filter-out ibm aix%,$(manu) $(osys))),)
 endif
 
 # RTEMS
-ifeq ($(strip $(filter-out rtems%,$(osys))),)
+ifeq ($(strip $(filter-out rtems%,$(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   system.ads<system-rtems.ads \
   a-intnam.ads<a-intnam-rtems.ads \
@@ -1488,7 +1479,7 @@ ifeq ($(strip $(filter-out rtems%,$(osys))),)
 endif
 
 # OpenVMS (host)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(host_cpu) $(host_vendor) $(host_os))),)
 
 soext  = .exe
 hyphen = _
@@ -1498,7 +1489,7 @@ LN_S = cp -p
 endif
 
 # OpenVMS (target)
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
     a-caldel.adb<a-caldel-vms.adb \
     a-calend.adb<a-calend-vms.adb \
@@ -1532,7 +1523,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
     s-tpopde.adb<s-tpopde-vms.adb \
     s-tpopde.ads<s-tpopde-vms.ads
 
-  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(targ))),)
+  ifeq ($(strip $(filter-out ia64 hp vms% openvms%,$(target_cpu) $(target_vendor) $(target_os))),)
     LIBGNAT_TARGET_PAIRS += \
       g-enblsp.adb<g-enblsp-vms-ia64.adb \
       g-trasym.adb<g-trasym-vms-ia64.adb \
@@ -1552,7 +1543,7 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
       symbols.adb<symbols-vms.adb \
       symbols-processing.adb<symbols-processing-vms-ia64.adb
   else
-    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(targ))),)
+    ifeq ($(strip $(filter-out alpha64 dec vms% openvms% alphavms%,$(target_cpu) $(target_vendor) $(target_os))),)
       LIBGNAT_TARGET_PAIRS += \
         g-enblsp.adb<g-enblsp-vms-alpha.adb \
         g-trasym.adb<g-trasym-vms-alpha.adb \
@@ -1590,22 +1581,22 @@ ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(targ)))
   LIBRARY_VERSION := $(subst .,_,$(LIB_VERSION))
 endif
 
-# *-elf
-ifeq ($(strip $(filter-out lmp avr none powerpc% eabispe leon% erc32% unknown elf,$(targ))),)
+# *-elf, *-eabi or *-eabispe
+ifeq ($(strip $(filter-out elf eabi eabispe,$(target_os))),)
   TOOLS_TARGET_PAIRS=\
   mlib-tgt-specific.adb<mlib-tgt-specific-xi.adb \
   indepsw.adb<indepsw-gnu.adb
 endif
 
 # Cygwin/Mingw32
-ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
+ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
   # Cygwin provides a full Posix environment, and so we use the default
   # versions of s-memory and g-socthi rather than the Windows-specific
   # MinGW versions.  Ideally we would use all the default versions for
   # Cygwin and none of the MinGW versions, but for historical reasons
   # the Cygwin port has always been a CygMing frankenhybrid and it is
   # a long-term project to disentangle them.
-  ifeq ($(strip $(filter-out cygwin%,$(osys))),)
+  ifeq ($(strip $(filter-out cygwin%,$(target_os))),)
     LIBGNAT_TARGET_PAIRS = \
     s-memory.adb<s-memory.adb \
     g-socthi.ads<g-socthi.ads \
@@ -1663,7 +1654,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
     s-osprim.adb<s-osprim-mingw.adb \
     s-taprop.adb<s-taprop-mingw.adb
 
-    ifeq ($(strip $(filter-out x86_64%,$(arch))),)
+    ifeq ($(strip $(filter-out x86_64%,$(target_cpu))),)
       ifeq ($(strip $(MULTISUBDIR)),/32)
 	LIBGNAT_TARGET_PAIRS += \
 	  $(X86_TARGET_PAIRS) \
@@ -1714,7 +1705,7 @@ ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
 endif
 
 # Mips Linux
-ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mips linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1738,7 +1729,7 @@ ifeq ($(strip $(filter-out mips linux%,$(arch) $(osys))),)
 endif
 
 # Mips/el Linux
-ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mipsel linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1781,7 +1772,7 @@ ifeq ($(strip $(filter-out mipsel linux%,$(arch) $(osys))),)
 endif
 
 # Mips64/el Linux
-ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out mips64el linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1824,7 +1815,7 @@ ifeq ($(strip $(filter-out mips64el linux%,$(arch) $(osys))),)
 endif
 
 # PowerPC and e500v2 Linux
-ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out powerpc% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -1887,7 +1878,8 @@ ifeq ($(strip $(filter-out powerpc% e500% linux%,$(arch) $(osys))),)
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
-ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(word 4,$(targ))),,$(word 4,$(targ)))),)
+# ARM linux, GNU eabi
+ifeq ($(strip $(filter-out arm% linux-gnueabi,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1902,7 +1894,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
   s-taspri.ads<s-taspri-posix-noaltstack.ads \
   s-tpopsp.adb<s-tpopsp-posix-foreign.adb
 
-  ifeq ($(strip $(filter-out arm%b,$(arch))),)
+  ifeq ($(strip $(filter-out arm%b,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
     system.ads<system-linux-armeb.ads
   else
@@ -1923,7 +1915,7 @@ ifeq ($(strip $(filter-out arm%-linux,$(arch)-$(osys)) $(if $(findstring eabi,$(
 endif
 
 # Sparc Linux
-ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out sparc% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS_COMMON = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1965,7 +1957,7 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
 endif
 
 # HP/PA Linux
-ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out hppa% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -1994,7 +1986,7 @@ ifeq ($(strip $(filter-out hppa% linux%,$(arch) $(osys))),)
 endif
 
 # SH4 Linux
-ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out sh4% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2024,7 +2016,7 @@ ifeq ($(strip $(filter-out sh4% linux%,$(arch) $(osys))),)
 endif
 
 # IA64 Linux
-ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %ia64 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2063,7 +2055,7 @@ ifeq ($(strip $(filter-out %ia64 linux%,$(arch) $(osys))),)
 endif
 
 # IA64 HP-UX
-ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
+ifeq ($(strip $(filter-out ia64% hp hpux%,$(target_cpu) $(target_vendor) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-hpux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2092,7 +2084,7 @@ ifeq ($(strip $(filter-out ia64% hp hpux%,$(targ))),)
 endif
 
 # Alpha Linux
-ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-intnam.ads<a-intnam-linux.ads \
   s-inmaop.adb<s-inmaop-posix.adb \
@@ -2123,7 +2115,7 @@ ifeq ($(strip $(filter-out alpha% linux%,$(arch) $(osys))),)
 endif
 
 # x86-64 Linux
-ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %x86_64 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2160,7 +2152,7 @@ ifeq ($(strip $(filter-out %x86_64 linux%,$(arch) $(osys))),)
   LIBRARY_VERSION := $(LIB_VERSION)
 endif
 
-ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   a-exetim.adb<a-exetim-posix.adb \
   a-exetim.ads<a-exetim-default.ads \
@@ -2198,7 +2190,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(arch) $(osys))),)
 endif
 
 # Darwin (Mac OS X)
-ifeq ($(strip $(filter-out darwin%,$(osys))),)
+ifeq ($(strip $(filter-out darwin%,$(target_cpu))),)
   SO_OPTS = -shared-libgcc
   LIBGNAT_TARGET_PAIRS = \
     a-intnam.ads<a-intnam-darwin.ads \
@@ -2209,7 +2201,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     s-taspri.ads<s-taspri-posix.ads \
     s-tpopsp.adb<s-tpopsp-posix-foreign.adb
 
-  ifeq ($(strip $(filter-out %86,$(arch))),)
+  ifeq ($(strip $(filter-out %86,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-susv3.adb \
       s-osprim.adb<s-osprim-darwin.adb \
@@ -2229,7 +2221,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
   endif
 
-  ifeq ($(strip $(filter-out %x86_64,$(arch))),)
+  ifeq ($(strip $(filter-out %x86_64,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-susv3.adb \
       s-osprim.adb<s-osprim-darwin.adb \
@@ -2249,7 +2241,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
     EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
   endif
 
-  ifeq ($(strip $(filter-out powerpc%,$(arch))),)
+  ifeq ($(strip $(filter-out powerpc%,$(target_cpu))),)
     LIBGNAT_TARGET_PAIRS += \
       s-intman.adb<s-intman-posix.adb \
       s-osprim.adb<s-osprim-posix.adb \
@@ -2279,7 +2271,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
 endif
 
 # ARM Nucleus
-ifeq ($(strip $(filter-out arm nucleus%,$(arch) $(osys))),)
+ifeq ($(strip $(filter-out arm nucleus%,$(target_cpu) $(target_os))),)
   LIBGNAT_TARGET_PAIRS = \
   system.ads<system-nucleus-arm.ads \
   a-numaux.ads<a-numaux-vxworks.ads \
@@ -2621,7 +2613,7 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR)
 	$(RM) ../stamp-gnatlib-$(RTSDIR)
 	touch ../stamp-gnatlib1-$(RTSDIR)
 
-ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%,$(subst -, ,$(host)))),)
+ifeq ($(strip $(filter-out alpha64 ia64 dec hp vms% openvms% alphavms%, $(host_cpu) $(host_os))),)
 OSCONS_CPP=../../$(DECC) -E /comment=as_is -DNATIVE \
              -DTARGET='""$(target)""' $(fsrcpfx)ada/s-oscons-tmplt.c
 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-05-28  7:28 ` [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188)) Thomas Schwinge
  2013-05-29 10:50   ` [ada, build] host/target configuration Thomas Schwinge
@ 2014-03-16 10:07   ` Andreas Schwab
  2013-09-12 10:10     ` back to the Ada target vs target_alias issue wrt target pairs Olivier Hainque
  1 sibling, 1 reply; 33+ messages in thread
From: Andreas Schwab @ 2014-03-16 10:07 UTC (permalink / raw)
  To: Thomas Schwinge; +Cc: gcc-patches, Arnaud Charlet, Rainer Orth, ebotcazou, obry

Thomas Schwinge <thomas@codesourcery.com> writes:

> diff --git gcc/ada/gcc-interface/Makefile.in gcc/ada/gcc-interface/Makefile.in
> index eeb8c7f..c07722b 100644
> --- gcc/ada/gcc-interface/Makefile.in
> +++ gcc/ada/gcc-interface/Makefile.in
> @@ -151,12 +151,15 @@ GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
>  program_transform_name =
>  objdir = .
>  
> -target_alias=@target_alias@
>  target=@target@
> +target_cpu=@target_cpu@
> +target_vendor=@target_vendor@
> +target_os=@target_os@
> +host_cpu=@host_cpu@
> +host_vendor=@host_vendor@
> +host_os=@host_os@
>  xmake_file = @xmake_file@
>  tmake_file = @tmake_file@
> -host_canonical=@host@
> -target_cpu_default=@target_cpu_default@

This is wrong, you are reintroducing PR ada/39172.  Installed as
obvious.

Andreas.

	PR ada/39172
	* gcc-interface/Makefile.in (target_cpu_default): Revert
	2013-10-11 change.

Index: gcc/ada/gcc-interface/Makefile.in
===================================================================
--- gcc/ada/gcc-interface/Makefile.in	(revision 208604)
+++ gcc/ada/gcc-interface/Makefile.in	(working copy)
@@ -159,6 +159,7 @@
 host_cpu=@host_cpu@
 host_vendor=@host_vendor@
 host_os=@host_os@
+target_cpu_default = @target_cpu_default@
 xmake_file = @xmake_file@
 tmake_file = @tmake_file@
 #version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < $(srcdir)/version.c`

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2013-09-12 10:10     ` back to the Ada target vs target_alias issue wrt target pairs Olivier Hainque
@ 2014-03-16 10:30       ` Thomas Schwinge
  2014-03-16 10:41         ` Andreas Schwab
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2014-03-16 10:30 UTC (permalink / raw)
  To: Andreas Schwab, Olivier Hainque
  Cc: gcc-patches, Arnaud Charlet, Rainer Orth, ebotcazou, obry

[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]

Hi!

On Sun, 16 Mar 2014 09:32:33 +0100, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Thomas Schwinge <thomas@codesourcery.com> writes:

<http://news.gmane.org/find-root.php?message_id=%3C930D868B-5772-4F33-BB28-B878D40ED165%40adacore.com%3E>
was the final version of the patch, after Olivier had taken it over from
me.


> > --- gcc/ada/gcc-interface/Makefile.in
> > +++ gcc/ada/gcc-interface/Makefile.in
> > @@ -151,12 +151,15 @@ GCC_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS)
> >  program_transform_name =
> >  objdir = .
> >  
> > -target_alias=@target_alias@
> >  target=@target@
> > +target_cpu=@target_cpu@
> > +target_vendor=@target_vendor@
> > +target_os=@target_os@
> > +host_cpu=@host_cpu@
> > +host_vendor=@host_vendor@
> > +host_os=@host_os@
> >  xmake_file = @xmake_file@
> >  tmake_file = @tmake_file@
> > -host_canonical=@host@
> > -target_cpu_default=@target_cpu_default@
> 
> This is wrong, you are reintroducing PR ada/39172.  Installed as
> obvious.

Sorry for that.

> 	PR ada/39172
> 	* gcc-interface/Makefile.in (target_cpu_default): Revert
> 	2013-10-11 change.

> --- gcc/ada/gcc-interface/Makefile.in	(revision 208604)
> +++ gcc/ada/gcc-interface/Makefile.in	(working copy)
> @@ -159,6 +159,7 @@
>  host_cpu=@host_cpu@
>  host_vendor=@host_vendor@
>  host_os=@host_os@
> +target_cpu_default = @target_cpu_default@

It is not obvious to me (and neither was to Olivier as well as the patch
reviewers, as it seems) where the gcc/ada/gcc-interface/ code is using
this variable.  Is there a way for this to be made more explicit, so in
the future it won't get removed as unused, again?


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2014-03-16 10:30       ` [ada, build] host/target configuration Thomas Schwinge
@ 2014-03-16 10:41         ` Andreas Schwab
  2014-03-16 11:10           ` Thomas Schwinge
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Schwab @ 2014-03-16 10:41 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: Olivier Hainque, gcc-patches, Arnaud Charlet, Rainer Orth,
	ebotcazou, obry

Thomas Schwinge <thomas@codesourcery.com> writes:

> It is not obvious to me (and neither was to Olivier as well as the patch
> reviewers, as it seems) where the gcc/ada/gcc-interface/ code is using
> this variable.  Is there a way for this to be made more explicit, so in
> the future it won't get removed as unused, again?

git grep?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2014-03-16 10:41         ` Andreas Schwab
@ 2014-03-16 11:10           ` Thomas Schwinge
  2014-03-16 11:13             ` Andreas Schwab
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2014-03-16 11:10 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Olivier Hainque, gcc-patches, Arnaud Charlet, Rainer Orth,
	ebotcazou, obry

[-- Attachment #1: Type: text/plain, Size: 617 bytes --]

Hi!

On Sun, 16 Mar 2014 11:30:06 +0100, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Thomas Schwinge <thomas@codesourcery.com> writes:
> 
> > It is not obvious to me (and neither was to Olivier as well as the patch
> > reviewers, as it seems) where the gcc/ada/gcc-interface/ code is using
> > this variable.  Is there a way for this to be made more explicit, so in
> > the future it won't get removed as unused, again?
> 
> git grep?

    $ git grep target_cpu_default -- gcc/ada/gcc-interface/
    gcc/ada/gcc-interface/Makefile.in:target_cpu_default = @target_cpu_default@


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2014-03-16 11:10           ` Thomas Schwinge
@ 2014-03-16 11:13             ` Andreas Schwab
  2014-03-16 11:43               ` Thomas Schwinge
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Schwab @ 2014-03-16 11:13 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: Olivier Hainque, gcc-patches, Arnaud Charlet, Rainer Orth,
	ebotcazou, obry

Thomas Schwinge <thomas@codesourcery.com> writes:

> Hi!
>
> On Sun, 16 Mar 2014 11:30:06 +0100, Andreas Schwab <schwab@linux-m68k.org> wrote:
>> Thomas Schwinge <thomas@codesourcery.com> writes:
>> 
>> > It is not obvious to me (and neither was to Olivier as well as the patch
>> > reviewers, as it seems) where the gcc/ada/gcc-interface/ code is using
>> > this variable.  Is there a way for this to be made more explicit, so in
>> > the future it won't get removed as unused, again?
>> 
>> git grep?
>
>     $ git grep target_cpu_default -- gcc/ada/gcc-interface/
>     gcc/ada/gcc-interface/Makefile.in:target_cpu_default = @target_cpu_default@

Did I say anything about ignoring everything but Ada????

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2014-03-16 11:13             ` Andreas Schwab
@ 2014-03-16 11:43               ` Thomas Schwinge
  2014-03-16 12:43                 ` Andreas Schwab
  0 siblings, 1 reply; 33+ messages in thread
From: Thomas Schwinge @ 2014-03-16 11:43 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Olivier Hainque, gcc-patches, Arnaud Charlet, Rainer Orth,
	ebotcazou, obry

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

Hi!

On Sun, 16 Mar 2014 12:09:59 +0100, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Thomas Schwinge <thomas@codesourcery.com> writes:
> > On Sun, 16 Mar 2014 11:30:06 +0100, Andreas Schwab <schwab@linux-m68k.org> wrote:
> >> Thomas Schwinge <thomas@codesourcery.com> writes:
> >> 
> >> > It is not obvious to me (and neither was to Olivier as well as the patch
> >> > reviewers, as it seems) where the gcc/ada/gcc-interface/ code is using
> >> > this variable.  Is there a way for this to be made more explicit, so in
> >> > the future it won't get removed as unused, again?
> >> 
> >> git grep?
> >
> >     $ git grep target_cpu_default -- gcc/ada/gcc-interface/
> >     gcc/ada/gcc-interface/Makefile.in:target_cpu_default = @target_cpu_default@
> 
> Did I say anything about ignoring everything but Ada????

No, you did not, but I had said: »not obvious [...] where the
gcc/ada/gcc-interface/ code is using [target_cpu_default]«.

So, it seems the issue here is that all variables that may used by
$(tmake_file)/$(xmake_file) files (which are "include"d from
gcc/ada/gcc-interface/Makefile.in; tmake_file/xmake_file set in
gcc/config.gcc) must be available -- which is not ovious, and thus
fragile.


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [ada, build] host/target configuration
  2014-03-16 11:43               ` Thomas Schwinge
@ 2014-03-16 12:43                 ` Andreas Schwab
  0 siblings, 0 replies; 33+ messages in thread
From: Andreas Schwab @ 2014-03-16 12:43 UTC (permalink / raw)
  To: Thomas Schwinge
  Cc: Olivier Hainque, gcc-patches, Arnaud Charlet, Rainer Orth,
	ebotcazou, obry

Thomas Schwinge <thomas@codesourcery.com> writes:

> No, you did not, but I had said: »not obvious [...] where the
> gcc/ada/gcc-interface/ code is using [target_cpu_default]«.

Why do you think this directory is called gcc-interface???

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2014-03-16 12:35 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-08  9:27 [ada, build] Restore Solaris/amd64 Ada bootstrap (PR ada/57188) Rainer Orth
2013-05-13 11:10 ` Rainer Orth
2013-05-28  7:28 ` [ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188)) Thomas Schwinge
2013-05-29 10:50   ` [ada, build] host/target configuration Thomas Schwinge
2013-05-29 14:22     ` Paolo Bonzini
2013-05-29 21:36       ` Thomas Schwinge
2013-05-30  7:26         ` Paolo Bonzini
2013-05-30  7:21       ` Eric Botcazou
2013-05-30  7:27         ` Paolo Bonzini
2013-05-30  7:34           ` Eric Botcazou
2013-05-30  7:37             ` Paolo Bonzini
2013-05-31  7:10         ` Thomas Schwinge
2013-05-31  8:04           ` Eric Botcazou
2013-05-31 10:46             ` Paolo Bonzini
2013-05-31 11:15               ` Eric Botcazou
2013-05-31 11:30                 ` Thomas Schwinge
2013-05-31 19:55                   ` Eric Botcazou
2013-05-31 20:32                     ` Thomas Schwinge
2013-06-02  8:45                       ` Eric Botcazou
2013-05-30 13:44       ` Arnaud Charlet
2013-05-30 21:08         ` Olivier Hainque
2013-05-31 13:41           ` Olivier Hainque
2013-06-02 19:19             ` Alexandre Oliva
2013-06-03 21:00               ` Olivier Hainque
2013-06-04 15:13                 ` Olivier Hainque
2014-03-16 10:07   ` Andreas Schwab
2013-09-12 10:10     ` back to the Ada target vs target_alias issue wrt target pairs Olivier Hainque
2014-03-16 10:30       ` [ada, build] host/target configuration Thomas Schwinge
2014-03-16 10:41         ` Andreas Schwab
2014-03-16 11:10           ` Thomas Schwinge
2014-03-16 11:13             ` Andreas Schwab
2014-03-16 11:43               ` Thomas Schwinge
2014-03-16 12:43                 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).