Hi all, The attached patch is the last round of "cleanup" changes for multiarch that I have to propose. After this there will be two more rounds of patches once we're committed to the multiarch implementation: one once dpkg-architecture starts to output the DEB_HOST_MULTIARCH variable, and another after eglibc has been built for multiarch.
The solution for debian/patches/gcc-multiarch* is still under discussion; I'm currently waiting for an ack from Aurelien, who was involved in the multiarch discussion on behalf of the eglibc maintainers, before we can really consider this "final". So it may be best to wait for confirmation before merging this. Note that there is one package in the archive that will be broken by the changes to gcc-multiarch*.patch: lib32ffi-dev, which is an amd64 package installing headers to usr/include/i486-linux-gnu/. So I suppose you'll want to fix that package at the same time. (And maybe you want to wait until dpkg is uploaded, then, so that lib32ffi-dev can be fixed right the first time. See https://code.launchpad.net/~vorlon/ubuntu/natty/libffi/multiarch/ for a patch for this.) After the next round of changes, four other packages will be broken due to their use of /usr/include/i486-linux-gnu on i386: libhwloc-dev, liblouis-dev, liblouisxml-dev, and libffi-dev. (The runtime library packages will not be broken - I have a patch to eglibc that will preserve runtime compatibility with /usr/lib/i486-linux-gnu.) And finally, of course, the libc-dev versioned build-dependency, which will only be active once we get to stage2 of the bootstrapping, will need to be updated with the correct libc-dev version number once that's actually in the archive - rather than using the version number of the eglibc in my Ubuntu PPA. Thanks, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: steve.langa...@linaro.org-20110309074818-\ # axtl8nh779079tg3 # target_branch: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.5 # testament_sha1: cda447c161becca0d93df7d7d475daf0a6545583 # timestamp: 2011-03-08 23:48:46 -0800 # base_revision_id: svn-v4:6ca36cf4-e1d1-0310-8c6f-\ # e303bb2178ca:branches/sid/gcc-4.5:5084 # # Begin patch === modified file 'debian/changelog' --- debian/changelog 2011-03-06 11:17:25 +0000 +++ debian/changelog 2011-03-09 07:48:18 +0000 @@ -1,3 +1,18 @@ +gcc-4.5 (4.5.2-6) UNRELEASED; urgency=low + + * Make sure our libs Pre-Depend on 'multiarch-support' when building for + multiarch. + * debian/patches/gcc-multiarch*, debian/rules.patch: use i386 in the + multiarch path for amd64 / kfreebsd-amd64, not i486 or i686. This lets + us use a common set of paths on both Debian and Ubuntu, regardless of + the target default optimization level. + * debian/rules.conf: when building for multiarch, we need to be sure we + are building against a libc-dev that supports the corresponding paths. + (the referenced version number for this needs to be bumped once this is + officially in the archive.) + + -- Steve Langasek <vor...@debian.org> Tue, 08 Mar 2011 23:40:12 -0800 + gcc-4.5 (4.5.2-5) unstable; urgency=low * Update to SVN 20110305 (r170696) from the gcc-4_5-branch. === modified file 'debian/control.m4' --- debian/control.m4 2011-02-18 12:01:00 +0000 +++ debian/control.m4 2011-03-09 07:40:52 +0000 @@ -165,6 +165,7 @@ Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} ifdef(`TARGET',`Provides: libgcc1-TARGET-dcv1 ',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Description: GCC support library`'ifdef(`TARGET)',` (TARGET)', `') Shared version of the support library, a library of internal subroutines @@ -198,6 +199,7 @@ Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} ifdef(`TARGET',`Provides: libgcc2-TARGET-dcv1 ',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Description: GCC support library`'ifdef(`TARGET)',` (TARGET)', `') Shared version of the support library, a library of internal subroutines @@ -229,6 +231,7 @@ Package: libgcc4`'LS Architecture: ifdef(`TARGET',`all',`hppa') ifdef(`TARGET',`',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Section: ifdef(`TARGET',`devel',`libs') Priority: ifdef(`TARGET',`extra',required) @@ -378,6 +381,7 @@ Package: libgccmath`'GCCMATH_SO`'LS Architecture: i386 ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support ')`'dnl Section: libs Priority: PRI(optional) @@ -571,6 +575,7 @@ Package: libmudflap`'MF_SO`'LS Architecture: ifdef(`TARGET',`all',`any') ifdef(`TARGET',`',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Section: ifdef(`TARGET',`devel',`libs') Priority: ifdef(`TARGET',`extra',`PRI(optional)') @@ -668,6 +673,7 @@ Package: libssp`'SSP_SO`'LS Architecture: any ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support ')`'dnl Section: libs Priority: PRI(optional) @@ -718,6 +724,7 @@ Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`any') ifdef(`TARGET',`',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Priority: ifdef(`TARGET',`extra',`PRI(optional)') Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} @@ -868,6 +875,7 @@ Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`any') ifdef(`TARGET',`',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Priority: ifdef(`TARGET',`extra',`PRI(optional)') Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} @@ -998,6 +1006,7 @@ Section: ifdef(`TARGET',`devel',`libs') Architecture: ifdef(`TARGET',`all',`any') ifdef(`TARGET',`',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Priority: ifdef(`TARGET',`extra',PRI(optional)) Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} @@ -1083,6 +1092,7 @@ Section: libs Architecture: NEON_ARCHS ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support ')`'dnl Priority: extra Depends: BASEDEP, libgcc1-neon`'LS, ${shlibs:Depends}, ${misc:Depends} @@ -1291,6 +1301,7 @@ Depends: BASEDEP, ${shlibs:Depends}, ${misc:Depends} ifdef(`TARGET',`Provides: libstdc++CXX_SO-TARGET-dcv1 ',ifdef(`MULTIARCH', `Multi-Arch: same +Pre-Depends: multiarch-support '))`'dnl Conflicts: scim (<< 1.4.2-1) Description: The GNU Standard C++ Library v3`'ifdef(`TARGET)',` (TARGET)', `') === removed file 'debian/patches/gcc-multiarch-i686-linaro.diff' --- debian/patches/gcc-multiarch-i686-linaro.diff 2011-02-18 12:01:00 +0000 +++ debian/patches/gcc-multiarch-i686-linaro.diff 1970-01-01 00:00:00 +0000 @@ -1,355 +0,0 @@ -# DP: Add multiarch support to GCC. -# DP: -# DP: Convert the multilib option to a target triplet, -# DP: add multiarch include directories and libraries path: -# DP: /usr/local/include/<arch>-linux-gnu -# DP: /usr/include/<arch>-linux-gnu -# DP: /usr/lib/<arch>-linux-gnu -# DP: to the system paths. - -2009-03-24 Arthur Loiret <aloi...@debian.org> - - * configure.ac: Handle --enable-multiarch and --with-multiarch-defaults. - * config.gcc: Define MULTIARCH_DEFAULTS if multiarch is enabled. - * config.in [!USED_FOR_TARGET]: Undef ENABLE_MULTIARCH. - * gcc.c: include multiarch.h. - (set_multiarch_dir): New function. Adds the multiarch directories to - the library path. - [ENABLE_MULTIARCH]: Use it. - * cppdefault.c [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an include - directory for multiarch directories. - * incpath.c: include multiarch.h - [ENABLE_MULTIARCH]: Add the multiarch directory to include directories. - * Makefile.in (MULTIARCH_H): New. Use it for incpath.o and gcc.o. - * multiarch.h: New file. ---- - gcc/Makefile.in | 7 ++-- - gcc/config.gcc | 9 +++++ - gcc/config.in | 4 ++ - gcc/configure.ac | 13 ++++++++ - gcc/cppdefault.c | 6 +++ - gcc/gcc.c | 41 ++++++++++++++++++++++++ - gcc/incpath.c | 28 ++++++++++++++++ - gcc/multiarch.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 8 files changed, 196 insertions(+), 3 deletions(-) - ---- a/src/gcc/config.gcc 2010-08-14 17:04:07.000000000 +0200 -+++ b/src/gcc/config.gcc 2010-08-14 17:07:02.064547238 +0200 -@@ -3560,3 +3560,12 @@ - target_cpu_default=$target_cpu_default2 - fi - fi -+ -+if test x${enable_multiarch} = xyes; then -+ multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'` -+ multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__" -+ if test x${with_multiarch_defaults} != x; then -+ multiarch_defaults=${with_multiarch_defaults} -+ fi -+ tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\"" -+fi ---- a/src/gcc/config.in 2010-08-14 17:04:04.000000000 +0200 -+++ b/src/gcc/config.in 2010-08-14 17:07:02.064547238 +0200 -@@ -185,6 +185,10 @@ - #undef ENABLE_WIN32_REGISTRY - #endif - -+/* Define if you want to use multiarch. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_MULTIARCH -+#endif - - /* Define to the name of a file containing a list of extra machine modes for - this architecture. */ ---- a/src/gcc/configure.ac 2010-08-14 17:04:07.000000000 +0200 -+++ b/src/gcc/configure.ac 2010-08-14 17:07:02.064547238 +0200 -@@ -600,6 +600,19 @@ - [], [enable_multilib=yes]) - AC_SUBST(enable_multilib) - -+# Determine whether or not multiarch is enabled. -+AC_ARG_ENABLE(multiarch, -+[ --enable-multiarch enable multiarch support], -+[ -+ enable_multiarch=yes -+ AC_DEFINE(ENABLE_MULTIARCH, 1, -+ [Define if you want to use multiarch.]) -+],[]) -+AC_SUBST(enable_multiarch) -+ -+AC_ARG_WITH(multiarch-defaults, -+[ --with-multiarch-defaults set the default multiarch directory.],) -+ - # Enable __cxa_atexit for C++. - AC_ARG_ENABLE(__cxa_atexit, - [ --enable-__cxa_atexit enable __cxa_atexit for C++], ---- a/src/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200 -+++ b/src/gcc/cppdefault.c 2010-08-14 17:07:02.064547238 +0200 -@@ -60,6 +60,9 @@ - #endif - #ifdef LOCAL_INCLUDE_DIR - /* /usr/local/include comes before the fixincluded header files. */ -+# ifdef ENABLE_MULTIARCH -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, -+# endif - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, - #endif - #ifdef PREFIX_INCLUDE_DIR -@@ -95,6 +98,9 @@ - #endif - #ifdef STANDARD_INCLUDE_DIR - /* /usr/include comes dead last. */ -+# ifdef ENABLE_MULTIARCH -+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 }, -+# endif - { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 }, - #endif - { 0, 0, 0, 0, 0, 0 } ---- a/src/gcc/gcc.c 2010-08-14 17:04:07.000000000 +0200 -+++ b/src/gcc/gcc.c 2010-08-14 17:07:02.074547381 +0200 -@@ -72,6 +72,7 @@ - #include "system.h" - #include "coretypes.h" - #include "multilib.h" /* before tm.h */ -+#include "multiarch.h" - #include "tm.h" - #include <signal.h> - #if ! defined( SIGCHLD ) && defined( SIGCLD ) -@@ -376,6 +377,9 @@ - static int used_arg (const char *, int); - static int default_arg (const char *, int); - static void set_multilib_dir (void); -+#ifdef ENABLE_MULTIARCH -+static void set_multiarch_dir (void); -+#endif - static void print_multilib_info (void); - static void perror_with_name (const char *); - static void fatal_ice (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; -@@ -7392,6 +7396,11 @@ - xputenv (XOBFINISH (&collect_obstack, char *)); - } - -+#ifdef ENABLE_MULTIARCH -+ /* Add the multiarch directories to libraries path. */ -+ set_multiarch_dir (); -+#endif -+ - /* Warn about any switches that no pass was interested in. */ - - for (i = 0; (int) i < n_switches; i++) -@@ -8553,6 +8562,27 @@ - multilib_os_dir = multilib_dir; - } - -+#ifdef ENABLE_MULTIARCH -+/* Add the multiarch directories to libraries path. This uses the converted -+ multiarch triplet from the multilib value. -+ For example, if the target supports -m32/-m64 as multilib option and -+ defaults to 64, it will add /usr/lib/$triplet_target64/lib to library -+ path if either -m64 or no multilib option at all is set. And it will -+ add /usr/lib/$triplet_target32 if -m32 is set. Triplets are defined in -+ multiarch.def. */ -+ -+static void -+set_multiarch_dir (void) -+{ -+ const char *path; -+ -+ path = concat (STANDARD_STARTFILE_PREFIX_2, MULTIARCH_DEFAULTS, -+ dir_separator_str, NULL); -+ add_prefix (&startfile_prefixes, path, NULL, -+ PREFIX_PRIORITY_LAST, 0, 1); -+} -+#endif -+ - /* Print out the multiple library subdirectory selection - information. This prints out a series of lines. Each line looks - like SUBDIRECTORY;@OPTION@OPTION, with as many options as is ---- a/src/gcc/incpath.c 2010-08-14 17:04:04.000000000 +0200 -+++ b/src/gcc/incpath.c 2010-08-14 17:07:02.074547381 +0200 -@@ -32,6 +32,7 @@ - #include "cppdefault.h" - #include "flags.h" - #include "toplev.h" -+#include "multiarch.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -134,6 +135,9 @@ - const struct default_include *p; - int relocated = cpp_relocated(); - size_t len; -+#ifdef ENABLE_MULTIARCH -+ const char *multiarch; -+#endif - - if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) - { -@@ -152,8 +156,20 @@ - if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) - { - char *str = concat (iprefix, p->fname + len, NULL); -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - add_path (str, SYSTEM, p->cxx_aware, false); - } - } -@@ -197,8 +213,20 @@ - else - str = update_path (p->fname, p->component); - -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - - add_path (str, SYSTEM, p->cxx_aware, false); - } ---- a/src/gcc/Makefile.in 2010-08-14 17:04:07.000000000 +0200 -+++ b/src/gcc/Makefile.in 2010-08-14 17:07:52.244547515 +0200 -@@ -859,6 +859,7 @@ - endif - - # Shorthand variables for dependency lists. -+MULTIARCH_H = multiarch.h - EXCEPT_H = except.h sbitmap.h vecprim.h - TOPLEV_H = toplev.h $(INPUT_H) bversion.h - TARGET_H = $(TM_H) target.h insn-modes.h -@@ -1967,7 +1968,7 @@ - - incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ - intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ -- $(MACHMODE_H) $(FLAGS_H) toplev.h -+ $(MACHMODE_H) $(FLAGS_H) toplev.h $(MULTIARCH_H) - - c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \ -@@ -2118,7 +2119,7 @@ - - gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \ - Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \ -- configargs.h $(OBSTACK_H) opts.h -+ configargs.h $(OBSTACK_H) opts.h $(MULTIARCH_H) - (SHLIB_LINK='$(SHLIB_LINK)'; \ - $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ ---- a/src/gcc/multiarch.h 1970-01-01 01:00:00.000000000 +0100 -+++ b/src/gcc/multiarch.h 2010-08-14 17:07:02.074547381 +0200 -@@ -0,0 +1,95 @@ -+/* Header for multiarch handling (include directories, libraries path). -+ Copyright (C) 2009 Free Software Foundation, Inc. -+ Contributed by Arthur Loiret <aloi...@debian.org> -+ -+This file is part of GCC. -+ -+GCC is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation; either version 3, or (at your option) any later -+version. -+ -+GCC is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GCC; see the file COPYING3. If not see -+<http://www.gnu.org/licenses/>. */ -+ -+#ifndef GCC_MULTIARCH_H -+#define GCC_MULTIARCH_H -+ -+#include "tm.h" -+ -+struct multiarch_mapping -+{ -+ const char *const multilib; -+ const char *const multiarch; -+}; -+ -+const struct multiarch_mapping multiarch_mappings[] = { -+#ifdef ENABLE_MULTIARCH -+ { "", MULTIARCH_DEFAULTS }, -+# if defined(__x86_64_linux_gnu__) -+ { "32", "i686-linux-gnu" }, -+# endif -+# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) -+ { "64", "x86_64-linux-gnu" }, -+# endif -+# if defined(__powerpc64_linux_gnu__) -+ { "32", "powerpc-linux-gnu" }, -+# endif -+# if defined(__powerpc_linux_gnu__) -+ { "64", "powerpc64-linux-gnu" }, -+# endif -+# if defined(__sparc64_linux_gnu__) -+ { "32", "sparc-linux-gnu" }, -+# endif -+# if defined(__sparc_linux_gnu__) -+ { "64", "sparc64-linux-gnu" }, -+# endif -+# if defined(__s390x_linux_gnu__) -+ { "31", "s390-linux-gnu" }, -+# endif -+# if defined(__s390_linux_gnu__) -+ { "64", "s390x-linux-gnu" }, -+# endif -+# if defined(__mips_linux_gnu__) -+ { "n32", "mips64-linux-gnuabin32" }, -+ { "64", "mips64-linux-gnuabi64" }, -+# endif -+# if defined(__mipsel_linux_gnu__) -+ { "n32", "mips64el-linux-gnuabin32" }, -+ { "64", "mips64el-linux-gnuabi64" }, -+# endif -+# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, -+# endif -+# if defined(__sh4_linux_gnu__) -+ { "m4", "sh4-linux-gnu" }, -+ { "m4-nofpu", "sh4_nofpu-linux-gnu" }, -+# endif -+#endif /* ENABLE_MULTIARCH */ -+ { 0, 0 } -+}; -+ -+/* Convert the multilib option to the corresponding target triplet. -+ See multiarch.def and config.gcc for multilib/multiarch pairs. -+ When the default multilib is used, the corresponding multilib/multiarch -+ pair is { "", $target_tripplet }. */ -+static inline const char* -+multilib_to_multiarch (const char *imultilib) -+{ -+ const struct multiarch_mapping *p; -+ -+ for (p = multiarch_mappings; p->multiarch; p++) -+ { -+ if (!strcmp(p->multilib, imultilib ? imultilib : "")) -+ return p->multiarch; -+ } -+ return NULL; -+} -+ -+#endif /* GCC_MULTIARCH_H */ === removed file 'debian/patches/gcc-multiarch-i686-trunk.diff' --- debian/patches/gcc-multiarch-i686-trunk.diff 2011-02-18 12:01:00 +0000 +++ debian/patches/gcc-multiarch-i686-trunk.diff 1970-01-01 00:00:00 +0000 @@ -1,322 +0,0 @@ ---- ./src/gcc/incpath.c.orig 2009-11-30 16:46:01.000000000 +0100 -+++ ./src/gcc/incpath.c 2010-05-30 13:15:35.179823375 +0200 -@@ -30,6 +30,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "multiarch.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -132,6 +133,9 @@ - const struct default_include *p; - int relocated = cpp_relocated(); - size_t len; -+#ifdef ENABLE_MULTIARCH -+ const char *multiarch; -+#endif - - if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) - { -@@ -150,8 +154,20 @@ - if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) - { - char *str = concat (iprefix, p->fname + len, NULL); -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - add_path (str, SYSTEM, p->cxx_aware, false); - } - } -@@ -195,8 +211,20 @@ - else - str = update_path (p->fname, p->component); - -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - - add_path (str, SYSTEM, p->cxx_aware, false); - } ---- ./src/gcc/cppdefault.c.orig 2008-07-21 18:06:19.000000000 +0200 -+++ ./src/gcc/cppdefault.c 2010-05-30 13:15:35.179823375 +0200 -@@ -60,6 +60,9 @@ - #endif - #ifdef LOCAL_INCLUDE_DIR - /* /usr/local/include comes before the fixincluded header files. */ -+# ifdef ENABLE_MULTIARCH -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, -+# endif - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, - #endif - #ifdef PREFIX_INCLUDE_DIR -@@ -95,6 +98,9 @@ - #endif - #ifdef STANDARD_INCLUDE_DIR - /* /usr/include comes dead last. */ -+# ifdef ENABLE_MULTIARCH -+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 }, -+# endif - { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 }, - #endif - { 0, 0, 0, 0, 0, 0 } ---- ./src/gcc/config.gcc.orig 2010-05-29 03:44:45.000000000 +0200 -+++ ./src/gcc/config.gcc 2010-05-30 13:15:35.179823375 +0200 -@@ -3559,3 +3559,12 @@ - target_cpu_default=$target_cpu_default2 - fi - fi -+ -+if test x${enable_multiarch} = xyes; then -+ multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'` -+ multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__" -+ if test x${with_multiarch_defaults} != x; then -+ multiarch_defaults=${with_multiarch_defaults} -+ fi -+ tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\"" -+fi ---- ./src/gcc/gcc.c.orig 2010-05-30 13:13:39.000000000 +0200 -+++ ./src/gcc/gcc.c 2010-05-30 13:15:35.169822547 +0200 -@@ -72,6 +72,7 @@ - #include "system.h" - #include "coretypes.h" - #include "multilib.h" /* before tm.h */ -+#include "multiarch.h" - #include "tm.h" - #include <signal.h> - #if ! defined( SIGCHLD ) && defined( SIGCLD ) -@@ -373,6 +374,9 @@ - static int used_arg (const char *, int); - static int default_arg (const char *, int); - static void set_multilib_dir (void); -+#ifdef ENABLE_MULTIARCH -+static void set_multiarch_dir (void); -+#endif - static void print_multilib_info (void); - static void perror_with_name (const char *); - static void display_help (void); -@@ -7314,6 +7318,11 @@ - xputenv (XOBFINISH (&collect_obstack, char *)); - } - -+#ifdef ENABLE_MULTIARCH -+ /* Add the multiarch directories to libraries path. */ -+ set_multiarch_dir (); -+#endif -+ - /* Warn about any switches that no pass was interested in. */ - - for (i = 0; (int) i < n_switches; i++) -@@ -8409,6 +8418,27 @@ - multilib_os_dir = multilib_dir; - } - -+#ifdef ENABLE_MULTIARCH -+/* Add the multiarch directories to libraries path. This uses the converted -+ multiarch triplet from the multilib value. -+ For example, if the target supports -m32/-m64 as multilib option and -+ defaults to 64, it will add /usr/lib/$triplet_target64/lib to library -+ path if either -m64 or no multilib option at all is set. And it will -+ add /usr/lib/$triplet_target32 if -m32 is set. Triplets are defined in -+ multiarch.def. */ -+ -+static void -+set_multiarch_dir (void) -+{ -+ const char *path; -+ -+ path = concat (STANDARD_STARTFILE_PREFIX_2, MULTIARCH_DEFAULTS, -+ dir_separator_str, NULL); -+ add_prefix (&startfile_prefixes, path, NULL, -+ PREFIX_PRIORITY_LAST, 0, 1); -+} -+#endif -+ - /* Print out the multiple library subdirectory selection - information. This prints out a series of lines. Each line looks - like SUBDIRECTORY;@OPTION@OPTION, with as many options as is ---- ./src/gcc/Makefile.in.orig 2010-07-14 01:54:35.000000000 +0200 -+++ ./src/gcc/Makefile.in 2010-07-14 02:34:22.260795585 +0200 -@@ -970,6 +970,7 @@ - PLUGIN_H = plugin.h $(GCC_PLUGIN_H) - PLUGIN_VERSION_H = plugin-version.h configargs.h - LIBFUNCS_H = libfuncs.h $(HASHTAB_H) -+MULTIARCH_H = multiarch.h - - # - # Now figure out from those variables how to compile and link. -@@ -2161,8 +2162,8 @@ - $(TARGET_H) langhooks.h $(CPPLIB_H) $(PLUGIN_H) - - incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ -- intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ -- $(MACHMODE_H) -+ intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(MULTIARCH_H) \ -+ $(TARGET_H) $(MACHMODE_H) - - prefix.o: prefix.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) prefix.h \ - Makefile $(BASEVER) -@@ -2187,7 +2188,7 @@ - - gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \ - Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \ -- configargs.h $(OBSTACK_H) $(OPTS_H) $(DIAGNOSTIC_H) $(VEC_H) -+ configargs.h $(OBSTACK_H) $(OPTS_H) $(DIAGNOSTIC_H) $(VEC_H) $(MULTIARCH_H) - (SHLIB_LINK='$(SHLIB_LINK)'; \ - $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ ---- ./src/gcc/configure.ac.orig 2010-05-28 13:38:00.000000000 +0200 -+++ ./src/gcc/configure.ac 2010-05-30 13:15:35.169822547 +0200 -@@ -600,6 +600,19 @@ - [], [enable_multilib=yes]) - AC_SUBST(enable_multilib) - -+# Determine whether or not multiarch is enabled. -+AC_ARG_ENABLE(multiarch, -+[ --enable-multiarch enable multiarch support], -+[ -+ enable_multiarch=yes -+ AC_DEFINE(ENABLE_MULTIARCH, 1, -+ [Define if you want to use multiarch.]) -+],[]) -+AC_SUBST(enable_multiarch) -+ -+AC_ARG_WITH(multiarch-defaults, -+[ --with-multiarch-defaults set the default multiarch directory.],) -+ - # Enable __cxa_atexit for C++. - AC_ARG_ENABLE(__cxa_atexit, - [ --enable-__cxa_atexit enable __cxa_atexit for C++], ---- ./src/gcc/config.in.orig 2010-05-28 13:38:29.000000000 +0200 -+++ ./src/gcc/config.in 2010-05-30 13:15:35.169822547 +0200 -@@ -179,6 +179,10 @@ - #undef ENABLE_WIN32_REGISTRY - #endif - -+/* Define if you want to use multiarch. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_MULTIARCH -+#endif - - /* Define to the name of a file containing a list of extra machine modes for - this architecture. */ ---- ./src/gcc/multiarch.h.orig 2010-05-30 13:15:35.179823375 +0200 -+++ ./src/gcc/multiarch.h 2010-05-30 13:15:35.179823375 +0200 -@@ -0,0 +1,95 @@ -+/* Header for multiarch handling (include directories, libraries path). -+ Copyright (C) 2009 Free Software Foundation, Inc. -+ Contributed by Arthur Loiret <aloi...@debian.org> -+ -+This file is part of GCC. -+ -+GCC is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation; either version 3, or (at your option) any later -+version. -+ -+GCC is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GCC; see the file COPYING3. If not see -+<http://www.gnu.org/licenses/>. */ -+ -+#ifndef GCC_MULTIARCH_H -+#define GCC_MULTIARCH_H -+ -+#include "tm.h" -+ -+struct multiarch_mapping -+{ -+ const char *const multilib; -+ const char *const multiarch; -+}; -+ -+const struct multiarch_mapping multiarch_mappings[] = { -+#ifdef ENABLE_MULTIARCH -+ { "", MULTIARCH_DEFAULTS }, -+# if defined(__x86_64_linux_gnu__) -+ { "32", "i686-linux-gnu" }, -+# endif -+# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) -+ { "64", "x86_64-linux-gnu" }, -+# endif -+# if defined(__powerpc64_linux_gnu__) -+ { "32", "powerpc-linux-gnu" }, -+# endif -+# if defined(__powerpc_linux_gnu__) -+ { "64", "powerpc64-linux-gnu" }, -+# endif -+# if defined(__sparc64_linux_gnu__) -+ { "32", "sparc-linux-gnu" }, -+# endif -+# if defined(__sparc_linux_gnu__) -+ { "64", "sparc64-linux-gnu" }, -+# endif -+# if defined(__s390x_linux_gnu__) -+ { "31", "s390-linux-gnu" }, -+# endif -+# if defined(__s390_linux_gnu__) -+ { "64", "s390x-linux-gnu" }, -+# endif -+# if defined(__mips_linux_gnu__) -+ { "n32", "mips64-linux-gnuabin32" }, -+ { "64", "mips64-linux-gnuabi64" }, -+# endif -+# if defined(__mipsel_linux_gnu__) -+ { "n32", "mips64el-linux-gnuabin32" }, -+ { "64", "mips64el-linux-gnuabi64" }, -+# endif -+# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, -+# endif -+# if defined(__sh4_linux_gnu__) -+ { "m4", "sh4-linux-gnu" }, -+ { "m4-nofpu", "sh4_nofpu-linux-gnu" }, -+# endif -+#endif /* ENABLE_MULTIARCH */ -+ { 0, 0 } -+}; -+ -+/* Convert the multilib option to the corresponding target triplet. -+ See multiarch.def and config.gcc for multilib/multiarch pairs. -+ When the default multilib is used, the corresponding multilib/multiarch -+ pair is { "", $target_tripplet }. */ -+static inline const char* -+multilib_to_multiarch (const char *imultilib) -+{ -+ const struct multiarch_mapping *p; -+ -+ for (p = multiarch_mappings; p->multiarch; p++) -+ { -+ if (!strcmp(p->multilib, imultilib ? imultilib : "")) -+ return p->multiarch; -+ } -+ return NULL; -+} -+ -+#endif /* GCC_MULTIARCH_H */ === removed file 'debian/patches/gcc-multiarch-i686.diff' --- debian/patches/gcc-multiarch-i686.diff 2010-08-13 16:58:50 +0000 +++ debian/patches/gcc-multiarch-i686.diff 1970-01-01 00:00:00 +0000 @@ -1,357 +0,0 @@ -# DP: Add multiarch support to GCC. -# DP: -# DP: Convert the multilib option to a target triplet, -# DP: add multiarch include directories and libraries path: -# DP: /usr/local/include/<arch>-linux-gnu -# DP: /usr/include/<arch>-linux-gnu -# DP: /usr/lib/<arch>-linux-gnu -# DP: to the system paths. - -2009-03-24 Arthur Loiret <aloi...@debian.org> - - * configure.ac: Handle --enable-multiarch and --with-multiarch-defaults. - * config.gcc: Define MULTIARCH_DEFAULTS if multiarch is enabled. - * config.in [!USED_FOR_TARGET]: Undef ENABLE_MULTIARCH. - * gcc.c: include multiarch.h. - (set_multiarch_dir): New function. Adds the multiarch directories to - the library path. - [ENABLE_MULTIARCH]: Use it. - * cppdefault.c [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an include - directory for multiarch directories. - * incpath.c: include multiarch.h - [ENABLE_MULTIARCH]: Add the multiarch directory to include directories. - * Makefile.in (MULTIARCH_H): New. Use it for incpath.o and gcc.o. - * multiarch.h: New file. ---- - gcc/Makefile.in | 7 ++-- - gcc/config.gcc | 9 +++++ - gcc/config.in | 4 ++ - gcc/configure.ac | 13 ++++++++ - gcc/cppdefault.c | 6 +++ - gcc/gcc.c | 41 ++++++++++++++++++++++++ - gcc/incpath.c | 28 ++++++++++++++++ - gcc/multiarch.h | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 8 files changed, 196 insertions(+), 3 deletions(-) - ---- a/src/gcc/config.in.orig 2009-12-14 -+++ b/src/gcc/config.in 2009-12-20 -@@ -179,6 +179,10 @@ - #undef ENABLE_WIN32_REGISTRY - #endif - -+/* Define if you want to use multiarch. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_MULTIARCH -+#endif - - /* Define to the name of a file containing a list of extra machine modes for - this architecture. */ ---- a/src/gcc/configure.ac.orig 2009-12-20 -+++ b/src/gcc/configure.ac 2009-12-20 -@@ -600,6 +600,19 @@ - [], [enable_multilib=yes]) - AC_SUBST(enable_multilib) - -+# Determine whether or not multiarch is enabled. -+AC_ARG_ENABLE(multiarch, -+[ --enable-multiarch enable multiarch support], -+[ -+ enable_multiarch=yes -+ AC_DEFINE(ENABLE_MULTIARCH, 1, -+ [Define if you want to use multiarch.]) -+],[]) -+AC_SUBST(enable_multiarch) -+ -+AC_ARG_WITH(multiarch-defaults, -+[ --with-multiarch-defaults set the default multiarch directory.],) -+ - # Enable __cxa_atexit for C++. - AC_ARG_ENABLE(__cxa_atexit, - [ --enable-__cxa_atexit enable __cxa_atexit for C++], ---- a/src/gcc/gcc.c.orig 2009-12-20 -+++ b/src/gcc/gcc.c 2009-12-20 -@@ -71,6 +71,7 @@ - #include "system.h" - #include "coretypes.h" - #include "multilib.h" /* before tm.h */ -+#include "multiarch.h" - #include "tm.h" - #include <signal.h> - #if ! defined( SIGCHLD ) && defined( SIGCLD ) -@@ -375,6 +376,9 @@ - static int used_arg (const char *, int); - static int default_arg (const char *, int); - static void set_multilib_dir (void); -+#ifdef ENABLE_MULTIARCH -+static void set_multiarch_dir (void); -+#endif - static void print_multilib_info (void); - static void perror_with_name (const char *); - static void fatal_ice (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN; -@@ -7354,6 +7358,11 @@ - xputenv (XOBFINISH (&collect_obstack, char *)); - } - -+#ifdef ENABLE_MULTIARCH -+ /* Add the multiarch directories to libraries path. */ -+ set_multiarch_dir (); -+#endif -+ - /* Warn about any switches that no pass was interested in. */ - - for (i = 0; (int) i < n_switches; i++) -@@ -8515,6 +8524,27 @@ - multilib_os_dir = multilib_dir; - } - -+#ifdef ENABLE_MULTIARCH -+/* Add the multiarch directories to libraries path. This uses the converted -+ multiarch triplet from the multilib value. -+ For example, if the target supports -m32/-m64 as multilib option and -+ defaults to 64, it will add /usr/lib/$triplet_target64/lib to library -+ path if either -m64 or no multilib option at all is set. And it will -+ add /usr/lib/$triplet_target32 if -m32 is set. Triplets are defined in -+ multiarch.def. */ -+ -+static void -+set_multiarch_dir (void) -+{ -+ const char *path; -+ -+ path = concat (STANDARD_STARTFILE_PREFIX_2, MULTIARCH_DEFAULTS, -+ dir_separator_str, NULL); -+ add_prefix (&startfile_prefixes, path, NULL, -+ PREFIX_PRIORITY_LAST, 0, 1); -+} -+#endif -+ - /* Print out the multiple library subdirectory selection - information. This prints out a series of lines. Each line looks - like SUBDIRECTORY;@OPTION@OPTION, with as many options as is ---- a/src/gcc/config.gcc.orig 2009-12-20 -+++ b/src/gcc/config.gcc 2009-12-20 -@@ -3371,3 +3371,12 @@ - target_cpu_default=$target_cpu_default2 - fi - fi -+ -+if test x${enable_multiarch} = xyes; then -+ multiarch_defaults=`echo ${target_noncanonical} | sed -e 's/unknown-//'` -+ multiarch_define="__`echo ${multiarch_defaults} | tr '-' '_'`__" -+ if test x${with_multiarch_defaults} != x; then -+ multiarch_defaults=${with_multiarch_defaults} -+ fi -+ tm_defines="${tm_defines} ${multiarch_define}=1 MULTIARCH_DEFAULTS=\\\"${multiarch_defaults}\\\"" -+fi ---- a/src/gcc/Makefile.in.orig 2009-12-20 -+++ b/src/gcc/Makefile.in 2009-12-20 -@@ -949,6 +949,7 @@ - $(HASHTAB_H) - PLUGIN_H = plugin.h $(GCC_PLUGIN_H) - PLUGIN_VERSION_H = plugin-version.h configargs.h -+MULTIARCH_H = multiarch.h - - # - # Now figure out from those variables how to compile and link. -@@ -1955,8 +1956,8 @@ - -cp -p $^ $(srcdir) - - incpath.o: incpath.c incpath.h $(CONFIG_H) $(SYSTEM_H) $(CPPLIB_H) \ -- intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(TARGET_H) \ -- $(MACHMODE_H) -+ intl.h prefix.h coretypes.h $(TM_H) cppdefault.h $(MULTIARCH_H) \ -+ $(TARGET_H) $(MACHMODE_H) - - c-decl.o : c-decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ - $(RTL_H) $(C_TREE_H) $(GGC_H) $(TARGET_H) $(FLAGS_H) $(FUNCTION_H) output.h \ -@@ -2107,7 +2108,7 @@ - - gcc.o: gcc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) intl.h multilib.h \ - Makefile $(lang_specs_files) specs.h prefix.h $(GCC_H) $(FLAGS_H) \ -- configargs.h $(OBSTACK_H) opts.h -+ configargs.h $(OBSTACK_H) opts.h $(MULTIARCH_H) - (SHLIB_LINK='$(SHLIB_LINK)'; \ - $(COMPILER) $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) \ - $(DRIVER_DEFINES) \ ---- a/src/gcc/incpath.c.orig 2009-11-30 -+++ b/src/gcc/incpath.c 2009-12-20 -@@ -30,6 +30,7 @@ - #include "intl.h" - #include "incpath.h" - #include "cppdefault.h" -+#include "multiarch.h" - - /* Microsoft Windows does not natively support inodes. - VMS has non-numeric inodes. */ -@@ -132,6 +133,9 @@ - const struct default_include *p; - int relocated = cpp_relocated(); - size_t len; -+#ifdef ENABLE_MULTIARCH -+ const char *multiarch; -+#endif - - if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0) - { -@@ -150,8 +154,20 @@ - if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len)) - { - char *str = concat (iprefix, p->fname + len, NULL); -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - add_path (str, SYSTEM, p->cxx_aware, false); - } - } -@@ -195,8 +211,20 @@ - else - str = update_path (p->fname, p->component); - -+#ifdef ENABLE_MULTIARCH -+ if (p->multilib == 1 && imultilib) -+ str = concat (str, dir_separator_str, imultilib, NULL); -+ else if (p->multilib == 2) -+ { -+ multiarch = multilib_to_multiarch (imultilib); -+ if (!multiarch) -+ continue; -+ str = concat (str, dir_separator_str, multiarch, NULL); -+ } -+#else - if (p->multilib && imultilib) - str = concat (str, dir_separator_str, imultilib, NULL); -+#endif - - add_path (str, SYSTEM, p->cxx_aware, false); - } ---- a/src/gcc/multiarch.h.orig 2009-12-20 -+++ b/src/gcc/multiarch.h 2009-12-20 -@@ -0,0 +1,95 @@ -+/* Header for multiarch handling (include directories, libraries path). -+ Copyright (C) 2009 Free Software Foundation, Inc. -+ Contributed by Arthur Loiret <aloi...@debian.org> -+ -+This file is part of GCC. -+ -+GCC is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation; either version 3, or (at your option) any later -+version. -+ -+GCC is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+You should have received a copy of the GNU General Public License -+along with GCC; see the file COPYING3. If not see -+<http://www.gnu.org/licenses/>. */ -+ -+#ifndef GCC_MULTIARCH_H -+#define GCC_MULTIARCH_H -+ -+#include "tm.h" -+ -+struct multiarch_mapping -+{ -+ const char *const multilib; -+ const char *const multiarch; -+}; -+ -+const struct multiarch_mapping multiarch_mappings[] = { -+#ifdef ENABLE_MULTIARCH -+ { "", MULTIARCH_DEFAULTS }, -+# if defined(__x86_64_linux_gnu__) -+ { "32", "i686-linux-gnu" }, -+# endif -+# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) -+ { "64", "x86_64-linux-gnu" }, -+# endif -+# if defined(__powerpc64_linux_gnu__) -+ { "32", "powerpc-linux-gnu" }, -+# endif -+# if defined(__powerpc_linux_gnu__) -+ { "64", "powerpc64-linux-gnu" }, -+# endif -+# if defined(__sparc64_linux_gnu__) -+ { "32", "sparc-linux-gnu" }, -+# endif -+# if defined(__sparc_linux_gnu__) -+ { "64", "sparc64-linux-gnu" }, -+# endif -+# if defined(__s390x_linux_gnu__) -+ { "31", "s390-linux-gnu" }, -+# endif -+# if defined(__s390_linux_gnu__) -+ { "64", "s390x-linux-gnu" }, -+# endif -+# if defined(__mips_linux_gnu__) -+ { "n32", "mips64-linux-gnuabin32" }, -+ { "64", "mips64-linux-gnuabi64" }, -+# endif -+# if defined(__mipsel_linux_gnu__) -+ { "n32", "mips64el-linux-gnuabin32" }, -+ { "64", "mips64el-linux-gnuabi64" }, -+# endif -+# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, -+# endif -+# if defined(__sh4_linux_gnu__) -+ { "m4", "sh4-linux-gnu" }, -+ { "m4-nofpu", "sh4_nofpu-linux-gnu" }, -+# endif -+#endif /* ENABLE_MULTIARCH */ -+ { 0, 0 } -+}; -+ -+/* Convert the multilib option to the corresponding target triplet. -+ See multiarch.def and config.gcc for multilib/multiarch pairs. -+ When the default multilib is used, the corresponding multilib/multiarch -+ pair is { "", $target_tripplet }. */ -+static inline const char* -+multilib_to_multiarch (const char *imultilib) -+{ -+ const struct multiarch_mapping *p; -+ -+ for (p = multiarch_mappings; p->multiarch; p++) -+ { -+ if (!strcmp(p->multilib, imultilib ? imultilib : "")) -+ return p->multiarch; -+ } -+ return NULL; -+} -+ -+#endif /* GCC_MULTIARCH_H */ ---- a/src/gcc/cppdefault.c.orig 2008-07-21 -+++ b/src/gcc/cppdefault.c 2009-12-20 -@@ -60,6 +60,9 @@ - #endif - #ifdef LOCAL_INCLUDE_DIR - /* /usr/local/include comes before the fixincluded header files. */ -+# ifdef ENABLE_MULTIARCH -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, -+# endif - { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, - #endif - #ifdef PREFIX_INCLUDE_DIR -@@ -95,6 +98,9 @@ - #endif - #ifdef STANDARD_INCLUDE_DIR - /* /usr/include comes dead last. */ -+# ifdef ENABLE_MULTIARCH -+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 }, -+# endif - { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 }, - #endif - { 0, 0, 0, 0, 0, 0 } === modified file 'debian/patches/gcc-multiarch-linaro.diff' --- debian/patches/gcc-multiarch-linaro.diff 2011-02-18 12:01:00 +0000 +++ debian/patches/gcc-multiarch-linaro.diff 2011-03-09 07:44:53 +0000 @@ -293,7 +293,7 @@ +#ifdef ENABLE_MULTIARCH + { "", MULTIARCH_DEFAULTS }, +# if defined(__x86_64_linux_gnu__) -+ { "32", "i486-linux-gnu" }, ++ { "32", "i386-linux-gnu" }, +# endif +# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) + { "64", "x86_64-linux-gnu" }, @@ -325,7 +325,7 @@ + { "64", "mips64el-linux-gnuabi64" }, +# endif +# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, ++ { "32", "i386-kfreebsd-gnu" }, +# endif +# if defined(__sh4_linux_gnu__) + { "m4", "sh4-linux-gnu" }, === modified file 'debian/patches/gcc-multiarch-trunk.diff' --- debian/patches/gcc-multiarch-trunk.diff 2011-02-18 12:01:00 +0000 +++ debian/patches/gcc-multiarch-trunk.diff 2011-03-09 07:44:53 +0000 @@ -260,7 +260,7 @@ +#ifdef ENABLE_MULTIARCH + { "", MULTIARCH_DEFAULTS }, +# if defined(__x86_64_linux_gnu__) -+ { "32", "i486-linux-gnu" }, ++ { "32", "i386-linux-gnu" }, +# endif +# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) + { "64", "x86_64-linux-gnu" }, @@ -292,7 +292,7 @@ + { "64", "mips64el-linux-gnuabi64" }, +# endif +# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, ++ { "32", "i386-kfreebsd-gnu" }, +# endif +# if defined(__sh4_linux_gnu__) + { "m4", "sh4-linux-gnu" }, === modified file 'debian/patches/gcc-multiarch.diff' --- debian/patches/gcc-multiarch.diff 2010-08-13 16:58:50 +0000 +++ debian/patches/gcc-multiarch.diff 2011-03-09 07:44:53 +0000 @@ -7,6 +7,9 @@ # DP: /usr/lib/<arch>-linux-gnu # DP: to the system paths. +2011-03-08 Steve Langasek <steve.langa...@linaro.org> + * Canonicalize x86 to i386 everywhere, not i486/i686 + 2009-03-24 Arthur Loiret <aloi...@debian.org> * configure.ac: Handle --enable-multiarch and --with-multiarch-defaults. @@ -273,7 +276,7 @@ +#ifdef ENABLE_MULTIARCH + { "", MULTIARCH_DEFAULTS }, +# if defined(__x86_64_linux_gnu__) -+ { "32", "i486-linux-gnu" }, ++ { "32", "i386-linux-gnu" }, +# endif +# if defined(__i486_linux_gnu__) || defined(__i686_linux_gnu__) + { "64", "x86_64-linux-gnu" }, @@ -305,7 +308,7 @@ + { "64", "mips64el-linux-gnuabi64" }, +# endif +# if defined(__x86_64_kfreebsd_gnu__) -+ { "32", "i486-kfreebsd-gnu" }, ++ { "32", "i386-kfreebsd-gnu" }, +# endif +# if defined(__sh4_linux_gnu__) + { "m4", "sh4-linux-gnu" }, === modified file 'debian/rules.conf' --- debian/rules.conf 2010-11-22 06:52:22 +0000 +++ debian/rules.conf 2011-03-09 07:48:18 +0000 @@ -130,9 +130,13 @@ # libc-dev dependencies libc_ver := 2.5 +libc_dev_ver := $(libc_ver) ifneq (,$(findstring gnat,$(PKGSOURCE))) libc_ver := 2.9-21 endif +ifeq ($(with_multiarch_lib),yes) + libc_dev_ver := 2.13-0ubuntu4+multiarch.1 +endif ifeq ($(DEB_TARGET_ARCH_OS),linux) ifneq (,$(findstring $(DEB_TARGET_ARCH),alpha ia64)) LIBC_DEP = libc6.1 @@ -200,11 +204,11 @@ endif # Add suffix and required version -LIBC_DEV_DEP := $(LIBC_DEV_DEP)$(LS) (>= $(libc_ver)) +LIBC_DEV_DEP := $(LIBC_DEV_DEP)$(LS) (>= $(libc_dev_ver)) # TODO: make this automatic, there must be a better way to define LIBC_DEP. ifneq ($(DEB_CROSS),yes) - LIBC_BUILD_DEP = libc6.1-dev (>= $(libc_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_ver)), + LIBC_BUILD_DEP = libc6.1-dev (>= $(libc_dev_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_dev_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_dev_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_dev_ver)), LIBC_BIARCH_BUILD_DEP = libc6-dev-amd64 [i386], libc6-dev-sparc64 [sparc], libc6-dev-s390x [s390], libc6-dev-i386 [amd64], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64], lib64gcc1 [i386 powerpc sparc s390], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel], else LIBC_BUILD_DEP = $(LIBC_DEV_DEP), @@ -247,7 +251,7 @@ AUTO_BUILD_DEP += autoconf2.64, automake (>= 1:1.11), automake (<< 1:1.12), ifneq ($(DEB_CROSS),yes) -LIBC_BUILD_DEP := libc6.1-dev (>= $(libc_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_ver)) +LIBC_BUILD_DEP := libc6.1-dev (>= $(libc_dev_ver)) [alpha ia64] | libc0.3-dev (>= $(libc_dev_ver)) [hurd-i386] | libc0.1-dev (>= $(libc_dev_ver)) [kfreebsd-i386 kfreebsd-amd64] | libc6-dev (>= $(libc_dev_ver)) JAVA_BUILD_DEP := libc6.1-dbg [alpha ia64] | libc0.3-dbg [hurd-i386] | libc0.1-dbg [kfreebsd-i386 kfreebsd-amd64] | libc6-dbg, zlib1g-dev, libantlr-java, ifeq ($(PKGSOURCE),gcj-$(BASE_VERSION)) === modified file 'debian/rules.patch' --- debian/rules.patch 2011-03-05 03:16:22 +0000 +++ debian/rules.patch 2011-03-09 07:44:53 +0000 @@ -229,18 +229,10 @@ debian_patches += arm-unbreak-eabi-armv4t endif -ifeq ($(biarch_cpu),i686) - ifeq ($(PKGSOURCE),gcc-snapshot) - debian_patches += gcc-multiarch-i686-trunk - else - debian_patches += gcc-multiarch-i686$(if $(with_linaro_branch),-linaro) - endif +ifeq ($(PKGSOURCE),gcc-snapshot) + debian_patches += gcc-multiarch-trunk else - ifeq ($(PKGSOURCE),gcc-snapshot) - debian_patches += gcc-multiarch-trunk - else - debian_patches += gcc-multiarch$(if $(with_linaro_branch),-linaro) - endif + debian_patches += gcc-multiarch$(if $(with_linaro_branch),-linaro) endif debian_patches += mips-triarch debian_patches += libjava-nobiarch-check # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWZFZ+k8ACz/fgEAwVv///3+v 3wq////+YA6dj7NYa+Vt0ylAJAACu7u7WmElG2WxWiShQAjgGEYTTEMAgGQAwjTJkwjAQ0EkmgE0 AQlJ7UTZNI0PUDIaDINAPUGnlDgGEYTTEMAgGQAwjTJkwjAQ0GIlTM1Taj0RptGkDQDI0AAaADQA BFJGgJNTxTeqYTwgJiaMmIAAAA0AKkkEyATJPTICm0nlHpKZ6ZU9IaBhG0jAaHJfQr2vixZoopD3 IRifY5uJnKeh372gIAMgoVkYKr/b/P8m+ODZBt9nJLqfG8vTDv9hj25troVNx6uLHMBNCC8NQaGn gd42dCzuJJQmtGTMWcLay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