This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ada, build] host/target configuration (was: Restore Solaris/amd64 Ada bootstrap (PR ada/57188))


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: pgpC9mBcvXkwV.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]