Merge lp:~michaelh1/crosstool-ng/aarch64-linaro-tip into lp:~linaro-toolchain-dev/crosstool-ng/linaro

Proposed by Michael Hope
Status: Merged
Merged at revision: 2505
Proposed branch: lp:~michaelh1/crosstool-ng/aarch64-linaro-tip
Merge into: lp:~linaro-toolchain-dev/crosstool-ng/linaro
Diff against target: 1311 lines (+1139/-13)
13 files modified
config/binutils/binutils.in (+2/-2)
config/cc/gcc.in (+8/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch-doc.patch (+66/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch.patch (+663/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-nls.patch (+75/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/link-with-cxx.patch (+15/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib-defaults.patch (+12/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib.patch (+46/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilibwithmultiarch.patch (+133/-0)
contrib/linaro/patches/gcc/linaro-4.7+bzr115029/triplet.patch (+91/-0)
contrib/linaro/update-aarch64.sh (+18/-3)
samples/linaro-aarch64-linux-gnu/crosstool.config (+5/-4)
samples/linaro-aarch64-none-elf/crosstool.config (+5/-4)
To merge this branch: bzr merge lp:~michaelh1/crosstool-ng/aarch64-linaro-tip
Reviewer Review Type Date Requested Status
Linaro Toolchain Builder Pending
Review via email: mp+130284@code.launchpad.net

This proposal supersedes a proposal from 2012-10-18.

Description of the change

config/gcc: add a Linaro GCC tip option for aarch64.

To post a comment you must log in.
Revision history for this message
Michael Hope (michaelh1) wrote : Posted in a previous version of this proposal

cbuild has taken a snapshot of this branch at r2505 and queued it for build.

The diff against the ancestor r2504 is available at:
 http://builds.linaro.org/toolchain/snapshots/crosstool-ng-linaro-1.13.1+bzr2505~michaelh1~aarch64-linaro-tip.diff

and will be built on the following builders:
 i686-lucid

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: crosstool-ng-linaro-1.13.1+bzr2505~michaelh1~aarch64-linaro-tip
cbuild-ancestor: lp:~linaro-toolchain-dev/crosstool-ng/linaro+bzr2504
cbuild-state: check

Revision history for this message
Michael Hope (michaelh1) wrote : Posted in a previous version of this proposal

cbuild has taken a snapshot of this branch at r2506 and queued it for build.

The diff against the ancestor r2504 is available at:
 http://builds.linaro.org/toolchain/snapshots/crosstool-ng-linaro-1.13.1+bzr2506~michaelh1~aarch64-linaro-tip.diff

and will be built on the following builders:
 i686-lucid

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: crosstool-ng-linaro-1.13.1+bzr2506~michaelh1~aarch64-linaro-tip
cbuild-ancestor: lp:~linaro-toolchain-dev/crosstool-ng/linaro+bzr2504
cbuild-state: check

Revision history for this message
Michael Hope (michaelh1) wrote :

cbuild has taken a snapshot of this branch at r2507 and queued it for build.

The diff against the ancestor r2504 is available at:
 http://builds.linaro.org/toolchain/snapshots/crosstool-ng-linaro-1.13.1+bzr2507~michaelh1~aarch64-linaro-tip.diff

and will be built on the following builders:
 i686-lucid

You can track the build queue at:
 http://ex.seabright.co.nz/helpers/scheduler

cbuild-snapshot: crosstool-ng-linaro-1.13.1+bzr2507~michaelh1~aarch64-linaro-tip
cbuild-ancestor: lp:~linaro-toolchain-dev/crosstool-ng/linaro+bzr2504
cbuild-state: check

Revision history for this message
Linaro Toolchain Builder (cbuild) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config/binutils/binutils.in'
2--- config/binutils/binutils.in 2012-10-03 21:28:32 +0000
3+++ config/binutils/binutils.in 2012-10-18 05:18:20 +0000
4@@ -10,7 +10,7 @@
5
6 config BINUTILS_V_2_24_PRE
7 bool
8- prompt "2.24~20120920+gitb05c76f (EXPERIMENTAL)"
9+ prompt "2.24~20121016+git142208f (EXPERIMENTAL)"
10 depends on EXPERIMENTAL && ARCH_aarch64
11 select BINUTILS_2_22_or_later
12
13@@ -62,7 +62,7 @@
14 string
15 # Don't remove next line
16 # CT_INSERT_VERSION_STRING_BELOW
17- default "2.24~20120920+gitb05c76f" if BINUTILS_V_2_24_PRE
18+ default "2.24~20121016+git142208f" if BINUTILS_V_2_24_PRE
19 default "2.22" if BINUTILS_V_2_22
20 default "2.21.53" if BINUTILS_V_2_21_53
21 default "2.21.1a" if BINUTILS_V_2_21_1a
22
23=== modified file 'config/cc/gcc.in'
24--- config/cc/gcc.in 2012-10-12 01:58:28 +0000
25+++ config/cc/gcc.in 2012-10-18 05:18:20 +0000
26@@ -42,6 +42,13 @@
27 depends on CC_GCC_SHOW_LINARO
28 select CC_GCC_4_7
29
30+config CC_V_linaro_4_7_TIP
31+ bool
32+ prompt "linaro-4.7+bzr115029 (EXPERIMENTAL)"
33+ depends on EXPERIMENTAL && ARCH_aarch64
34+ depends on CC_GCC_SHOW_LINARO
35+ select CC_GCC_4_7
36+
37 config CC_V_arm_aarch64_4_7_PRE
38 bool
39 prompt "arm-aarch64-4.7+svn191987 (EXPERIMENTAL)"
40@@ -353,6 +360,7 @@
41 # CT_INSERT_VERSION_STRING_BELOW
42 default "arm-aarch64-4.7+svn191987" if CC_V_arm_aarch64_4_7_PRE
43 default "linaro-4.7-2012.10" if CC_V_linaro_4_7_2012_10
44+ default "linaro-4.7+bzr115029" if CC_V_linaro_4_7_TIP
45 default "4.7.0" if CC_V_4_7_0
46 default "4.6.2" if CC_V_4_6_2
47 default "4.6.1" if CC_V_4_6_1
48
49=== added directory 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029'
50=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch-doc.patch'
51--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch-doc.patch 1970-01-01 00:00:00 +0000
52+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch-doc.patch 2012-10-18 05:18:20 +0000
53@@ -0,0 +1,66 @@
54+# DP: Document -print-multiarch option
55+
56+--- a/gcc/doc/fragments.texi
57++++ b/gcc/doc/fragments.texi
58+@@ -129,6 +129,33 @@
59+ of options to be used for all builds. If you set this, you should
60+ probably set @code{CRTSTUFF_T_CFLAGS} to a dash followed by it.
61+
62++@findex MULTILIB_OSDIRNAMES
63++@item MULTILIB_OSDIRNAMES
64++If @code{MULTILIB_OPTIONS} is used, this variable specifies the list
65++of OS subdirectory names. The format is either the same as of
66++@code{MULTILIB_DIRNAMES}, or a set of mappings. When it is the same
67++as @code{MULTILIB_DIRNAMES}, it describes the multilib directories
68++using OS conventions, rather than GCC conventions. When it is a set
69++of mappings of the form @var{gccdir}=@var{osdir}, the left side gives
70++the GCC convention and the right gives the equivalent OS defined
71++location. If the @var{osdir} part begins with a @samp{!}, the os
72++directory names are used exclusively. Use the mapping when there is
73++no one-to-one equivalence between GCC levels and the OS.
74++
75++For multilib enabled configurations (see @code{MULTIARCH_DIRNAME})
76++below), the multilib name is appended to each directory name, separated
77++by a colon (e.g. @samp{../lib:x86_64-linux-gnu}).
78++
79++@findex MULTIARCH_DIRNAME
80++@item MULTIARCH_DIRNAME
81++If @code{MULTIARCH_DIRNAME} is used, this variable specifies the
82++multiarch name for this configuration. For multiarch enabled
83++configurations it is used to search libraries and crt files in
84++@file{/lib/@var{multiarch}} and @file{/usr/lib/@var{multiarch}}, and
85++system header files in @file{/usr/include/@var{multiarch}}.
86++@code{MULTIARCH_DIRNAME} is not used for multilib enabled
87++configurations, but encoded in @code{MULTILIB_OSDIRNAMES} instead.
88++
89+ @findex SPECS
90+ @item SPECS
91+ Unfortunately, setting @code{MULTILIB_EXTRA_OPTS} is not enough, since
92+--- a/gcc/doc/invoke.texi
93++++ b/gcc/doc/invoke.texi
94+@@ -6011,6 +6011,11 @@
95+ @file{../lib32}, or if OS libraries are present in @file{lib/@var{subdir}}
96+ subdirectories it prints e.g.@: @file{amd64}, @file{sparcv9} or @file{ev6}.
97+
98++@item -print-multiarch
99++@opindex print-multiarch
100++Print the path to OS libraries for the selected multiarch,
101++relative to some @file{lib} subdirectory.
102++
103+ @item -print-prog-name=@var{program}
104+ @opindex print-prog-name
105+ Like @option{-print-file-name}, but searches for a program such as @samp{cpp}.
106+--- a/gcc/doc/install.texi
107++++ b/gcc/doc/install.texi
108+@@ -1036,6 +1036,11 @@
109+ conventions, etc.@: should not be built. The default is to build a
110+ predefined set of them.
111+
112++@item --enable-multiarch
113++Specify wether to enable or disable multiarch support. The default is
114++to detect for glibc start files in a multiarch location, and enable it
115++if the files are found.
116++
117+ Some targets provide finer-grained control over which multilibs are built
118+ (e.g., @option{--disable-softfloat}):
119+ @table @code
120
121=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch.patch'
122--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch.patch 1970-01-01 00:00:00 +0000
123+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-multiarch.patch 2012-10-18 05:18:20 +0000
124@@ -0,0 +1,663 @@
125+# DP: Add multiarch support to GCC.
126+# DP:
127+# DP: Convert the multilib option to a target triplet,
128+# DP: add multiarch include directories and libraries path:
129+# DP: /usr/local/include/<arch>-linux-gnu
130+# DP: /usr/include/<arch>-linux-gnu
131+# DP: /usr/lib/<arch>-linux-gnu
132+# DP: to the system paths.
133+
134+2011-08-18 Matthias Klose <doko@ubuntu.com>
135+
136+ * doc/invoke.texi: Document -print-multiarch.
137+ * Makefile.in (s-mlib): Pass MULTIARCH_DIRNAME to genmultilib.
138+ * genmultilib: Add new option for the multiarch name.
139+ * gcc.c (multiarch_dir): Define.
140+ (for_each_path): Search for multiarch suffixes.
141+ (driver_handle_option): Handle multiarch option.
142+ (do_spec_1): Pass -imultiarch if defined.
143+ (main): Print multiarch.
144+ (set_multilib_dir): Separate multilib and multiarch names
145+ from multilib_select.
146+ (print_multilib_info): Ignore multiarch names in multilib_select.
147+ * incpath.c (add_standard_paths): Search the multiarch include dirs.
148+ * cppdeault.h (default_include): Document multiarch in multilib
149+ member.
150+ * cppdefault.c: [LOCAL_INCLUDE_DIR, STANDARD_INCLUDE_DIR] Add an
151+ include directory for multiarch directories.
152+ * common.opt: New options --print-multiarch and -imultilib.
153+ * config/s390/t-linux64: Add multiarch names in MULTILIB_OSDIRNAMES.
154+ * config/sparc/t-linux64: Likewise.
155+ * config/powerpc/t-linux64: Likewise.
156+ * config/i386/t-linux64: Likewise.
157+ * config/mips/t-linux64: Likewise.
158+ * config/alpha/t-linux: Define MULTIARCH_DIRNAME.
159+ * config/arm/t-linux: Likewise.
160+ * config/i386/t-linux: Likewise.
161+ * config/pa/t-linux: Likewise.
162+ * config/sparc/t-linux: Likewise.
163+ * config/ia64/t-glibc: Define MULTIARCH_DIRNAME for linux target.
164+
165+
166+--- a/gcc/incpath.c (revision 182390)
167++++ b/gcc/incpath.c (working copy)
168+@@ -150,8 +150,14 @@
169+ if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
170+ {
171+ char *str = concat (iprefix, p->fname + len, NULL);
172+- if (p->multilib && imultilib)
173++ if (p->multilib == 1 && imultilib)
174+ str = concat (str, dir_separator_str, imultilib, NULL);
175++ else if (p->multilib == 2)
176++ {
177++ if (!imultiarch)
178++ continue;
179++ str = concat (str, dir_separator_str, imultiarch, NULL);
180++ }
181+ add_path (str, SYSTEM, p->cxx_aware, false);
182+ }
183+ }
184+@@ -195,8 +201,14 @@
185+ else
186+ str = update_path (p->fname, p->component);
187+
188+- if (p->multilib && imultilib)
189++ if (p->multilib == 1 && imultilib)
190+ str = concat (str, dir_separator_str, imultilib, NULL);
191++ else if (p->multilib == 2)
192++ {
193++ if (!imultiarch)
194++ continue;
195++ str = concat (str, dir_separator_str, imultiarch, NULL);
196++ }
197+
198+ add_path (str, SYSTEM, p->cxx_aware, false);
199+ }
200+--- a/gcc/gcc.c (revision 182390)
201++++ b/gcc/gcc.c (working copy)
202+@@ -1147,6 +1147,11 @@
203+ set_multilib_dir based on the compilation options. */
204+
205+ static const char *multilib_os_dir;
206++
207++/* Subdirectory to use for locating libraries in multiarch conventions. Set by
208++ set_multilib_dir based on the compilation options. */
209++
210++static const char *multiarch_dir;
211+
212
213+ /* Structure to keep track of the specs that have been defined so far.
214+ These are accessed using %(specname) in a compiler or link
215+@@ -2072,6 +2077,7 @@
216+ struct prefix_list *pl;
217+ const char *multi_dir = NULL;
218+ const char *multi_os_dir = NULL;
219++ const char *multiarch_suffix = NULL;
220+ const char *multi_suffix;
221+ const char *just_multi_suffix;
222+ char *path = NULL;
223+@@ -2089,11 +2095,14 @@
224+ }
225+ if (do_multi && multilib_os_dir && strcmp (multilib_os_dir, ".") != 0)
226+ multi_os_dir = concat (multilib_os_dir, dir_separator_str, NULL);
227++ if (multiarch_dir)
228++ multiarch_suffix = concat (multiarch_dir, dir_separator_str, NULL);
229+
230+ while (1)
231+ {
232+ size_t multi_dir_len = 0;
233+ size_t multi_os_dir_len = 0;
234++ size_t multiarch_len = 0;
235+ size_t suffix_len;
236+ size_t just_suffix_len;
237+ size_t len;
238+@@ -2102,16 +2111,15 @@
239+ multi_dir_len = strlen (multi_dir);
240+ if (multi_os_dir)
241+ multi_os_dir_len = strlen (multi_os_dir);
242++ if (multiarch_suffix)
243++ multiarch_len = strlen (multiarch_suffix);
244+ suffix_len = strlen (multi_suffix);
245+ just_suffix_len = strlen (just_multi_suffix);
246+
247+ if (path == NULL)
248+ {
249+ len = paths->max_len + extra_space + 1;
250+- if (suffix_len > multi_os_dir_len)
251+- len += suffix_len;
252+- else
253+- len += multi_os_dir_len;
254++ len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
255+ path = XNEWVEC (char, len);
256+ }
257+
258+@@ -2140,6 +2148,16 @@
259+ break;
260+ }
261+
262++ /* Now try the multiarch path. */
263++ if (!skip_multi_dir
264++ && !pl->require_machine_suffix && multiarch_dir)
265++ {
266++ memcpy (path + len, multiarch_suffix, multiarch_len + 1);
267++ ret = callback (path, callback_info);
268++ if (ret)
269++ break;
270++ }
271++
272+ /* Now try the base path. */
273+ if (!pl->require_machine_suffix
274+ && !(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
275+@@ -2970,6 +2970,9 @@
276+ fputs (_(" -print-libgcc-file-name Display the name of the compiler's companion library\n"), stdout);
277+ fputs (_(" -print-file-name=<lib> Display the full path to library <lib>\n"), stdout);
278+ fputs (_(" -print-prog-name=<prog> Display the full path to compiler component <prog>\n"), stdout);
279++ fputs (_("\
280++ -print-multiarch Display the target's normalized GNU triplet, used as\n\
281++ a component in the library path\n"), stdout);
282+ fputs (_(" -print-multi-directory Display the root directory for versions of libgcc\n"), stdout);
283+ fputs (_("\
284+ -print-multi-lib Display the mapping between command line options and\n\
285+@@ -3228,6 +3246,7 @@
286+ case OPT_print_multi_directory:
287+ case OPT_print_sysroot:
288+ case OPT_print_multi_os_directory:
289++ case OPT_print_multiarch:
290+ case OPT_print_sysroot_headers_suffix:
291+ case OPT_time:
292+ case OPT_wrapper:
293+@@ -4880,6 +4899,15 @@
294+ do_spec_1 (" ", 0, NULL);
295+ }
296+
297++ if (multiarch_dir)
298++ {
299++ do_spec_1 ("-imultiarch", 1, NULL);
300++ /* Make this a separate argument. */
301++ do_spec_1 (" ", 0, NULL);
302++ do_spec_1 (multiarch_dir, 1, NULL);
303++ do_spec_1 (" ", 0, NULL);
304++ }
305++
306+ if (gcc_exec_prefix)
307+ {
308+ do_spec_1 ("-iprefix", 1, NULL);
309+@@ -6497,6 +6525,15 @@
310+ return (0);
311+ }
312+
313++ if (print_multiarch)
314++ {
315++ if (multiarch_dir == NULL)
316++ printf ("\n");
317++ else
318++ printf ("%s\n", multiarch_dir);
319++ return (0);
320++ }
321++
322+ if (print_sysroot)
323+ {
324+ if (target_system_root)
325+@@ -7472,10 +7509,26 @@
326+ q++;
327+ if (q < end)
328+ {
329+- char *new_multilib_os_dir = XNEWVEC (char, end - q);
330++ const char *q2 = q + 1;
331++ char *new_multilib_os_dir;
332++
333++ while (q2 < end && *q2 != ':')
334++ q2++;
335++ if (*q2 == ':')
336++ end = q2;
337++ new_multilib_os_dir = XNEWVEC (char, end - q);
338+ memcpy (new_multilib_os_dir, q + 1, end - q - 1);
339+ new_multilib_os_dir[end - q - 1] = '\0';
340+- multilib_os_dir = new_multilib_os_dir;
341++ multilib_os_dir = *new_multilib_os_dir ? new_multilib_os_dir : ".";
342++
343++ end = this_path + this_path_len;
344++ if (q2 < end && *q2 == ':')
345++ {
346++ char *new_multiarch_dir = XNEWVEC (char, end - q2);
347++ memcpy (new_multiarch_dir, q2 + 1, end - q2 - 1);
348++ new_multiarch_dir[end - q2 - 1] = '\0';
349++ multiarch_dir = new_multiarch_dir;
350++ }
351+ break;
352+ }
353+ }
354+@@ -7537,7 +7590,7 @@
355+ /* When --disable-multilib was used but target defines
356+ MULTILIB_OSDIRNAMES, entries starting with .: are there just
357+ to find multilib_os_dir, so skip them from output. */
358+- if (this_path[0] == '.' && this_path[1] == ':')
359++ if (this_path[0] == '.' && this_path[1] == ':' && this_path[2] != ':')
360+ skip = 1;
361+
362+ /* Check for matches with the multilib_exclusions. We don't bother
363+--- a/gcc/genmultilib (revision 182390)
364++++ b/gcc/genmultilib (working copy)
365+@@ -84,6 +84,8 @@
366+ # This argument can be used together with MULTILIB_EXCEPTIONS and will take
367+ # effect after the MULTILIB_EXCEPTIONS.
368+
369++# The optional nine argument is the multiarch name.
370++
371+ # The last option should be "yes" if multilibs are enabled. If it is not
372+ # "yes", all GCC multilib dir names will be ".".
373+
374+@@ -133,7 +135,8 @@
375+ exclusions=$6
376+ osdirnames=$7
377+ multilib_required=$8
378+-enable_multilib=$9
379++multiarch=$9
380++enable_multilib=${10}
381+
382+ echo "static const char *const multilib_raw[] = {"
383+
384+@@ -261,6 +264,9 @@
385+ # names.
386+ toosdirnames=
387+ defaultosdirname=
388++if [ -n "${multiarch}" ]; then
389++ defaultosdirname=::${multiarch}
390++fi
391+ if [ -n "${osdirnames}" ]; then
392+ set x ${osdirnames}
393+ shift
394+@@ -268,6 +274,9 @@
395+ case "$1" in
396+ .=*)
397+ defaultosdirname=`echo $1 | sed 's|^.=|:|'`
398++ if [ -n "${multiarch}" ]; then
399++ defaultosdirname=${defaultosdirname}:${multiarch}
400++ fi
401+ shift
402+ ;;
403+ *=*)
404+@@ -353,13 +362,13 @@
405+ dirout=`echo ${combo} | sed -e 's/=/-/g'`
406+ fi
407+ # Remove the leading and trailing slashes.
408+- dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/$||g'`
409++ dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
410+
411+ # Use the OS directory names rather than the option names.
412+ if [ -n "${toosdirnames}" ]; then
413+ osdirout=`echo ${combo} | sed ${toosdirnames}`
414+ # Remove the leading and trailing slashes.
415+- osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
416++ osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
417+ if [ "x${enable_multilib}" != xyes ]; then
418+ dirout=".:${osdirout}"
419+ disable_multilib=yes
420+--- a/gcc/configure.ac (revision 182390)
421++++ b/gcc/configure.ac (working copy)
422+@@ -620,6 +620,21 @@
423+ [], [enable_multilib=yes])
424+ AC_SUBST(enable_multilib)
425+
426++# Determine whether or not multiarch is enabled.
427++AC_ARG_ENABLE(multiarch,
428++[AS_HELP_STRING([--enable-multiarch],
429++ [enable support for multiarch paths])],
430++[case "${withval}" in
431++yes|no|auto-detect) enable_multiarch=$withval;;
432++*) AC_MSG_ERROR(bad value ${withval} given for --enable-multiarch option) ;;
433++esac], [enable_multiarch=auto-detect])
434++AC_MSG_CHECKING(for multiarch configuration)
435++AC_SUBST(enable_multiarch)
436++AC_MSG_RESULT($enable_multiarch)
437++
438++# needed for setting the multiarch name on ARM
439++AC_SUBST(with_float)
440++
441+ # Enable __cxa_atexit for C++.
442+ AC_ARG_ENABLE(__cxa_atexit,
443+ [AS_HELP_STRING([--enable-__cxa_atexit], [enable __cxa_atexit for C++])],
444+--- a/gcc/cppdefault.c (revision 182390)
445++++ b/gcc/cppdefault.c (working copy)
446+@@ -60,6 +60,7 @@
447+ #endif
448+ #ifdef LOCAL_INCLUDE_DIR
449+ /* /usr/local/include comes before the fixincluded header files. */
450++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
451+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
452+ #endif
453+ #ifdef PREFIX_INCLUDE_DIR
454+@@ -87,6 +88,7 @@
455+ #endif
456+ #ifdef NATIVE_SYSTEM_HEADER_DIR
457+ /* /usr/include comes dead last. */
458++ { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 2 },
459+ { NATIVE_SYSTEM_HEADER_DIR, NATIVE_SYSTEM_HEADER_COMPONENT, 0, 0, 1, 0 },
460+ #endif
461+ { 0, 0, 0, 0, 0, 0 }
462+--- a/gcc/cppdefault.h (revision 182390)
463++++ b/gcc/cppdefault.h (working copy)
464+@@ -43,9 +43,11 @@
465+ C++. */
466+ const char add_sysroot; /* FNAME should be prefixed by
467+ cpp_SYSROOT. */
468+- const char multilib; /* FNAME should have the multilib path
469+- specified with -imultilib
470+- appended. */
471++ const char multilib; /* FNAME should have appended
472++ - the multilib path specified with -imultilib
473++ when 1 is passed,
474++ - the multiarch path specified with
475++ -imultiarch, when 2 is passed. */
476+ };
477+
478+ extern const struct default_include cpp_include_defaults[];
479+--- a/gcc/common.opt (revision 182390)
480++++ b/gcc/common.opt (working copy)
481+@@ -345,6 +345,9 @@
482+ -print-multi-os-directory
483+ Driver Alias(print-multi-os-directory)
484+
485++-print-multiarch
486++Driver Alias(print-multiarch)
487++
488+ -print-prog-name
489+ Driver Separate Alias(print-prog-name=)
490+
491+@@ -2268,6 +2271,10 @@
492+ Common Joined Var(plugindir_string) Init(0)
493+ -iplugindir=<dir> Set <dir> to be the default plugin directory
494+
495++imultiarch
496++Common Joined Separate RejectDriver Var(imultiarch) Init(0)
497++-imultiarch <dir> Set <dir> to be the multiarch include subdirectory
498++
499+ l
500+ Driver Joined Separate
501+
502+@@ -2325,6 +2332,9 @@
503+
504+ print-multi-os-directory
505+ Driver Var(print_multi_os_directory)
506++
507++print-multiarch
508++Driver Var(print_multiarch)
509+
510+ print-prog-name=
511+ Driver JoinedOrMissing Var(print_prog_name)
512+--- a/gcc/config.gcc (revision 182390)
513++++ b/gcc/config.gcc (working copy)
514+@@ -1508,7 +1508,7 @@
515+ ;;
516+ ia64*-*-linux*)
517+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h"
518+- tmake_file="${tmake_file} ia64/t-ia64 t-libunwind"
519++ tmake_file="${tmake_file} ia64/t-ia64 ia64/t-glibc t-libunwind"
520+ target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
521+ ;;
522+ ia64*-*-hpux*)
523+@@ -2012,6 +2012,7 @@
524+ ;;
525+ *)
526+ tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
527++ tmake_file="$tmake_file rs6000/t-linux"
528+ ;;
529+ esac
530+ case ${target} in
531+@@ -3467,10 +3468,14 @@
532+
533+ i[34567]86-*-darwin* | x86_64-*-darwin*)
534+ ;;
535+- i[34567]86-*-linux* | x86_64-*-linux* | \
536+- i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \
537+- i[34567]86-*-gnu*)
538++ i[34567]86-*-linux* | x86_64-*-linux*)
539+ ;;
540++ i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
541++ tmake_file="${tmake_file} i386/t-linux i386/t-kfreebsd"
542++ ;;
543++ i[34567]86-*-gnu*)
544++ tmake_file="${tmake_file} i386/t-linux i386/t-gnu"
545++ ;;
546+ i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
547+ ;;
548+ i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
549+--- a/gcc/Makefile.in (revision 182390)
550++++ b/gcc/Makefile.in (working copy)
551+@@ -352,6 +352,17 @@
552+
553+ enable_plugin = @enable_plugin@
554+
555++# Multiarch support
556++enable_multiarch = @enable_multiarch@
557++with_float = @with_float@
558++ifeq ($(enable_multiarch),yes)
559++ if_multiarch = $(1)
560++else ifeq ($(enable_multiarch),auto-detect)
561++ if_multiarch = $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib/*/crti.o),$(1))
562++else
563++ if_multiarch =
564++endif
565++
566+ CPPLIB = ../libcpp/libcpp.a
567+ CPPINC = -I$(srcdir)/../libcpp/include
568+
569+@@ -1845,10 +1845,11 @@
570+ "$(MULTILIB_EXCLUSIONS)" \
571+ "$(MULTILIB_OSDIRNAMES)" \
572+ "$(MULTILIB_REQUIRED)" \
573++ "$(MULTIARCH_DIRNAME)" \
574+ "@enable_multilib@" \
575+ > tmp-mlib.h; \
576+ else \
577+- $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' no\
578++ $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' "$(MULTIARCH_DIRNAME)" no\
579+ > tmp-mlib.h; \
580+ fi
581+ $(SHELL) $(srcdir)/../move-if-change tmp-mlib.h multilib.h
582+--- a/gcc/config/alpha/t-linux (revision 0)
583++++ b/gcc/config/alpha/t-linux (revision 0)
584+@@ -0,0 +1 @@
585++MULTIARCH_DIRNAME = $(call if_multiarch,alpha-linux-gnu)
586+--- a/gcc/config/s390/t-linux64 (revision 182390)
587++++ b/gcc/config/s390/t-linux64 (working copy)
588+@@ -7,4 +7,5 @@
589+
590+ MULTILIB_OPTIONS = m64/m31
591+ MULTILIB_DIRNAMES = 64 32
592+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
593++MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:s390x-linux-gnu)
594++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
595+--- a/gcc/config/sparc/t-linux64 (revision 182390)
596++++ b/gcc/config/sparc/t-linux64 (working copy)
597+@@ -26,4 +26,5 @@
598+
599+ MULTILIB_OPTIONS = m64/m32
600+ MULTILIB_DIRNAMES = 64 32
601+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
602++MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:sparc64-linux-gnu)
603++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu)
604+--- a/gcc/config/sparc/t-linux (revision 0)
605++++ b/gcc/config/sparc/t-linux (revision 0)
606+@@ -0,0 +1 @@
607++MULTIARCH_DIRNAME = $(call if_multiarch,sparc-linux-gnu)
608+--- a/gcc/config/i386/t-kfreebsd (revision 0)
609++++ b/gcc/config/i386/t-kfreebsd (revision 0)
610+@@ -0,0 +1,5 @@
611++MULTIARCH_DIRNAME = $(call if_multiarch,i386-kfreebsd-gnu)
612++
613++# MULTILIB_OSDIRNAMES are set in t-linux64.
614++KFREEBSD_OS = $(filter kfreebsd%, $(word 3, $(subst -, ,$(target))))
615++MULTILIB_OSDIRNAMES := $(subst linux,$(KFREEBSD_OS),$(MULTILIB_OSDIRNAMES))
616+--- a/gcc/config/i386/t-gnu (revision 0)
617++++ b/gcc/config/i386/t-gnu (revision 0)
618+@@ -0,0 +1 @@
619++MULTIARCH_DIRNAME = $(call if_multiarch,i386-gnu)
620+--- a/gcc/config/i386/t-linux (revision 0)
621++++ b/gcc/config/i386/t-linux (revision 0)
622+@@ -0,0 +1 @@
623++MULTIARCH_DIRNAME = $(call if_multiarch,i386-linux-gnu)
624+--- a/gcc/config/i386/t-linux64 (revision 182390)
625++++ b/gcc/config/i386/t-linux64 (working copy)
626+@@ -34,6 +34,6 @@
627+ comma=,
628+ MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
629+ MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
630+-MULTILIB_OSDIRNAMES = m64=../lib64
631+-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
632++MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
633++MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
634+ MULTILIB_OSDIRNAMES+= mx32=../libx32
635+--- a/gcc/config/ia64/t-glibc (revision 0)
636++++ b/gcc/config/ia64/t-glibc (revision 0)
637+@@ -0,0 +1,3 @@
638++ifneq (,$(findstring linux, $(target)))
639++MULTIARCH_DIRNAME = $(call if_multiarch,ia64-linux-gnu)
640++endif
641+--- a/gcc/config/m68k/t-linux (revision 182390)
642++++ b/gcc/config/m68k/t-linux (working copy)
643+@@ -19,6 +19,8 @@
644+ # Only include multilibs for 680x0 and ColdFire CPUs with an MMU.
645+ M68K_MLIB_CPU += && ((CPU ~ "^m680") || (CPU ~ "^mcf")) && (FLAGS ~ "FL_MMU")
646+
647++MULTIARCH_DIRNAME = $(call if_multiarch,m68k-linux-gnu)
648++
649+ # This rule uses MULTILIB_MATCHES to generate a definition of
650+ # SYSROOT_SUFFIX_SPEC.
651+ sysroot-suffix.h: $(srcdir)/config/m68k/print-sysroot-suffix.sh
652+--- a/gcc/config/rs6000/t-spe (revision 182390)
653++++ b/gcc/config/rs6000/t-spe (working copy)
654+@@ -71,3 +71,6 @@
655+ mabi=altivec/mlittle \
656+ maltivec/mlittle \
657+ maltivec/mabi=altivec/mlittle
658++
659++MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file)),,v1)
660++
661+--- a/gcc/config/rs6000/t-linux64 (revision 182390)
662++++ b/gcc/config/rs6000/t-linux64 (working copy)
663+@@ -31,5 +31,7 @@
664+ MULTILIB_EXTRA_OPTS = fPIC mstrict-align
665+ MULTILIB_EXCEPTIONS = m64/msoft-float
666+ MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
667+-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
668++MULTILIB_OSDIRNAMES = ../lib64$(call if_multiarch,:powerpc64-linux-gnu)
669++MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:powerpc-linux-gnu)
670++MULTILIB_OSDIRNAMES += nof
671+ MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
672+--- a/gcc/config/rs6000/t-linux (revision 0)
673++++ b/gcc/config/rs6000/t-linux (revision 0)
674+@@ -0,0 +1 @@
675++MULTIARCH_DIRNAME = powerpc-linux-gnu
676+--- a/gcc/config/arm/t-linux-eabi (revision 182390)
677++++ b/gcc/config/arm/t-linux-eabi (working copy)
678+@@ -24,3 +24,6 @@
679+ #MULTILIB_OPTIONS += mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
680+ #MULTILIB_DIRNAMES += fa606te fa626te fmp626 fa726te
681+ #MULTILIB_EXCEPTIONS += *mthumb/*mcpu=fa606te *mthumb/*mcpu=fa626te *mthumb/*mcpu=fmp626 *mthumb/*mcpu=fa726te*
682++
683++ARM_EB = $(if $(findstring TARGET_BIG_ENDIAN_DEFAULT=1, $(tm_defines)),eb)
684++MULTIARCH_DIRNAME = $(call if_multiarch,arm$(ARM_EB)-linux-gnueabi$(if $(filter hard,$(with_float)),hf))
685+--- a/gcc/config/pa/t-linux (revision 0)
686++++ b/gcc/config/pa/t-linux (revision 0)
687+@@ -0,0 +1 @@
688++MULTIARCH_DIRNAME = $(call if_multiarch,hppa-linux-gnu)
689+--- a/gcc/config/mips/t-linux64 (revision 182390)
690++++ b/gcc/config/mips/t-linux64 (working copy)
691+@@ -18,4 +18,9 @@
692+
693+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
694+ MULTILIB_DIRNAMES = n32 32 64
695+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
696++MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
697++MIPS_SOFT = $(if $(filter MASK_SOFT_FLOAT_ABI, $(target_cpu_default)),soft)
698++MULTILIB_OSDIRNAMES = \
699++ ../lib32$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabin32$(MIPS_SOFT)) \
700++ ../lib$(call if_multiarch,:mips$(MIPS_EL)-linux-gnu$(MIPS_SOFT)) \
701++ ../lib64$(call if_multiarch,:mips64$(MIPS_EL)-linux-gnuabi64$(MIPS_SOFT))
702+--- a/libstdc++-v3/python/hook.in
703++++ b/libstdc++-v3/python/hook.in
704+@@ -47,7 +47,10 @@
705+ libdir = libdir[len (prefix):]
706+
707+ # Compute the ".."s needed to get from libdir to the prefix.
708+- dotdots = ('..' + os.sep) * len (libdir.split (os.sep))
709++ backdirs = len (libdir.split (os.sep))
710++ if not os.path.basename(os.path.dirname(__file__)).startswith('lib'):
711++ backdirs += 1 # multiarch subdir
712++ dotdots = ('..' + os.sep) * backdirs
713+
714+ objfile = gdb.current_objfile ().filename
715+ dir_ = os.path.join (os.path.dirname (objfile), dotdots, pythondir)
716+--- a/gcc/configure 2012-04-10 09:54:30 +0000
717++++ b/gcc/configure 2012-04-12 02:39:34 +0000
718+@@ -764,6 +764,8 @@
719+ enable_shared
720+ enable_fixed_point
721+ enable_decimal_float
722++with_float
723++enable_multiarch
724+ enable_multilib
725+ ENABLE_BUILD_WITH_CXX
726+ coverage_flags
727+@@ -875,6 +877,7 @@
728+ enable_build_with_cxx
729+ with_stabs
730+ enable_multilib
731++enable_multiarch
732+ enable___cxa_atexit
733+ enable_decimal_float
734+ enable_fixed_point
735+@@ -1576,6 +1579,7 @@
736+ enable detailed memory allocation stats gathering
737+ --enable-build-with-cxx build with C++ compiler instead of C compiler
738+ --enable-multilib enable library support for multiple ABIs
739++ --enable-multiarch enable support for multiarch paths
740+ --enable-__cxa_atexit enable __cxa_atexit for C++
741+ --enable-decimal-float={no,yes,bid,dpd}
742+ enable decimal float extension to C. Selecting 'bid'
743+@@ -7045,6 +7049,26 @@
744+
745+
746+
747++# Determine whether or not multiarch is enabled.
748++# Check whether --enable-multiarch was given.
749++if test "${enable_multiarch+set}" = set; then :
750++ enableval=$enable_multiarch; case "${withval}" in
751++yes|no|auto-detect) enable_multiarch=$withval;;
752++*) as_fn_error "bad value ${withval} given for --enable-multiarch option" "$LINENO" 5 ;;
753++esac
754++else
755++ enable_multiarch=auto-detect
756++fi
757++
758++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multiarch configuration" >&5
759++$as_echo_n "checking for multiarch configuration... " >&6; }
760++
761++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_multiarch" >&5
762++$as_echo "$enable_multiarch" >&6; }
763++
764++# needed for setting the multiarch name on ARM
765++
766++
767+ # Enable __cxa_atexit for C++.
768+ # Check whether --enable-__cxa_atexit was given.
769+ if test "${enable___cxa_atexit+set}" = set; then :
770+@@ -17971,7 +17995,7 @@
771+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
772+ lt_status=$lt_dlunknown
773+ cat > conftest.$ac_ext <<_LT_EOF
774+-#line 17974 "configure"
775++#line 17998 "configure"
776+ #include "confdefs.h"
777+
778+ #if HAVE_DLFCN_H
779+@@ -18077,7 +18101,7 @@
780+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
781+ lt_status=$lt_dlunknown
782+ cat > conftest.$ac_ext <<_LT_EOF
783+-#line 18080 "configure"
784++#line 18104 "configure"
785+ #include "confdefs.h"
786+
787+ #if HAVE_DLFCN_H
788+
789
790=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-nls.patch'
791--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-nls.patch 1970-01-01 00:00:00 +0000
792+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/gcc-nls.patch 2012-10-18 05:18:20 +0000
793@@ -0,0 +1,75 @@
794+diff -Naru gcc-linaro-4.7-2012.04/gcc/gcc.c gcc-linaro-4.7-2012.04-updated/gcc/gcc.c
795+--- gcc-linaro-4.7-2012.04/gcc/gcc.c 2012-04-10 17:54:47.000000000 +0800
796++++ gcc-linaro-4.7-2012.04-updated/gcc/gcc.c 2012-04-17 10:09:17.261047794 +0800
797+@@ -6154,7 +6154,7 @@
798+ /* Unlock the stdio streams. */
799+ unlock_std_streams ();
800+
801+- gcc_init_libintl ();
802++ gcc_init_libintl_program (argv[0]);
803+
804+ diagnostic_initialize (global_dc, 0);
805+ if (atexit (delete_temp_files) != 0)
806+diff -Naru gcc-linaro-4.7-2012.04/gcc/intl.c gcc-linaro-4.7-2012.04-updated/gcc/intl.c
807+--- gcc-linaro-4.7-2012.04/gcc/intl.c 2012-04-10 17:54:47.000000000 +0800
808++++ gcc-linaro-4.7-2012.04-updated/gcc/intl.c 2012-04-17 10:41:40.129785979 +0800
809+@@ -49,6 +49,14 @@
810+ void
811+ gcc_init_libintl (void)
812+ {
813++ gcc_init_libintl_program("gcc");
814++}
815++
816++#define LIBINTL_RELATIVE_DIR "../share/locale"
817++
818++void
819++gcc_init_libintl_program (const char * program_name)
820++{
821+ #ifdef HAVE_LC_MESSAGES
822+ setlocale (LC_CTYPE, "");
823+ setlocale (LC_MESSAGES, "");
824+@@ -56,7 +64,32 @@
825+ setlocale (LC_ALL, "");
826+ #endif
827+
828+- (void) bindtextdomain ("gcc", LOCALEDIR);
829++ if (!access (LOCALEDIR, X_OK))
830++ {
831++ /* If LOCALEDIR exists, use LOCALEDIR. */
832++ (void) bindtextdomain ("gcc", LOCALEDIR);
833++ }
834++ else
835++ {
836++ /* Try relative dir, i.e. .../bin/../share/locale. */
837++ int len1, len2;
838++ char *prefix_dir, *locale_dir;
839++ prefix_dir = make_relative_prefix(program_name,".",".");
840++ len1 = strlen (prefix_dir);
841++ len2 = strlen (LIBINTL_RELATIVE_DIR);
842++ locale_dir = xmalloc (len1 + len2 + 1);
843++ if (locale_dir != NULL)
844++ {
845++ strcpy (locale_dir, prefix_dir);
846++ strcpy (locale_dir + len1, LIBINTL_RELATIVE_DIR);
847++ (void) bindtextdomain ("gcc", locale_dir);
848++ }
849++ else
850++ (void) bindtextdomain ("gcc", LOCALEDIR);
851++
852++ free (prefix_dir);
853++ }
854++
855+ (void) textdomain ("gcc");
856+
857+ /* Opening quotation mark. */
858+diff -Naru gcc-linaro-4.7-2012.04/gcc/intl.h gcc-linaro-4.7-2012.04-updated/gcc/intl.h
859+--- gcc-linaro-4.7-2012.04/gcc/intl.h 2012-04-10 17:54:47.000000000 +0800
860++++ gcc-linaro-4.7-2012.04-updated/gcc/intl.h 2012-04-17 10:09:17.261047794 +0800
861+@@ -30,6 +30,7 @@
862+ #ifdef ENABLE_NLS
863+ #include <libintl.h>
864+ extern void gcc_init_libintl (void);
865++extern void gcc_init_libintl_program (const char *);
866+ extern size_t gcc_gettext_width (const char *);
867+ #else
868+ /* Stubs. */
869
870=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/link-with-cxx.patch'
871--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/link-with-cxx.patch 1970-01-01 00:00:00 +0000
872+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/link-with-cxx.patch 2012-10-18 05:18:20 +0000
873@@ -0,0 +1,15 @@
874+=== modified file 'gcc/Makefile.in'
875+--- a/gcc/Makefile.in 2012-04-02 13:36:04 +0000
876++++ b/gcc/Makefile.in 2012-04-13 04:12:57 +0000
877+@@ -229,8 +229,8 @@
878+ ifneq ($(ENABLE_BUILD_WITH_CXX),yes)
879+ COMPILER = $(CC)
880+ COMPILER_FLAGS = $(CFLAGS)
881+-LINKER = $(CC)
882+-LINKER_FLAGS = $(CFLAGS)
883++LINKER = $(CXX)
884++LINKER_FLAGS = $(CXXFLAGS)
885+ else
886+ COMPILER = $(CXX)
887+ COMPILER_FLAGS = $(CXXFLAGS)
888+
889
890=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib-defaults.patch'
891--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib-defaults.patch 1970-01-01 00:00:00 +0000
892+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib-defaults.patch 2012-10-18 05:18:20 +0000
893@@ -0,0 +1,12 @@
894+diff -Naru a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
895+--- a/gcc/config/arm/linux-elf.h 2012-05-10 09:35:16.834673203 +0800
896++++ b/gcc/config/arm/linux-elf.h 2012-05-11 16:48:48.243398951 +0800
897+@@ -48,7 +48,7 @@
898+
899+ #undef MULTILIB_DEFAULTS
900+ #define MULTILIB_DEFAULTS \
901+- { "marm", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
902++ { "mthumb", "mlittle-endian", "mfloat-abi=hard", "mno-thumb-interwork" }
903+
904+ /* Now we define the strings used to build the spec file. */
905+ #undef LIB_SPEC
906
907=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib.patch'
908--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib.patch 1970-01-01 00:00:00 +0000
909+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilib.patch 2012-10-18 05:18:20 +0000
910@@ -0,0 +1,46 @@
911+diff -Naru a/gcc/config/arm/t-mlibs b/gcc/config/arm/t-mlibs
912+--- a/gcc/config/arm/t-mlibs 1970-01-01 08:00:00.000000000 +0800
913++++ b/gcc/config/arm/t-mlibs 2012-05-10 13:45:23.642306042 +0800
914+@@ -0,0 +1,21 @@
915++# A set of predefined MULTILIB for different ARM targets.
916++# Through the configure option --with-multilib-list, user can customize the
917++# final MULTILIB implementation.
918++
919++comma := ,
920++space :=
921++space +=
922++
923++MULTILIB_OPTIONS = marm
924++MULTILIB_DIRNAMES = arm
925++MULTILIB_OPTIONS += march=armv4t
926++MULTILIB_DIRNAMES += armv4t
927++MULTILIB_OPTIONS += mfloat-abi=soft
928++MULTILIB_DIRNAMES += soft
929++
930++MULTILIB_EXCEPTIONS =
931++
932++MULTILIB_REQUIRED = marm/march=armv4t/mfloat-abi=soft
933++
934++MULTILIB_OSDIRNAMES = marm/march.armv4t/mfloat-abi.soft=!arm-linux-gnueabi
935++
936+diff -Naru a/gcc/config.gcc b/gcc/config.gcc
937+--- a/gcc/config.gcc 2012-05-10 09:34:54.444323884 +0800
938++++ b/gcc/config.gcc 2012-05-10 09:38:46.234101983 +0800
939+@@ -844,7 +844,7 @@
940+ case ${target} in
941+ arm*-*-linux-*eabi)
942+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
943+- tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
944++ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi arm/t-mlibs"
945+ # Define multilib configuration for arm-linux-androideabi.
946+ case ${target} in
947+ *-androideabi)
948+@@ -901,7 +901,7 @@
949+ case ${target} in
950+ arm*-*-eabi*)
951+ tm_file="$tm_file newlib-stdint.h"
952+- tmake_file="${tmake_file} arm/t-bpabi"
953++ tmake_file="${tmake_file} arm/t-bpabi arm/t-mlibs"
954+ use_gcc_stdint=wrap
955+ ;;
956+ arm*-*-rtemseabi*)
957
958=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilibwithmultiarch.patch'
959--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilibwithmultiarch.patch 1970-01-01 00:00:00 +0000
960+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/multilibwithmultiarch.patch 2012-10-18 05:18:20 +0000
961@@ -0,0 +1,133 @@
962+diff -Naru a/gcc/gcc.c b/gcc/gcc.c
963+--- a/gcc/gcc.c 2012-05-10 09:36:27.244857999 +0800
964++++ b/gcc/gcc.c 2012-05-11 10:45:59.293400990 +0800
965+@@ -2154,16 +2154,6 @@
966+ break;
967+ }
968+
969+- /* Now try the multiarch path. */
970+- if (!skip_multi_dir
971+- && !pl->require_machine_suffix && multiarch_dir)
972+- {
973+- memcpy (path + len, multiarch_suffix, multiarch_len + 1);
974+- ret = callback (path, callback_info);
975+- if (ret)
976+- break;
977+- }
978+-
979+ /* Now try the base path. */
980+ if (!pl->require_machine_suffix
981+ && !(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
982+@@ -2191,6 +2181,16 @@
983+ if (ret)
984+ break;
985+ }
986++
987++ /* Now try the multiarch path. */
988++ if (!skip_multi_dir
989++ && !pl->require_machine_suffix && multiarch_dir)
990++ {
991++ memcpy (path + len, multiarch_suffix, multiarch_len + 1);
992++ ret = callback (path, callback_info);
993++ if (ret)
994++ break;
995++ }
996+ }
997+ if (pl)
998+ break;
999+@@ -7528,6 +7528,20 @@
1000+ ++p;
1001+ }
1002+
1003++ if (first)
1004++ {
1005++ if (this_path_len > 3
1006++ && this_path[0] == '.'
1007++ && this_path[1] == ':'
1008++ && this_path[2] == ':')
1009++ {
1010++ char *new_multiarch_dir = XNEWVEC (char, this_path_len + 1);
1011++
1012++ strncpy (new_multiarch_dir, this_path, this_path_len);
1013++ new_multiarch_dir[this_path_len] = '\0';
1014++ multiarch_dir = &new_multiarch_dir[3];
1015++ }
1016++ }
1017+ if (ok && first)
1018+ {
1019+ if (this_path_len != 1
1020+diff -Naru a/gcc/incpath.c b/gcc/incpath.c
1021+--- a/gcc/incpath.c 2012-05-10 09:35:14.395349562 +0800
1022++++ b/gcc/incpath.c 2012-05-11 11:00:08.813405495 +0800
1023+@@ -132,7 +132,6 @@
1024+ const struct default_include *p;
1025+ int relocated = cpp_relocated();
1026+ size_t len;
1027+-
1028+ if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
1029+ {
1030+ /* Look for directories that start with the standard prefix.
1031+@@ -150,15 +149,20 @@
1032+ if (!filename_ncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
1033+ {
1034+ char *str = concat (iprefix, p->fname + len, NULL);
1035+- if (p->multilib == 1 && imultilib)
1036+- str = concat (str, dir_separator_str, imultilib, NULL);
1037+- else if (p->multilib == 2)
1038++ if (p->multilib && imultilib)
1039++ {
1040++ str = concat (str, dir_separator_str, imultilib, NULL);
1041++ add_path (str, SYSTEM, p->cxx_aware, false);
1042++ }
1043++ else
1044++ add_path (str, SYSTEM, p->cxx_aware, false);
1045++
1046++ if (p->multilib && imultiarch)
1047+ {
1048+- if (!imultiarch)
1049+- continue;
1050++ char *str = concat (iprefix, p->fname + len, NULL);
1051+ str = concat (str, dir_separator_str, imultiarch, NULL);
1052++ add_path (str, SYSTEM, p->cxx_aware, false);
1053+ }
1054+- add_path (str, SYSTEM, p->cxx_aware, false);
1055+ }
1056+ }
1057+ }
1058+@@ -168,7 +172,7 @@
1059+ {
1060+ if (!p->cplusplus || cxx_stdinc)
1061+ {
1062+- char *str;
1063++ char *str, *str2;
1064+
1065+ /* Should this directory start with the sysroot? */
1066+ if (sysroot && p->add_sysroot)
1067+@@ -209,16 +213,20 @@
1068+ else
1069+ str = update_path (p->fname, p->component);
1070+
1071+- if (p->multilib == 1 && imultilib)
1072+- str = concat (str, dir_separator_str, imultilib, NULL);
1073+- else if (p->multilib == 2)
1074++ str2 = xstrdup(str);
1075++ if (p->multilib && imultilib)
1076+ {
1077+- if (!imultiarch)
1078+- continue;
1079+- str = concat (str, dir_separator_str, imultiarch, NULL);
1080++ str = concat (str, dir_separator_str, imultilib, NULL);
1081++ add_path (str, SYSTEM, p->cxx_aware, false);
1082+ }
1083++ else
1084++ add_path (str, SYSTEM, p->cxx_aware, false);
1085+
1086+- add_path (str, SYSTEM, p->cxx_aware, false);
1087++ if (p->multilib && imultiarch)
1088++ {
1089++ str2 = concat (str2, dir_separator_str, imultiarch, NULL);
1090++ add_path (str2, SYSTEM, p->cxx_aware, false);
1091++ }
1092+ }
1093+ }
1094+ }
1095
1096=== added file 'contrib/linaro/patches/gcc/linaro-4.7+bzr115029/triplet.patch'
1097--- contrib/linaro/patches/gcc/linaro-4.7+bzr115029/triplet.patch 1970-01-01 00:00:00 +0000
1098+++ contrib/linaro/patches/gcc/linaro-4.7+bzr115029/triplet.patch 2012-10-18 05:18:20 +0000
1099@@ -0,0 +1,91 @@
1100+=== modified file 'ChangeLog.linaro'
1101+=== modified file 'gcc/ada/gcc-interface/Makefile.in'
1102+--- a/gcc/ada/gcc-interface/Makefile.in 2012-02-24 16:17:01 +0000
1103++++ b/gcc/ada/gcc-interface/Makefile.in 2012-05-14 03:26:00 +0000
1104+@@ -1869,7 +1869,7 @@
1105+ LIBRARY_VERSION := $(LIB_VERSION)
1106+ endif
1107+
1108+-ifeq ($(strip $(filter-out arm% linux-gnueabi,$(arch) $(osys)-$(word 4,$(targ)))),)
1109++ifeq ($(strip $(filter-out arm% linux-gnueabi%,$(arch) $(osys)-$(word 4,$(targ)))),)
1110+ LIBGNAT_TARGET_PAIRS = \
1111+ a-intnam.ads<a-intnam-linux.ads \
1112+ s-inmaop.adb<s-inmaop-posix.adb \
1113+
1114+=== modified file 'gcc/config.gcc'
1115+--- a/gcc/config.gcc 2012-04-02 13:36:04 +0000
1116++++ b/gcc/config.gcc 2012-05-14 03:26:00 +0000
1117+@@ -842,7 +842,7 @@
1118+ esac
1119+ tmake_file="${tmake_file} arm/t-arm"
1120+ case ${target} in
1121+- arm*-*-linux-*eabi)
1122++ arm*-*-linux-*eabi*)
1123+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
1124+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi arm/t-mlibs"
1125+ # Define multilib configuration for arm-linux-androideabi.
1126+@@ -851,6 +851,11 @@
1127+ tmake_file="$tmake_file arm/t-linux-androideabi"
1128+ ;;
1129+ esac
1130++ case ${target} in
1131++ arm*-*-*eabihf)
1132++ with_float=${with_float:-hard}
1133++ ;;
1134++ esac
1135+ # The BPABI long long divmod functions return a 128-bit value in
1136+ # registers r0-r3. Correctly modeling that requires the use of
1137+ # TImode.
1138+
1139+=== modified file 'libgcc/config.host'
1140+--- a/libgcc/config.host 2012-02-20 21:19:55 +0000
1141++++ b/libgcc/config.host 2012-05-14 03:26:01 +0000
1142+@@ -327,7 +327,7 @@
1143+ arm*-*-linux*) # ARM GNU/Linux with ELF
1144+ tmake_file="${tmake_file} arm/t-arm t-fixedpoint-gnu-prefix"
1145+ case ${host} in
1146+- arm*-*-linux-*eabi)
1147++ arm*-*-linux-*eabi*)
1148+ tmake_file="${tmake_file} arm/t-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
1149+ tm_file="$tm_file arm/bpabi-lib.h"
1150+ unwind_header=config/arm/unwind-arm.h
1151+
1152+=== modified file 'libjava/configure'
1153+--- a/libjava/configure 2012-02-24 15:21:12 +0000
1154++++ b/libjava/configure 2012-05-14 03:26:01 +0000
1155+@@ -20542,7 +20542,7 @@
1156+ # on Darwin -single_module speeds up loading of the dynamic libraries.
1157+ extra_ldflags_libjava=-Wl,-single_module
1158+ ;;
1159+-arm*linux*eabi)
1160++arm*linux*eabi*)
1161+ # Some of the ARM unwinder code is actually in libstdc++. We
1162+ # could in principle replicate it in libgcj, but it's better to
1163+ # have a dependency on libstdc++.
1164+
1165+=== modified file 'libjava/configure.ac'
1166+--- a/libjava/configure.ac 2012-02-24 15:21:12 +0000
1167++++ b/libjava/configure.ac 2012-05-14 03:26:01 +0000
1168+@@ -931,7 +931,7 @@
1169+ # on Darwin -single_module speeds up loading of the dynamic libraries.
1170+ extra_ldflags_libjava=-Wl,-single_module
1171+ ;;
1172+-arm*linux*eabi)
1173++arm*linux*eabi*)
1174+ # Some of the ARM unwinder code is actually in libstdc++. We
1175+ # could in principle replicate it in libgcj, but it's better to
1176+ # have a dependency on libstdc++.
1177+
1178+=== modified file 'libstdc++-v3/configure.host'
1179+--- a/libstdc++-v3/configure.host 2012-02-10 18:10:12 +0000
1180++++ b/libstdc++-v3/configure.host 2012-05-14 03:26:01 +0000
1181+@@ -340,7 +340,7 @@
1182+ fi
1183+ esac
1184+ case "${host}" in
1185+- arm*-*-linux-*eabi)
1186++ arm*-*-linux-*eabi*)
1187+ port_specific_symbol_files="\$(srcdir)/../config/os/gnu-linux/arm-eabi-extra.ver"
1188+ ;;
1189+ esac
1190+
1191
1192=== modified file 'contrib/linaro/update-aarch64.sh'
1193--- contrib/linaro/update-aarch64.sh 2012-10-03 00:11:01 +0000
1194+++ contrib/linaro/update-aarch64.sh 2012-10-18 05:18:20 +0000
1195@@ -56,27 +56,42 @@
1196 $invoke ls "~/snapshots" | sort > snapshots.txt
1197
1198 binutils_latest=$(latest binutils-2.24~)
1199+gcc_latest=$(latest gcc-arm-aarch64-4.7+svn)
1200+newlib_latest=$(latest newlib-1.21~)
1201+gdb_latest=$(latest gdb-7.6~)
1202+eglibc_latest=$(latest eglibc-2.16+svn)
1203+ports_latest=$(latest eglibc-ports-2.16+svn)
1204+
1205+# HACK: override to match OpenEmbedded
1206+binutils_latest="binutils-2.24~20120920+gitb05c76f"
1207+gcc_latest="gcc-arm-aarch64-4.7+svn191987"
1208+eglibc_latest="eglibc-2.16+svn20393"
1209+ports_latest="eglibc-ports-2.16+svn20393"
1210+
1211 binutils_version=$(get_version $binutils_latest)
1212-gcc_latest=$(latest gcc-arm-aarch64-4.7+svn)
1213 gcc_version=$(get_version $gcc_latest)
1214-newlib_latest=$(latest newlib-1.21~)
1215 newlib_version=$(get_version $newlib_latest)
1216-gdb_latest=$(latest gdb-7.6~)
1217 gdb_version=$(get_version $gdb_latest)
1218+eglibc_version=$(get_version $eglibc_latest)
1219+ports_version=$(get_version $ports_latest)
1220
1221 # Make tarballs of each
1222 make_tarball $binutils_latest
1223 make_tarball $gcc_latest
1224 make_tarball $newlib_latest
1225 make_tarball $gdb_latest
1226+make_tarball $eglibc_latest
1227+make_tarball $ports_latest
1228
1229 # Update the config files
1230 sed -i -r "s#arm-aarch64-4[^ \"]*#$gcc_version#" config/cc/gcc.in
1231 sed -i -r "s#2\.24~[^ \"]*#$binutils_version#" config/binutils/binutils.in
1232 sed -i -r "s#1\.21~[^ \"]*#$newlib_version#" config/libc/newlib.in
1233 sed -i -r "s#7\.6~[^ \"]*#$gdb_version#" config/debug/gdb.in
1234+sed -i -r "s#2\.16+[^ \"]*#$eglibc_version#" config/libc/eglibc.in
1235
1236 move_patches gcc arm-aarch64 $gcc_version
1237 move_patches binutils 2.24~ $binutils_version
1238 move_patches newlib 1.21~ $newlib_version
1239 move_patches gdb 7.3~ $gdb_version
1240+move_patches eglibc ports-2_16+ $ports_version
1241
1242=== modified file 'samples/linaro-aarch64-linux-gnu/crosstool.config'
1243--- samples/linaro-aarch64-linux-gnu/crosstool.config 2012-10-15 02:35:12 +0000
1244+++ samples/linaro-aarch64-linux-gnu/crosstool.config 2012-10-18 05:18:20 +0000
1245@@ -1,7 +1,7 @@
1246 #
1247 # Automatically generated make config: don't edit
1248 # crosstool-NG linaro-1.13.1+bzr2485 Configuration
1249-# Mon Oct 15 15:32:00 2012
1250+# Thu Oct 18 18:05:37 2012
1251 #
1252 CT_CONFIGURE_has_xzutils=y
1253 CT_CONFIGURE_has_cvs=y
1254@@ -251,7 +251,7 @@
1255 # CT_BINUTILS_V_2_18a is not set
1256 # CT_BINUTILS_V_2_17a is not set
1257 # CT_BINUTILS_V_2_16_1a is not set
1258-CT_BINUTILS_VERSION="2.24~20120920+gitb05c76f"
1259+CT_BINUTILS_VERSION="2.24~20121016+git142208f"
1260 CT_BINUTILS_2_22_or_later=y
1261 CT_BINUTILS_2_21_or_later=y
1262 CT_BINUTILS_2_20_or_later=y
1263@@ -277,10 +277,11 @@
1264 # C compiler
1265 #
1266 CT_CC="gcc"
1267-CT_CC_VERSION="linaro-4.7-2012.10"
1268+CT_CC_VERSION="linaro-4.7+bzr115029"
1269 CT_CC_gcc=y
1270 CT_CC_GCC_SHOW_LINARO=y
1271-CT_CC_V_linaro_4_7_2012_10=y
1272+# CT_CC_V_linaro_4_7_2012_10 is not set
1273+CT_CC_V_linaro_4_7_TIP=y
1274 # CT_CC_V_arm_aarch64_4_7_PRE is not set
1275 # CT_CC_V_4_7_0 is not set
1276 # CT_CC_V_4_6_2 is not set
1277
1278=== modified file 'samples/linaro-aarch64-none-elf/crosstool.config'
1279--- samples/linaro-aarch64-none-elf/crosstool.config 2012-10-15 02:35:12 +0000
1280+++ samples/linaro-aarch64-none-elf/crosstool.config 2012-10-18 05:18:20 +0000
1281@@ -1,7 +1,7 @@
1282 #
1283 # Automatically generated make config: don't edit
1284 # crosstool-NG linaro-1.13.1+bzr2485 Configuration
1285-# Mon Oct 15 15:32:35 2012
1286+# Thu Oct 18 18:14:06 2012
1287 #
1288 CT_CONFIGURE_has_xzutils=y
1289 CT_CONFIGURE_has_cvs=y
1290@@ -223,7 +223,7 @@
1291 # CT_BINUTILS_V_2_18a is not set
1292 # CT_BINUTILS_V_2_17a is not set
1293 # CT_BINUTILS_V_2_16_1a is not set
1294-CT_BINUTILS_VERSION="2.24~20120920+gitb05c76f"
1295+CT_BINUTILS_VERSION="2.24~20121016+git142208f"
1296 CT_BINUTILS_2_22_or_later=y
1297 CT_BINUTILS_2_21_or_later=y
1298 CT_BINUTILS_2_20_or_later=y
1299@@ -247,10 +247,11 @@
1300 # C compiler
1301 #
1302 CT_CC="gcc"
1303-CT_CC_VERSION="linaro-4.7-2012.10"
1304+CT_CC_VERSION="linaro-4.7+bzr115029"
1305 CT_CC_gcc=y
1306 CT_CC_GCC_SHOW_LINARO=y
1307-CT_CC_V_linaro_4_7_2012_10=y
1308+# CT_CC_V_linaro_4_7_2012_10 is not set
1309+CT_CC_V_linaro_4_7_TIP=y
1310 # CT_CC_V_arm_aarch64_4_7_PRE is not set
1311 # CT_CC_V_4_7_0 is not set
1312 # CT_CC_V_4_6_2 is not set

Subscribers

People subscribed via source and target branches