summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:42:49 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:42:49 +0200
commit635d320abfa6dc3c0e1d00e3ceae567dd0e55a5b (patch)
treedcd42fafb9189d3be13ef3d95f9ce6f4f5cfa267 /recipes-devtools
downloadmeta-hierofalcon-635d320abfa6dc3c0e1d00e3ceae567dd0e55a5b.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/binutils/binutils-cross-canadian_linaro-2.25.bb3
-rw-r--r--recipes-devtools/binutils/binutils-cross_linaro-2.25.bb3
-rw-r--r--recipes-devtools/binutils/binutils-crosssdk_linaro-2.25.bb13
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25.inc38
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/0001-AArch64-Define-LP64-BE-linker-name.patch18
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch31
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-armv5e.patch25
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-poison.patch279
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-100-uclibc-conf.patch40
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-001_ld_makefile_patch.patch55
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-006_better_file_error.patch45
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-012_check_ldrunpath_length.patch49
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-gas-needs-libm.patch38
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/libiberty_path_fix.patch22
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/libtool-rpath-fix.patch39
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/relocatable_sdk.patch49
-rw-r--r--recipes-devtools/binutils/binutils-linaro-2.25/replace_macros_with_static_inline.patch188
-rw-r--r--recipes-devtools/binutils/binutils_linaro-2.25.bb41
18 files changed, 976 insertions, 0 deletions
diff --git a/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.25.bb b/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.25.bb
new file mode 100644
index 0000000..76b6277
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-cross-canadian_linaro-2.25.bb
@@ -0,0 +1,3 @@
1require recipes-devtools/binutils/binutils.inc
2require recipes-devtools/binutils/binutils-${PV}.inc
3require recipes-devtools/binutils/binutils-cross-canadian.inc
diff --git a/recipes-devtools/binutils/binutils-cross_linaro-2.25.bb b/recipes-devtools/binutils/binutils-cross_linaro-2.25.bb
new file mode 100644
index 0000000..a8b918e
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-cross_linaro-2.25.bb
@@ -0,0 +1,3 @@
1require recipes-devtools/binutils/binutils.inc
2require recipes-devtools/binutils/binutils-${PV}.inc
3require recipes-devtools/binutils/binutils-cross.inc
diff --git a/recipes-devtools/binutils/binutils-crosssdk_linaro-2.25.bb b/recipes-devtools/binutils/binutils-crosssdk_linaro-2.25.bb
new file mode 100644
index 0000000..1c62ed4
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-crosssdk_linaro-2.25.bb
@@ -0,0 +1,13 @@
1require recipes-devtools/binutils/binutils-cross_${PV}.bb
2
3inherit crosssdk
4
5PN = "binutils-crosssdk-${TARGET_ARCH}"
6
7PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk"
8
9SRC_URI += "file://relocatable_sdk.patch"
10
11do_configure_prepend () {
12 sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt
13}
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25.inc b/recipes-devtools/binutils/binutils-linaro-2.25.inc
new file mode 100644
index 0000000..045e1b5
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25.inc
@@ -0,0 +1,38 @@
1BPV = "2.25.0"
2MMYY = "15.01"
3RELEASE = "20${MMYY}"
4LINARORELEASE = "20${MMYY}-2"
5PR = "r${RELEASE}"
6
7LIC_FILES_CHKSUM="\
8 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
9 file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
11 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
12 file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
13 file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
14 file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
15 file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
16 file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
17 "
18
19SRC_URI = "\
20 http://releases.linaro.org/${MMYY}/components/toolchain/binutils-linaro/binutils-linaro-${BPV}-${LINARORELEASE}.tar.xz \
21 file://binutils-uclibc-100-uclibc-conf.patch \
22 file://binutils-uclibc-300-001_ld_makefile_patch.patch \
23 file://binutils-uclibc-300-006_better_file_error.patch \
24 file://binutils-uclibc-300-012_check_ldrunpath_length.patch \
25 file://binutils-uclibc-gas-needs-libm.patch \
26 file://libiberty_path_fix.patch \
27 file://binutils-poison.patch \
28 file://libtool-rpath-fix.patch \
29 file://binutils-armv5e.patch \
30 file://replace_macros_with_static_inline.patch;apply=no \
31 file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch;apply=no \
32 file://0001-AArch64-Define-LP64-BE-linker-name.patch \
33 "
34
35SRC_URI[md5sum] = "5c4b97c60f8bf624a34e2acef3138eec"
36SRC_URI[sha256sum] = "aed2aef13926911923b47a71ee88dc0943d544718d91f8caee5fc48fd20ef3a7"
37
38S = "${WORKDIR}/binutils-linaro-${BPV}-${LINARORELEASE}"
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/0001-AArch64-Define-LP64-BE-linker-name.patch b/recipes-devtools/binutils/binutils-linaro-2.25/0001-AArch64-Define-LP64-BE-linker-name.patch
new file mode 100644
index 0000000..7e4923c
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/0001-AArch64-Define-LP64-BE-linker-name.patch
@@ -0,0 +1,18 @@
1From 5a4f233680ecf1132591f8213ff1cc6a2535b1b7 Mon Sep 17 00:00:00 2001
2From: Marcus Shawcroft <marcus.shawcroft@arm.com>
3Date: Mon, 20 Jan 2014 18:20:04 +0000
4Subject: [PATCH] [AArch64] Define LP64 BE linker name.
5
6---
7 ld/ChangeLog | 4 ++++
8 ld/emulparams/aarch64linuxb.sh | 1 +
9 2 files changed, 5 insertions(+)
10
11Index: binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh
12===================================================================
13--- binutils-linaro-2.24-2014.03.orig/ld/emulparams/aarch64linuxb.sh
14+++ binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh
15@@ -1,2 +1,3 @@
16 . ${srcdir}/emulparams/aarch64linux.sh
17 OUTPUT_FORMAT="elf64-bigaarch64"
18+ELF_INTERPRETER_NAME=\"/lib/ld-linux-aarch64_be.so.1\"
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch b/recipes-devtools/binutils/binutils-linaro-2.25/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch
new file mode 100644
index 0000000..f786b17
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Backport
2
3From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001
4From: Hans-Peter Nilsson <hp@bitrange.com>
5Date: Sat, 1 Feb 2014 01:11:28 +0100
6Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change.
7
8 * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in
9 call to bfd_set_section_vma exposed by recent bfd_set_section_vma
10 change.
11---
12 ld/ChangeLog | 6 ++++++
13 ld/emultempl/mmix-elfnmmo.em | 2 +-
14 2 files changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em
17index 0059792..5e9781a 100644
18--- a/ld/emultempl/mmix-elfnmmo.em
19+++ b/ld/emultempl/mmix-elfnmmo.em
20@@ -102,7 +102,7 @@ mmix_after_allocation (void)
21 This section is only present when there are register symbols. */
22 sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME);
23 if (sec != NULL)
24- bfd_set_section_vma (abfd, sec, 0);
25+ bfd_set_section_vma (sec->owner, sec, 0);
26
27 if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info))
28 {
29--
301.7.10.4
31
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-armv5e.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-armv5e.patch
new file mode 100644
index 0000000..97ad6df
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-armv5e.patch
@@ -0,0 +1,25 @@
1Add the armv5e architecture to binutils
2
3Binutils has a comment that indicates it is supposed to match gcc for all of
4the support "-march=" settings, but it was lacking the armv5e setting. This
5was a simple way to add it, as thumb instructions shouldn't be generated by
6the compiler anyway.
7
8Upstream-Status: Denied
9Upstream maintainer indicated that we should not be using armv5e, even though
10it is a legal archicture defined by our gcc.
11
12Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
13
14Index: binutils-2.22.90/gas/config/tc-arm.c
15===================================================================
16--- binutils-2.22.90.orig/gas/config/tc-arm.c 2012-07-24 09:38:32.000000000 -0700
17+++ binutils-2.22.90/gas/config/tc-arm.c 2012-08-07 23:41:59.822564075 -0700
18@@ -23162,6 +23162,7 @@
19 ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
20 ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
21 ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
22+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP),
23 ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP),
24 ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
25 ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-poison.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-poison.patch
new file mode 100644
index 0000000..814a4a3
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-poison.patch
@@ -0,0 +1,279 @@
1From d5b58a44afcafd3c6ec1c9c69facbb2c17bc2b69 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen.kooi@linaro.org>
3Date: Wed, 7 Jan 2015 09:46:35 +0100
4Subject: [PATCH] Warn for uses of system directories when cross linking
5
6Upstream-Status: Inappropriate [distribution: codesourcery]
7
8Patch originally created by Mark Hatle, forward-ported to
9binutils 2.21 by Scott Garman and forward ported to binutils 2.25 by Koen Kooi.
10
11purpose: warn for uses of system directories when cross linking
12
13Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
14
152008-07-02 Joseph Myers <joseph@codesourcery.com>
16
17 ld/
18 * ld.h (args_type): Add error_poison_system_directories.
19 * ld.texinfo (--error-poison-system-directories): Document.
20 * ldfile.c (ldfile_add_library_path): Check
21 command_line.error_poison_system_directories.
22 * ldmain.c (main): Initialize
23 command_line.error_poison_system_directories.
24 * lexsup.c (enum option_values): Add
25 OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
26 (ld_options): Add --error-poison-system-directories.
27 (parse_args): Handle new option.
28
292007-06-13 Joseph Myers <joseph@codesourcery.com>
30
31 ld/
32 * config.in: Regenerate.
33 * ld.h (args_type): Add poison_system_directories.
34 * ld.texinfo (--no-poison-system-directories): Document.
35 * ldfile.c (ldfile_add_library_path): Check
36 command_line.poison_system_directories.
37 * ldmain.c (main): Initialize
38 command_line.poison_system_directories.
39 * lexsup.c (enum option_values): Add
40 OPTION_NO_POISON_SYSTEM_DIRECTORIES.
41 (ld_options): Add --no-poison-system-directories.
42 (parse_args): Handle new option.
43
442007-04-20 Joseph Myers <joseph@codesourcery.com>
45
46 Merge from Sourcery G++ binutils 2.17:
47
48 2007-03-20 Joseph Myers <joseph@codesourcery.com>
49 Based on patch by Mark Hatle <mark.hatle@windriver.com>.
50 ld/
51 * configure.in (--enable-poison-system-directories): New option.
52 * configure, config.in: Regenerate.
53 * ldfile.c (ldfile_add_library_path): If
54 ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
55 /usr/lib, /usr/local/lib or /usr/X11R6/lib.
56
57Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
58Signed-off-by: Scott Garman <scott.a.garman@intel.com>
59Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
60---
61 ld/config.in | 3 +++
62 ld/configure | 14 ++++++++++++++
63 ld/configure.ac | 10 ++++++++++
64 ld/ld.h | 8 ++++++++
65 ld/ld.texinfo | 12 ++++++++++++
66 ld/ldfile.c | 17 +++++++++++++++++
67 ld/ldlex.h | 2 ++
68 ld/ldmain.c | 2 ++
69 ld/lexsup.c | 16 ++++++++++++++++
70 9 files changed, 84 insertions(+)
71
72diff --git a/ld/config.in b/ld/config.in
73index 2ab4844..766d23c 100644
74--- a/ld/config.in
75+++ b/ld/config.in
76@@ -11,6 +11,9 @@
77 language is requested. */
78 #undef ENABLE_NLS
79
80+/* Define to warn for use of native system library directories */
81+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
82+
83 /* Additional extension a shared object might have. */
84 #undef EXTRA_SHLIB_EXTENSION
85
86diff --git a/ld/configure b/ld/configure
87index 4408b0d..c0dfa53 100755
88--- a/ld/configure
89+++ b/ld/configure
90@@ -783,6 +783,7 @@ with_lib_path
91 enable_targets
92 enable_64_bit_bfd
93 with_sysroot
94+enable_poison_system_directories
95 enable_gold
96 enable_got
97 enable_werror
98@@ -1439,6 +1440,8 @@ Optional Features:
99 --disable-largefile omit support for large files
100 --enable-targets alternative target configurations
101 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
102+ --enable-poison-system-directories
103+ warn for use of native system library directories
104 --enable-gold[=ARG] build gold [ARG={default,yes,no}]
105 --enable-got=<type> GOT handling scheme (target, single, negative,
106 multigot)
107@@ -15487,7 +15490,18 @@ else
108 fi
109
110
111+# Check whether --enable-poison-system-directories was given.
112+if test "${enable_poison_system_directories+set}" = set; then :
113+ enableval=$enable_poison_system_directories;
114+else
115+ enable_poison_system_directories=no
116+fi
117+
118+if test "x${enable_poison_system_directories}" = "xyes"; then
119
120+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
121+
122+fi
123
124 # Check whether --enable-got was given.
125 if test "${enable_got+set}" = set; then :
126diff --git a/ld/configure.ac b/ld/configure.ac
127index 1bddfc9..e9edb7f 100644
128--- a/ld/configure.ac
129+++ b/ld/configure.ac
130@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot)
131 AC_SUBST(TARGET_SYSTEM_ROOT)
132 AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
133
134+AC_ARG_ENABLE([poison-system-directories],
135+ AS_HELP_STRING([--enable-poison-system-directories],
136+ [warn for use of native system library directories]),,
137+ [enable_poison_system_directories=no])
138+if test "x${enable_poison_system_directories}" = "xyes"; then
139+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
140+ [1],
141+ [Define to warn for use of native system library directories])
142+fi
143+
144 dnl Use --enable-gold to decide if this linker should be the default.
145 dnl "install_as_default" is set to false if gold is the default linker.
146 dnl "installed_linker" is the installed BFD linker name.
147diff --git a/ld/ld.h b/ld/ld.h
148index f773ce7..adba0f6 100644
149--- a/ld/ld.h
150+++ b/ld/ld.h
151@@ -161,6 +161,14 @@ typedef struct {
152 /* If TRUE we'll just print the default output on stdout. */
153 bfd_boolean print_output_format;
154
155+ /* If TRUE (the default) warn for uses of system directories when
156+ cross linking. */
157+ bfd_boolean poison_system_directories;
158+
159+ /* If TRUE (default FALSE) give an error for uses of system
160+ directories when cross linking instead of a warning. */
161+ bfd_boolean error_poison_system_directories;
162+
163 /* Big or little endian as set on command line. */
164 enum endian_enum endian;
165
166diff --git a/ld/ld.texinfo b/ld/ld.texinfo
167index 502582c..dae168a 100644
168--- a/ld/ld.texinfo
169+++ b/ld/ld.texinfo
170@@ -2212,6 +2212,18 @@ string identifying the original linked file does not change.
171
172 Passing @code{none} for @var{style} disables the setting from any
173 @code{--build-id} options earlier on the command line.
174+
175+@kindex --no-poison-system-directories
176+@item --no-poison-system-directories
177+Do not warn for @option{-L} options using system directories such as
178+@file{/usr/lib} when cross linking. This option is intended for use
179+in chroot environments when such directories contain the correct
180+libraries for the target system rather than the host.
181+
182+@kindex --error-poison-system-directories
183+@item --error-poison-system-directories
184+Give an error instead of a warning for @option{-L} options using
185+system directories when cross linking.
186 @end table
187
188 @c man end
189diff --git a/ld/ldfile.c b/ld/ldfile.c
190index 782ed7f..19a9ab4 100644
191--- a/ld/ldfile.c
192+++ b/ld/ldfile.c
193@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline)
194 new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
195 else
196 new_dirs->name = xstrdup (name);
197+
198+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
199+ if (command_line.poison_system_directories
200+ && ((!strncmp (name, "/lib", 4))
201+ || (!strncmp (name, "/usr/lib", 8))
202+ || (!strncmp (name, "/usr/local/lib", 14))
203+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
204+ {
205+ if (command_line.error_poison_system_directories)
206+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
207+ "cross-compilation\n"), name);
208+ else
209+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
210+ "cross-compilation\n"), name);
211+ }
212+#endif
213+
214 }
215
216 /* Try to open a BFD for a lang_input_statement. */
217diff --git a/ld/ldlex.h b/ld/ldlex.h
218index e3e9b24..29487a3 100644
219--- a/ld/ldlex.h
220+++ b/ld/ldlex.h
221@@ -140,6 +140,8 @@ enum option_values
222 OPTION_IGNORE_UNRESOLVED_SYMBOL,
223 OPTION_PUSH_STATE,
224 OPTION_POP_STATE,
225+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
226+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
227 };
228
229 /* The initial parser states. */
230diff --git a/ld/ldmain.c b/ld/ldmain.c
231index bc24957..396c4a0 100644
232--- a/ld/ldmain.c
233+++ b/ld/ldmain.c
234@@ -266,6 +266,8 @@ main (int argc, char **argv)
235 command_line.warn_mismatch = TRUE;
236 command_line.warn_search_mismatch = TRUE;
237 command_line.check_section_addresses = -1;
238+ command_line.poison_system_directories = TRUE;
239+ command_line.error_poison_system_directories = FALSE;
240
241 /* We initialize DEMANGLING based on the environment variable
242 COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
243diff --git a/ld/lexsup.c b/ld/lexsup.c
244index 4812c97..21b49df 100644
245--- a/ld/lexsup.c
246+++ b/ld/lexsup.c
247@@ -513,6 +513,14 @@ static const struct ld_option ld_options[] =
248 { {"pop-state", no_argument, NULL, OPTION_POP_STATE},
249 '\0', NULL, N_("Pop state of flags governing input file handling"),
250 TWO_DASHES },
251+ { {"no-poison-system-directories", no_argument, NULL,
252+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
253+ '\0', NULL, N_("Do not warn for -L options using system directories"),
254+ TWO_DASHES },
255+ { {"error-poison-system-directories", no_argument, NULL,
256+ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
257+ '\0', NULL, N_("Give an error for -L options using system directories"),
258+ TWO_DASHES },
259 };
260
261 #define OPTION_COUNT ARRAY_SIZE (ld_options)
262@@ -1474,6 +1482,14 @@ parse_args (unsigned argc, char **argv)
263 free (oldp);
264 }
265 break;
266+
267+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
268+ command_line.poison_system_directories = FALSE;
269+ break;
270+
271+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
272+ command_line.error_poison_system_directories = TRUE;
273+ break;
274 }
275 }
276
277--
2781.9.3
279
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-100-uclibc-conf.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-100-uclibc-conf.patch
new file mode 100644
index 0000000..b5a25c2
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-100-uclibc-conf.patch
@@ -0,0 +1,40 @@
1Upstream-Status: Pending
2
3Index: binutils-2.22/configure
4===================================================================
5--- binutils-2.22.orig/configure
6+++ binutils-2.22/configure
7@@ -3130,7 +3130,7 @@ case "${target}" in
8 ;;
9 s390-*-* | s390x-*-*)
10 ;;
11- sh-*-* | sh[34]*-*-*)
12+ sh*-*-* | sh[34]*-*-*)
13 ;;
14 sh64-*-* | sh5*-*-*)
15 ;;
16@@ -3570,7 +3570,7 @@ case "${target}" in
17 mips*-*-*)
18 noconfigdirs="$noconfigdirs gprof"
19 ;;
20- sh-*-* | sh64-*-*)
21+ sh*-*-* | sh64-*-*)
22 case "${target}" in
23 sh*-*-elf)
24 ;;
25Index: binutils-2.22/gprof/configure
26===================================================================
27--- binutils-2.22.orig/gprof/configure
28+++ binutils-2.22/gprof/configure
29@@ -6103,6 +6103,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
30 lt_cv_deplibs_check_method=pass_all
31 ;;
32
33+linux-uclibc*)
34+ lt_cv_deplibs_check_method=pass_all
35+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
36+ ;;
37+
38 netbsd*)
39 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
40 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-001_ld_makefile_patch.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000..c6e1efc
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-001_ld_makefile_patch.patch
@@ -0,0 +1,55 @@
1#!/bin/sh -e
2## 001_ld_makefile_patch.dpatch
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Description: correct where ld scripts are installed
6## DP: Author: Chris Chimelis <chris@debian.org>
7## DP: Upstream status: N/A
8## DP: Date: ??
9
10if [ $# -ne 1 ]; then
11 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
12 exit 1
13fi
14
15[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
16patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
17
18case "$1" in
19 -patch) patch $patch_opts -p1 < $0;;
20 -unpatch) patch $patch_opts -p1 -R < $0;;
21 *)
22 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
23 exit 1;;
24esac
25
26exit 0
27Upstream-Status: Inappropriate [debian patch]
28
29@DPATCH@
30Index: binutils-2.22/ld/Makefile.am
31===================================================================
32--- binutils-2.22.orig/ld/Makefile.am
33+++ binutils-2.22/ld/Makefile.am
34@@ -37,7 +37,7 @@ endif
35 # We put the scripts in the directory $(scriptdir)/ldscripts.
36 # We can't put the scripts in $(datadir) because the SEARCH_DIR
37 # directives need to be different for native and cross linkers.
38-scriptdir = $(tooldir)/lib
39+scriptdir = $(libdir)
40
41 EMUL = @EMUL@
42 EMULATION_OFILES = @EMULATION_OFILES@
43Index: binutils-2.22/ld/Makefile.in
44===================================================================
45--- binutils-2.22.orig/ld/Makefile.in
46+++ binutils-2.22/ld/Makefile.in
47@@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
48 # We put the scripts in the directory $(scriptdir)/ldscripts.
49 # We can't put the scripts in $(datadir) because the SEARCH_DIR
50 # directives need to be different for native and cross linkers.
51-scriptdir = $(tooldir)/lib
52+scriptdir = $(libdir)
53 BASEDIR = $(srcdir)/..
54 BFDDIR = $(BASEDIR)/bfd
55 INCDIR = $(BASEDIR)/include
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-006_better_file_error.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-006_better_file_error.patch
new file mode 100644
index 0000000..47bd8ff
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-006_better_file_error.patch
@@ -0,0 +1,45 @@
1#!/bin/sh -e
2## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Specify which filename is causing an error if the filename is a
6## DP: directory. (#45832)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25Upstream-Status: Inappropriate [debian patch]
26
27@DPATCH@
28Index: binutils-2.22/bfd/opncls.c
29===================================================================
30--- binutils-2.22.orig/bfd/opncls.c
31+++ binutils-2.22/bfd/opncls.c
32@@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c
33 {
34 bfd *nbfd;
35 const bfd_target *target_vec;
36+ struct stat s;
37+
38+ if (stat (filename, &s) == 0)
39+ if (S_ISDIR(s.st_mode)) {
40+ bfd_set_error (bfd_error_file_not_recognized);
41+ return NULL;
42+ }
43
44 nbfd = _bfd_new_bfd ();
45 if (nbfd == NULL)
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-012_check_ldrunpath_length.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-012_check_ldrunpath_length.patch
new file mode 100644
index 0000000..d31f80c
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-012_check_ldrunpath_length.patch
@@ -0,0 +1,49 @@
1#!/bin/sh -e
2## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
6## DP: cases where -rpath isn't specified. (#151024)
7
8if [ $# -ne 1 ]; then
9 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
10 exit 1
11fi
12
13[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
14patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
15
16case "$1" in
17 -patch) patch $patch_opts -p1 < $0;;
18 -unpatch) patch $patch_opts -p1 -R < $0;;
19 *)
20 echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
21 exit 1;;
22esac
23
24exit 0
25Upstream-Status: Inappropriate [debian patch]
26
27@DPATCH@
28Index: binutils-2.22/ld/emultempl/elf32.em
29===================================================================
30--- binutils-2.22.orig/ld/emultempl/elf32.em
31+++ binutils-2.22/ld/emultempl/elf32.em
32@@ -1273,6 +1273,8 @@ fragment <<EOF
33 && command_line.rpath == NULL)
34 {
35 lib_path = (const char *) getenv ("LD_RUN_PATH");
36+ if ((lib_path) && (strlen (lib_path) == 0))
37+ lib_path = NULL;
38 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
39 force))
40 break;
41@@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation (
42 rpath = command_line.rpath;
43 if (rpath == NULL)
44 rpath = (const char *) getenv ("LD_RUN_PATH");
45+ if ((rpath) && (strlen (rpath) == 0))
46+ rpath = NULL;
47
48 for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
49 if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-gas-needs-libm.patch b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-gas-needs-libm.patch
new file mode 100644
index 0000000..3869faf
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-gas-needs-libm.patch
@@ -0,0 +1,38 @@
1Source: Khem Raj <raj.khem@gmail.com>
2Disposition: submit upstream.
3Upstream-Status: Pending
4
5Description:
6
7We do not need to have the libtool patch anymore for binutils after
8libtool has been updated upstream it include support for it. However
9for building gas natively on uclibc systems we have to link it with
10-lm so that it picks up missing symbols.
11
12/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
13floatformat.c:(.text+0x1ec): undefined reference to `frexp'
14floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
15/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
16floatformat.c:(.text+0x38a): undefined reference to `ldexp'
17floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
18floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
19collect2: ld returned 1 exit status
20make[4]: *** [as-new] Error 1
21
22Index: binutils-2.22/gas/configure.tgt
23===================================================================
24--- binutils-2.22.orig/gas/configure.tgt
25+++ binutils-2.22/gas/configure.tgt
26@@ -428,6 +428,12 @@ case ${generic_target} in
27 *-*-netware) fmt=elf em=netware ;;
28 esac
29
30+case ${generic_target} in
31+ arm-*-*uclibc*)
32+ need_libm=yes
33+ ;;
34+esac
35+
36 case ${cpu_type} in
37 alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
38 bfd_gas=yes
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/libiberty_path_fix.patch b/recipes-devtools/binutils/binutils-linaro-2.25/libiberty_path_fix.patch
new file mode 100644
index 0000000..6e732fb
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/libiberty_path_fix.patch
@@ -0,0 +1,22 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3don't let the distro compiler point to the wrong installation location
4
5Thanks to RP for helping find the source code causing the issue.
6
72010/08/13
8Nitin A Kamble <nitin.a.kamble@intel.com>
9Index: binutils-2.22/libiberty/Makefile.in
10===================================================================
11--- binutils-2.22.orig/libiberty/Makefile.in
12+++ binutils-2.22/libiberty/Makefile.in
13@@ -350,7 +350,8 @@ install-strip: install
14 # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
15 # default multilib, so we have to take CFLAGS into account as well,
16 # since it will be passed the multilib flags.
17-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
18+#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
19+MULTIOSDIR = ""
20 install_to_libdir: all
21 ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
22 $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/libtool-rpath-fix.patch b/recipes-devtools/binutils/binutils-linaro-2.25/libtool-rpath-fix.patch
new file mode 100644
index 0000000..5240910
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/libtool-rpath-fix.patch
@@ -0,0 +1,39 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Enabling sysroot support in libtool exposed a bug where the final
4library had an RPATH encoded into it which still pointed to the
5sysroot. This works around the issue until it gets sorted out
6upstream.
7
8Fix suggested by Richard Purdie <richard.purdie@linuxfoundation.org>
9Signed-off-by: Scott Garman <scott.a.garman@intel.com>
10
11Forward ported to 2.25 by Koen Kooi <koen.kooi@linaro.org>
12
13--
14diff --git a/ltmain.sh b/ltmain.sh
15index 9503ec8..639f201 100644
16--- a/ltmain.sh
17+++ b/ltmain.sh
18@@ -7104,6 +7104,10 @@ EOF
19 test "$mode" != relink && rpath="$compile_rpath$rpath"
20 for libdir in $rpath; do
21 if test -n "$hardcode_libdir_flag_spec"; then
22+ func_replace_sysroot "$libdir"
23+ libdir=$func_replace_sysroot_result
24+ func_stripname '=' '' "$libdir"
25+ libdir=$func_stripname_result
26 if test -n "$hardcode_libdir_separator"; then
27 if test -z "$hardcode_libdirs"; then
28 hardcode_libdirs="$libdir"
29@@ -7799,6 +7803,10 @@ EOF
30 hardcode_libdirs=
31 for libdir in $compile_rpath $finalize_rpath; do
32 if test -n "$hardcode_libdir_flag_spec"; then
33+ func_replace_sysroot "$libdir"
34+ libdir=$func_replace_sysroot_result
35+ func_stripname '=' '' "$libdir"
36+ libdir=$func_stripname_result
37 if test -n "$hardcode_libdir_separator"; then
38 if test -z "$hardcode_libdirs"; then
39 hardcode_libdirs="$libdir"
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/relocatable_sdk.patch b/recipes-devtools/binutils/binutils-linaro-2.25/relocatable_sdk.patch
new file mode 100644
index 0000000..7408c31
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/relocatable_sdk.patch
@@ -0,0 +1,49 @@
1Upstream-Status: Inappropriate [SDK specific]
2
3This patch will modify the ELF linker scripts so that the crosssdk linker will
4generate binaries with a 4096 bytes PT_INTERP section. When the binaries will
5be relocated, at SDK install time, the interpreter path can be easily changed
6by the relocating script.
7
8Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
9
10Index: binutils_git/ld/genscripts.sh
11===================================================================
12--- binutils_git.orig/ld/genscripts.sh 2012-11-21 11:58:23.325441925 +0200
13+++ binutils_git/ld/genscripts.sh 2012-11-21 12:03:42.106815400 +0200
14@@ -290,6 +290,7 @@
15 LD_FLAG=r
16 DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
17 DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
18+PARTIAL_LINKING=" "
19 ( echo "/* Script for ld -r: link without relocation */"
20 . ${CUSTOMIZER_SCRIPT}
21 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
22@@ -298,10 +299,12 @@
23 LD_FLAG=u
24 DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
25 CONSTRUCTING=" "
26+PARTIAL_LINKING=" "
27 ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
28 . ${CUSTOMIZER_SCRIPT}
29 . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
30 ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
31+unset PARTIAL_LINKING
32
33 LD_FLAG=
34 DATA_ALIGNMENT=${DATA_ALIGNMENT_}
35Index: binutils_git/ld/scripttempl/elf.sc
36===================================================================
37--- binutils_git.orig/ld/scripttempl/elf.sc 2012-11-21 12:02:26.800377384 +0200
38+++ binutils_git/ld/scripttempl/elf.sc 2012-11-21 12:04:16.166109621 +0200
39@@ -124,8 +124,8 @@
40 DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
41 DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
42 fi
43-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
44- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
45+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then
46+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
47 fi
48 if test -z "$PLT"; then
49 IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
diff --git a/recipes-devtools/binutils/binutils-linaro-2.25/replace_macros_with_static_inline.patch b/recipes-devtools/binutils/binutils-linaro-2.25/replace_macros_with_static_inline.patch
new file mode 100644
index 0000000..834f55c
--- /dev/null
+++ b/recipes-devtools/binutils/binutils-linaro-2.25/replace_macros_with_static_inline.patch
@@ -0,0 +1,188 @@
1Upstream-Status: Backport
2
3From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001
4From: Nick Clifton <nickc@redhat.com>
5Date: Wed, 29 Jan 2014 13:46:39 +0000
6Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various
7 bfd_xxx_set macros with static inline functions, so that we can avoid compile time
8 warnings about comma expressions with unused values.
9
10 * bfd-in.h (bfd_set_section_vma): Delete.
11 (bfd_set_section_alignment): Delete.
12 (bfd_set_section_userdata): Delete.
13 (bfd_set_cacheable): Delete.
14 * bfd.c (bfd_set_cacheable): New static inline function.
15 * section.c (bfd_set_section_userdata): Likewise.
16 (bfd_set_section_vma): Likewise.
17 (bfd_set_section_alignment): Likewise.
18 * bfd-in2.h: Regenerate.
19---
20 bfd/ChangeLog | 12 ++++++++++++
21 bfd/bfd-in.h | 5 -----
22 bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------
23 bfd/bfd.c | 8 ++++++++
24 bfd/section.c | 26 ++++++++++++++++++++++++++
25 5 files changed, 81 insertions(+), 11 deletions(-)
26
27diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
28index 3afd71b..c7c5a7d 100644
29--- a/bfd/bfd-in.h
30+++ b/bfd/bfd-in.h
31@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr;
32
33 #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
34
35-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
36-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
37-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
38 /* Find the address one past the end of SEC. */
39 #define bfd_get_section_limit(bfd, sec) \
40 (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
41@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
42
43 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
44
45-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
46-
47 extern bfd_boolean bfd_cache_close
48 (bfd *abfd);
49 /* NB: This declaration should match the autogenerated one in libbfd.h. */
50diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
51index 71996db..b5aeb40 100644
52--- a/bfd/bfd-in2.h
53+++ b/bfd/bfd-in2.h
54@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr;
55
56 #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
57
58-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE)
59-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE)
60-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE)
61 /* Find the address one past the end of SEC. */
62 #define bfd_get_section_limit(bfd, sec) \
63 (((bfd)->direction != write_direction && (sec)->rawsize != 0 \
64@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *);
65
66 #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
67
68-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE)
69-
70 extern bfd_boolean bfd_cache_close
71 (bfd *abfd);
72 /* NB: This declaration should match the autogenerated one in libbfd.h. */
73@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target);
74
75 bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
76
77-bfd *bfd_openstreamr (const char *, const char *, void *);
78+bfd *bfd_openstreamr (const char * filename, const char * target, void * stream);
79
80 bfd *bfd_openr_iovec (const char *filename, const char *target,
81 void *(*open_func) (struct bfd *nbfd,
82@@ -1596,6 +1591,32 @@ struct relax_table {
83 int size;
84 };
85
86+/* Note: the following are provided as inline functions rather than macros
87+ because not all callers use the return value. A macro implementation
88+ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
89+ compilers will complain about comma expressions that have no effect. */
90+static inline bfd_boolean
91+bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
92+{
93+ ptr->userdata = val;
94+ return TRUE;
95+}
96+
97+static inline bfd_boolean
98+bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
99+{
100+ ptr->vma = ptr->lma = val;
101+ ptr->user_set_vma = TRUE;
102+ return TRUE;
103+}
104+
105+static inline bfd_boolean
106+bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
107+{
108+ ptr->alignment_power = val;
109+ return TRUE;
110+}
111+
112 /* These sections are global, and are managed by BFD. The application
113 and target back end are not permitted to change the values in
114 these sections. */
115@@ -6415,6 +6436,14 @@ struct bfd
116 unsigned int selective_search : 1;
117 };
118
119+/* See note beside bfd_set_section_userdata. */
120+static inline bfd_boolean
121+bfd_set_cacheable (bfd * abfd, bfd_boolean val)
122+{
123+ abfd->cacheable = val;
124+ return TRUE;
125+}
126+
127 typedef enum bfd_error
128 {
129 bfd_error_no_error = 0,
130diff --git a/bfd/bfd.c b/bfd/bfd.c
131index 8d0580c..2d174f3 100644
132--- a/bfd/bfd.c
133+++ b/bfd/bfd.c
134@@ -311,6 +311,14 @@ CODE_FRAGMENT
135 . unsigned int selective_search : 1;
136 .};
137 .
138+.{* See note beside bfd_set_section_userdata. *}
139+.static inline bfd_boolean
140+.bfd_set_cacheable (bfd * abfd, bfd_boolean val)
141+.{
142+. abfd->cacheable = val;
143+. return TRUE;
144+.}
145+.
146 */
147
148 #include "sysdep.h"
149diff --git a/bfd/section.c b/bfd/section.c
150index fb19d8c..a661228 100644
151--- a/bfd/section.c
152+++ b/bfd/section.c
153@@ -542,6 +542,32 @@ CODE_FRAGMENT
154 . int size;
155 .};
156 .
157+.{* Note: the following are provided as inline functions rather than macros
158+. because not all callers use the return value. A macro implementation
159+. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some
160+. compilers will complain about comma expressions that have no effect. *}
161+.static inline bfd_boolean
162+.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val)
163+.{
164+. ptr->userdata = val;
165+. return TRUE;
166+.}
167+.
168+.static inline bfd_boolean
169+.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val)
170+.{
171+. ptr->vma = ptr->lma = val;
172+. ptr->user_set_vma = TRUE;
173+. return TRUE;
174+.}
175+.
176+.static inline bfd_boolean
177+.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val)
178+.{
179+. ptr->alignment_power = val;
180+. return TRUE;
181+.}
182+.
183 .{* These sections are global, and are managed by BFD. The application
184 . and target back end are not permitted to change the values in
185 . these sections. *}
186--
1871.7.1
188
diff --git a/recipes-devtools/binutils/binutils_linaro-2.25.bb b/recipes-devtools/binutils/binutils_linaro-2.25.bb
new file mode 100644
index 0000000..8786c17
--- /dev/null
+++ b/recipes-devtools/binutils/binutils_linaro-2.25.bb
@@ -0,0 +1,41 @@
1require recipes-devtools/binutils/binutils.inc
2require recipes-devtools/binutils/binutils-${PV}.inc
3
4DEPENDS += "flex bison zlib"
5
6EXTRA_OECONF += "--with-sysroot=/ \
7 --enable-install-libbfd \
8 --enable-install-libiberty \
9 --enable-shared \
10 "
11
12EXTRA_OECONF_class-native = "--enable-targets=all \
13 --enable-64-bit-bfd \
14 --enable-install-libbfd \
15 --enable-install-libiberty"
16
17do_install_class-native () {
18 autotools_do_install
19
20 # Install the libiberty header
21 install -d ${D}${includedir}
22 install -m 644 ${S}/include/ansidecl.h ${D}${includedir}
23 install -m 644 ${S}/include/libiberty.h ${D}${includedir}
24
25 # We only want libiberty, libbfd and libopcodes
26 rm -rf ${D}${bindir}
27 rm -rf ${D}${prefix}/${TARGET_SYS}
28 rm -rf ${D}${prefix}/lib/ldscripts
29 rm -rf ${D}${prefix}/share/info
30 rm -rf ${D}${prefix}/share/locale
31 rm -rf ${D}${prefix}/share/man
32 rmdir ${D}${prefix}/share || :
33 rmdir ${D}/${libdir}/gcc-lib || :
34 rmdir ${D}/${libdir}64/gcc-lib || :
35 rmdir ${D}/${libdir} || :
36 rmdir ${D}/${libdir}64 || :
37}
38
39BBCLASSEXTEND = "native"
40
41INSANE_SKIP_${PN} += "rpaths"