re PR ada/5911 (Support for multilib in Ada)

2008-09-21  Laurent Guerby  <laurent@guerby.net>

        PR ada/5911
	* gcc-interface/Makefile.in: Add multilib handling for x86_64
	and sparc.
	* system-linux-sparcv9.ads: New file.
	
2008-09-21  Laurent Guerby  <laurent@guerby.net>
            Paolo Bonzini  <bonzini@gnu.org>
	
	PR ada/5911
	* Makefile.in (all, install, mostlyclean, clean, distclean): Add
	multilib handling.
	* configure.ac: Add multilib handling.
	* configure: Regenerate.


Co-Authored-By: Paolo Bonzini <bonzini@gnu.org>

From-SVN: r140525
This commit is contained in:
Laurent GUERBY 2008-09-21 11:45:23 +00:00 committed by Laurent Guerby
parent aa4652fac0
commit 7193e63927
6 changed files with 1124 additions and 51 deletions

View File

@ -1,3 +1,10 @@
2008-09-21 Laurent Guerby <laurent@guerby.net>
PR ada/5911
* gcc-interface/Makefile.in: Add multilib handling for x86_64
and sparc.
* system-linux-sparcv9.ads: New file.
2008-09-20 Eric Botcazou <ebotcazou@adacore.com>
* exp_dbug.ads: Document new convention for the XVZ variable.

View File

@ -316,6 +316,18 @@ else
osys:=$(word 3,$(targ))
endif
# Make arch 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 $(MULTISUBDIR)),/32)
arch:=i686
endif
endif
# ???: handle more multilib targets
# LIBGNAT_TARGET_PAIRS is a list of pairs of filenames.
# The members of each pair must be separated by a '<' and no whitespace.
# Each pair must be separated by some amount of whitespace from the following
@ -1467,7 +1479,7 @@ ifeq ($(strip $(filter-out powerpc% linux%,$(arch) $(osys))),)
endif
ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
LIBGNAT_TARGET_PAIRS = \
LIBGNAT_TARGET_PAIRS_32 = \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
@ -1482,6 +1494,27 @@ ifeq ($(strip $(filter-out sparc% linux%,$(arch) $(osys))),)
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-linux-sparc.ads
LIBGNAT_TARGET_PAIRS_64 = \
a-intnam.ads<a-intnam-linux.ads \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \
s-osinte.adb<s-osinte-posix.adb \
s-osinte.ads<s-osinte-linux.ads \
s-osprim.adb<s-osprim-posix.adb \
s-taprop.adb<s-taprop-linux.adb \
s-tasinf.ads<s-tasinf-linux.ads \
s-tasinf.adb<s-tasinf-linux.adb \
s-taspri.ads<s-taspri-posix-noaltstack.ads \
s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
system.ads<system-linux-sparcv9.ads
ifeq ($(strip $(MULTISUBDIR)),/64)
LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_64)
else
LIBGNAT_TARGET_PAIRS = $(LIBGNAT_TARGET_PAIRS_32)
endif
TOOLS_TARGET_PAIRS = \
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
indepsw.adb<indepsw-gnu.adb

View File

@ -1,3 +1,12 @@
2008-09-21 Laurent Guerby <laurent@guerby.net>
Paolo Bonzini <bonzini@gnu.org>
PR ada/5911
* Makefile.in (all, install, mostlyclean, clean, distclean): Add
multilib handling.
* configure.ac: Add multilib handling.
* configure: Regenerate.
2008-08-29 Laurent Guerby <laurent@guerby.net>
* Makefile.in (FLAGS_TO_PASS): renamed to LIBADA_FLAGS_TO_PASS to

View File

@ -17,6 +17,17 @@
# Default target; must be first.
all: gnatlib
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
.PHONY: all install
## Multilib support variables.
MULTISRCTOP =
MULTIBUILDTOP =
MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
# Standard autoconf-set variables.
SHELL = @SHELL@
@ -48,12 +59,12 @@ GNATLIBCFLAGS= -g -O2
# Get target-specific overrides for TARGET_LIBGCC2_CFLAGS.
host_subdir = @host_subdir@
GCC_DIR=../../$(host_subdir)/gcc
GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
include $(GCC_DIR)/libgcc.mvars
target_noncanonical:=@target_noncanonical@
version := $(shell cat $(srcdir)/../gcc/BASE-VER)
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
# exeext should not be used because it's the *host* exeext. We're building
# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
@ -64,11 +75,12 @@ LIBADA_FLAGS_TO_PASS = \
"LDFLAGS=$(LDFLAGS)" \
"LN_S=$(LN_S)" \
"SHELL=$(SHELL)" \
"GNATLIBFLAGS=$(GNATLIBFLAGS)" \
"GNATLIBCFLAGS=$(GNATLIBCFLAGS)" \
"GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
"GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
"TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \
"THREAD_KIND=$(THREAD_KIND)" \
"TRACE=$(TRACE)" \
"MULTISUBDIR=$(MULTISUBDIR)" \
"libsubdir=$(libsubdir)" \
"objext=$(objext)" \
"prefix=$(prefix)" \
@ -119,7 +131,8 @@ html:
TAGS:
# Installation rules.
install:
install: install-gnatlib
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
install-info:
@ -129,10 +142,13 @@ install-html:
# Cleaning rules.
mostlyclean:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
clean:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
distclean:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
$(RM) Makefile config.status config.log
maintainer-clean:

1048
libada/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -49,6 +49,54 @@ AC_ARG_ENABLE([maintainer-mode],
[MAINT='#'])
AC_SUBST([MAINT])dnl
AC_CANONICAL_SYSTEM
target_alias=${target_alias-$host_alias}
AM_ENABLE_MULTILIB(, ..)
# Calculate toolexeclibdir
# Also toolexecdir, though it's only used in toolexeclibdir
case ${enable_version_specific_runtime_libs} in
yes)
# Need the gcc compiler version to know where to install libraries
# and header files if --enable-version-specific-runtime-libs option
# is selected.
toolexecdir='$(libdir)/gcc/$(target_alias)'
toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
;;
no)
if test -n "$with_cross_host" &&
test x"$with_cross_host" != x"no"; then
# Install a library built with a cross compiler in tooldir, not libdir.
toolexecdir='$(exec_prefix)/$(target_alias)'
toolexeclibdir='$(toolexecdir)/lib'
else
toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
toolexeclibdir='$(libdir)'
fi
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.) ;; # Avoid trailing /.
*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
esac
;;
esac
AC_SUBST(toolexecdir)
AC_SUBST(toolexeclibdir)
#TODO: toolexeclibdir is currently disregarded
# Check the compiler.
# The same as in boehm-gc and libstdc++. Have to borrow it from there.
# We must force CC to /not/ be precious variables; otherwise
# the wrong, non-multilib-adjusted value will be used in multilibs.
# As a side effect, we have to subst CFLAGS ourselves.
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
m4_define([_AC_ARG_VAR_PRECIOUS],[])
AC_PROG_CC
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
AC_SUBST(CFLAGS)
AC_ARG_ENABLE([shared],
[AC_HELP_STRING([--disable-shared],
[don't provide a shared libgnat])],