diff options
author | Matthias Klose <doko@ubuntu.com> | 2012-11-14 21:29:15 +0000 |
---|---|---|
committer | Matthias Klose <doko@gcc.gnu.org> | 2012-11-14 21:29:15 +0000 |
commit | e0cdc09f6bea34f278f8bb82700676c5f5b1573c (patch) | |
tree | 798f236c1a228f52fb496d836f7871c8ddfaf6d5 /gcc/genmultilib | |
parent | 46de9f5e3757fbcaea992772f7094bf93b0f8c35 (diff) | |
download | gcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.zip gcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.tar.gz gcc-e0cdc09f6bea34f278f8bb82700676c5f5b1573c.tar.bz2 |
invoke.texi: Document -print-multiarch.
2012-11-14 Matthias Klose <doko@ubuntu.com>
* doc/invoke.texi: Document -print-multiarch.
* doc/install.texi: Document --enable-multiarch.
* doc/fragments.texi: Document MULTILIB_OSDIRNAMES, MULTIARCH_DIRNAME.
* configure.ac: Add --enable-multiarch option.
* configure: Regenerate.
* Makefile.in (s-mlib): Pass MULTIARCH_DIRNAME to genmultilib.
enable_multiarch, with_float: New macros.
if_multiarch: New macro, define in terms of enable_multiarch.
* genmultilib: Add new argument for the multiarch name.
* gcc.c (multiarch_dir): Define.
(for_each_path): Search for multiarch suffixes.
(driver_handle_option): Handle multiarch option.
(do_spec_1): Pass -imultiarch if defined.
(main): Print multiarch.
(set_multilib_dir): Separate multilib and multiarch names
from multilib_select.
(print_multilib_info): Ignore multiarch names in multilib_select.
* incpath.c (add_standard_paths): Search the multiarch include dirs.
* cppdefault.h (default_include): Document multiarch in multilib
member.
* cppdefault.c: [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an
include directory for multiarch directories.
* common.opt: New options --print-multiarch and -imultilib.
* config.gcc <i[34567]86-*-linux* | x86_64-*-linux*> (tmake_file):
Include i386/t-linux.
<i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu> (tmake_file):
Include i386/t-kfreebsd.
<i[34567]86-*-gnu*> (tmake_file): Include i386/t-gnu.
* config/i386/t-linux64: Add multiarch names in
MULTILIB_OSDIRNAMES, define MULTIARCH_DIRNAME.
* config/i386/t-gnu: New file.
* config/i386/t-kfreebsd: Likewise.
* config/i386/t-linux: Likewise.
From-SVN: r193508
Diffstat (limited to 'gcc/genmultilib')
-rw-r--r-- | gcc/genmultilib | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/genmultilib b/gcc/genmultilib index dc4751b..09b6346 100644 --- a/gcc/genmultilib +++ b/gcc/genmultilib @@ -84,6 +84,8 @@ # This argument can be used together with MULTILIB_EXCEPTIONS and will take # effect after the MULTILIB_EXCEPTIONS. +# The optional ninth argument is the multiarch name. + # The last option should be "yes" if multilibs are enabled. If it is not # "yes", all GCC multilib dir names will be ".". @@ -133,7 +135,8 @@ extra=$5 exclusions=$6 osdirnames=$7 multilib_required=$8 -enable_multilib=$9 +multiarch=$9 +enable_multilib=${10} echo "static const char *const multilib_raw[] = {" @@ -261,6 +264,9 @@ fi # names. toosdirnames= defaultosdirname= +if [ -n "${multiarch}" ]; then + defaultosdirname=::${multiarch} +fi if [ -n "${osdirnames}" ]; then set x ${osdirnames} shift @@ -268,6 +274,9 @@ if [ -n "${osdirnames}" ]; then case "$1" in .=*) defaultosdirname=`echo $1 | sed 's|^.=|:|'` + if [ -n "${multiarch}" ]; then + defaultosdirname=${defaultosdirname}:${multiarch} + fi shift ;; *=*) @@ -353,13 +362,13 @@ for combo in ${combinations}; do dirout=`echo ${combo} | sed -e 's/=/-/g'` fi # Remove the leading and trailing slashes. - dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/$||g'` + dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'` # Use the OS directory names rather than the option names. if [ -n "${toosdirnames}" ]; then osdirout=`echo ${combo} | sed ${toosdirnames}` # Remove the leading and trailing slashes. - osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'` + osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'` if [ "x${enable_multilib}" != xyes ]; then dirout=".:${osdirout}" disable_multilib=yes |