From 635d320abfa6dc3c0e1d00e3ceae567dd0e55a5b Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 8 Oct 2015 22:42:49 +0200 Subject: initial commit for Enea Linux 5.0 arm Signed-off-by: Tudor Florea --- .../binutils-cross-canadian_linaro-2.25.bb | 3 + .../binutils/binutils-cross_linaro-2.25.bb | 3 + .../binutils/binutils-crosssdk_linaro-2.25.bb | 13 + recipes-devtools/binutils/binutils-linaro-2.25.inc | 38 +++ .../0001-AArch64-Define-LP64-BE-linker-name.patch | 18 ++ ...ild-breakage-from-bfd_set_section_vma-cha.patch | 31 +++ .../binutils-linaro-2.25/binutils-armv5e.patch | 25 ++ .../binutils-linaro-2.25/binutils-poison.patch | 279 +++++++++++++++++++++ .../binutils-uclibc-100-uclibc-conf.patch | 40 +++ ...binutils-uclibc-300-001_ld_makefile_patch.patch | 55 ++++ ...binutils-uclibc-300-006_better_file_error.patch | 45 ++++ ...ils-uclibc-300-012_check_ldrunpath_length.patch | 49 ++++ .../binutils-uclibc-gas-needs-libm.patch | 38 +++ .../binutils-linaro-2.25/libiberty_path_fix.patch | 22 ++ .../binutils-linaro-2.25/libtool-rpath-fix.patch | 39 +++ .../binutils-linaro-2.25/relocatable_sdk.patch | 49 ++++ .../replace_macros_with_static_inline.patch | 188 ++++++++++++++ recipes-devtools/binutils/binutils_linaro-2.25.bb | 41 +++ 18 files changed, 976 insertions(+) create mode 100644 recipes-devtools/binutils/binutils-cross-canadian_linaro-2.25.bb create mode 100644 recipes-devtools/binutils/binutils-cross_linaro-2.25.bb create mode 100644 recipes-devtools/binutils/binutils-crosssdk_linaro-2.25.bb create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25.inc create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/0001-AArch64-Define-LP64-BE-linker-name.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-armv5e.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-poison.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-100-uclibc-conf.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-001_ld_makefile_patch.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-006_better_file_error.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-300-012_check_ldrunpath_length.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/binutils-uclibc-gas-needs-libm.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/libiberty_path_fix.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/libtool-rpath-fix.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/relocatable_sdk.patch create mode 100644 recipes-devtools/binutils/binutils-linaro-2.25/replace_macros_with_static_inline.patch create mode 100644 recipes-devtools/binutils/binutils_linaro-2.25.bb (limited to 'recipes-devtools') 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 @@ +require recipes-devtools/binutils/binutils.inc +require recipes-devtools/binutils/binutils-${PV}.inc +require 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 @@ +require recipes-devtools/binutils/binutils.inc +require recipes-devtools/binutils/binutils-${PV}.inc +require 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 @@ +require recipes-devtools/binutils/binutils-cross_${PV}.bb + +inherit crosssdk + +PN = "binutils-crosssdk-${TARGET_ARCH}" + +PROVIDES = "virtual/${TARGET_PREFIX}binutils-crosssdk" + +SRC_URI += "file://relocatable_sdk.patch" + +do_configure_prepend () { + sed -i 's#/usr/local/lib /lib /usr/lib#${SDKPATHNATIVE}/lib ${SDKPATHNATIVE}/usr/lib /usr/local/lib /lib /usr/lib#' ${S}/ld/configure.tgt +} 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 @@ +BPV = "2.25.0" +MMYY = "15.01" +RELEASE = "20${MMYY}" +LINARORELEASE = "20${MMYY}-2" +PR = "r${RELEASE}" + +LIC_FILES_CHKSUM="\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\ + file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\ + file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\ + file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\ + file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\ + " + +SRC_URI = "\ + http://releases.linaro.org/${MMYY}/components/toolchain/binutils-linaro/binutils-linaro-${BPV}-${LINARORELEASE}.tar.xz \ + file://binutils-uclibc-100-uclibc-conf.patch \ + file://binutils-uclibc-300-001_ld_makefile_patch.patch \ + file://binutils-uclibc-300-006_better_file_error.patch \ + file://binutils-uclibc-300-012_check_ldrunpath_length.patch \ + file://binutils-uclibc-gas-needs-libm.patch \ + file://libiberty_path_fix.patch \ + file://binutils-poison.patch \ + file://libtool-rpath-fix.patch \ + file://binutils-armv5e.patch \ + file://replace_macros_with_static_inline.patch;apply=no \ + file://0001-Fix-MMIX-build-breakage-from-bfd_set_section_vma-cha.patch;apply=no \ + file://0001-AArch64-Define-LP64-BE-linker-name.patch \ + " + +SRC_URI[md5sum] = "5c4b97c60f8bf624a34e2acef3138eec" +SRC_URI[sha256sum] = "aed2aef13926911923b47a71ee88dc0943d544718d91f8caee5fc48fd20ef3a7" + +S = "${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 @@ +From 5a4f233680ecf1132591f8213ff1cc6a2535b1b7 Mon Sep 17 00:00:00 2001 +From: Marcus Shawcroft +Date: Mon, 20 Jan 2014 18:20:04 +0000 +Subject: [PATCH] [AArch64] Define LP64 BE linker name. + +--- + ld/ChangeLog | 4 ++++ + ld/emulparams/aarch64linuxb.sh | 1 + + 2 files changed, 5 insertions(+) + +Index: binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh +=================================================================== +--- binutils-linaro-2.24-2014.03.orig/ld/emulparams/aarch64linuxb.sh ++++ binutils-linaro-2.24-2014.03/ld/emulparams/aarch64linuxb.sh +@@ -1,2 +1,3 @@ + . ${srcdir}/emulparams/aarch64linux.sh + OUTPUT_FORMAT="elf64-bigaarch64" ++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 @@ +Upstream-Status: Backport + +From 0a09fb4a09e80c36fa3ef763ae276fd13d272a36 Mon Sep 17 00:00:00 2001 +From: Hans-Peter Nilsson +Date: Sat, 1 Feb 2014 01:11:28 +0100 +Subject: [PATCH] Fix MMIX build breakage from bfd_set_section_vma change. + + * emultempl/mmix-elfnmmo.em (mmix_after_allocation): Fix typo in + call to bfd_set_section_vma exposed by recent bfd_set_section_vma + change. +--- + ld/ChangeLog | 6 ++++++ + ld/emultempl/mmix-elfnmmo.em | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/ld/emultempl/mmix-elfnmmo.em b/ld/emultempl/mmix-elfnmmo.em +index 0059792..5e9781a 100644 +--- a/ld/emultempl/mmix-elfnmmo.em ++++ b/ld/emultempl/mmix-elfnmmo.em +@@ -102,7 +102,7 @@ mmix_after_allocation (void) + This section is only present when there are register symbols. */ + sec = bfd_get_section_by_name (link_info.output_bfd, MMIX_REG_SECTION_NAME); + if (sec != NULL) +- bfd_set_section_vma (abfd, sec, 0); ++ bfd_set_section_vma (sec->owner, sec, 0); + + if (!_bfd_mmix_after_linker_allocation (link_info.output_bfd, &link_info)) + { +-- +1.7.10.4 + 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 @@ +Add the armv5e architecture to binutils + +Binutils has a comment that indicates it is supposed to match gcc for all of +the support "-march=" settings, but it was lacking the armv5e setting. This +was a simple way to add it, as thumb instructions shouldn't be generated by +the compiler anyway. + +Upstream-Status: Denied +Upstream maintainer indicated that we should not be using armv5e, even though +it is a legal archicture defined by our gcc. + +Signed-off-by: Mark Hatle + +Index: binutils-2.22.90/gas/config/tc-arm.c +=================================================================== +--- binutils-2.22.90.orig/gas/config/tc-arm.c 2012-07-24 09:38:32.000000000 -0700 ++++ binutils-2.22.90/gas/config/tc-arm.c 2012-08-07 23:41:59.822564075 -0700 +@@ -23162,6 +23162,7 @@ + ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA), + ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA), + ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP), ++ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP), + ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP), + ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP), + 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 @@ +From d5b58a44afcafd3c6ec1c9c69facbb2c17bc2b69 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 7 Jan 2015 09:46:35 +0100 +Subject: [PATCH] Warn for uses of system directories when cross linking + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman and forward ported to binutils 2.25 by Koen Kooi. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.in (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +Signed-off-by: Koen Kooi +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texinfo | 12 ++++++++++++ + ld/ldfile.c | 17 +++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 16 ++++++++++++++++ + 9 files changed, 84 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index 2ab4844..766d23c 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -11,6 +11,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index 4408b0d..c0dfa53 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -783,6 +783,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_werror +@@ -1439,6 +1440,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15487,7 +15490,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff --git a/ld/configure.ac b/ld/configure.ac +index 1bddfc9..e9edb7f 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -94,6 +94,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index f773ce7..adba0f6 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -161,6 +161,14 @@ typedef struct { + /* If TRUE we'll just print the default output on stdout. */ + bfd_boolean print_output_format; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index 502582c..dae168a 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2212,6 +2212,18 @@ string identifying the original linked file does not change. + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 782ed7f..19a9ab4 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +diff --git a/ld/ldlex.h b/ld/ldlex.h +index e3e9b24..29487a3 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -140,6 +140,8 @@ enum option_values + OPTION_IGNORE_UNRESOLVED_SYMBOL, + OPTION_PUSH_STATE, + OPTION_POP_STATE, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index bc24957..396c4a0 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -266,6 +266,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 4812c97..21b49df 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -513,6 +513,14 @@ static const struct ld_option ld_options[] = + { {"pop-state", no_argument, NULL, OPTION_POP_STATE}, + '\0', NULL, N_("Pop state of flags governing input file handling"), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -1474,6 +1482,14 @@ parse_args (unsigned argc, char **argv) + free (oldp); + } + break; ++ ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; + } + } + +-- +1.9.3 + 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 @@ +Upstream-Status: Pending + +Index: binutils-2.22/configure +=================================================================== +--- binutils-2.22.orig/configure ++++ binutils-2.22/configure +@@ -3130,7 +3130,7 @@ case "${target}" in + ;; + s390-*-* | s390x-*-*) + ;; +- sh-*-* | sh[34]*-*-*) ++ sh*-*-* | sh[34]*-*-*) + ;; + sh64-*-* | sh5*-*-*) + ;; +@@ -3570,7 +3570,7 @@ case "${target}" in + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +Index: binutils-2.22/gprof/configure +=================================================================== +--- binutils-2.22.orig/gprof/configure ++++ binutils-2.22/gprof/configure +@@ -6103,6 +6103,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) + lt_cv_deplibs_check_method=pass_all + ;; + ++linux-uclibc*) ++ lt_cv_deplibs_check_method=pass_all ++ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` ++ ;; ++ + netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + 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 @@ +#!/bin/sh -e +## 001_ld_makefile_patch.dpatch +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Description: correct where ld scripts are installed +## DP: Author: Chris Chimelis +## DP: Upstream status: N/A +## DP: Date: ?? + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 +Upstream-Status: Inappropriate [debian patch] + +@DPATCH@ +Index: binutils-2.22/ld/Makefile.am +=================================================================== +--- binutils-2.22.orig/ld/Makefile.am ++++ binutils-2.22/ld/Makefile.am +@@ -37,7 +37,7 @@ endif + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +Index: binutils-2.22/ld/Makefile.in +=================================================================== +--- binutils-2.22.orig/ld/Makefile.in ++++ binutils-2.22/ld/Makefile.in +@@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + 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 @@ +#!/bin/sh -e +## 006_better_file_error.dpatch by David Kimdon +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Specify which filename is causing an error if the filename is a +## DP: directory. (#45832) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 +Upstream-Status: Inappropriate [debian patch] + +@DPATCH@ +Index: binutils-2.22/bfd/opncls.c +=================================================================== +--- binutils-2.22.orig/bfd/opncls.c ++++ binutils-2.22/bfd/opncls.c +@@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + 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 @@ +#!/bin/sh -e +## 012_check_ldrunpath_length.dpatch by Chris Chimelis +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for +## DP: cases where -rpath isn't specified. (#151024) + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p1 < $0;; + -unpatch) patch $patch_opts -p1 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 +Upstream-Status: Inappropriate [debian patch] + +@DPATCH@ +Index: binutils-2.22/ld/emultempl/elf32.em +=================================================================== +--- binutils-2.22.orig/ld/emultempl/elf32.em ++++ binutils-2.22/ld/emultempl/elf32.em +@@ -1273,6 +1273,8 @@ fragment <link_next) + 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 @@ +Source: Khem Raj +Disposition: submit upstream. +Upstream-Status: Pending + +Description: + +We do not need to have the libtool patch anymore for binutils after +libtool has been updated upstream it include support for it. However +for building gas natively on uclibc systems we have to link it with +-lm so that it picks up missing symbols. + +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double': +floatformat.c:(.text+0x1ec): undefined reference to `frexp' +floatformat.c:(.text+0x2f8): undefined reference to `ldexp' +/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double': +floatformat.c:(.text+0x38a): undefined reference to `ldexp' +floatformat.c:(.text+0x3d2): undefined reference to `ldexp' +floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp' +collect2: ld returned 1 exit status +make[4]: *** [as-new] Error 1 + +Index: binutils-2.22/gas/configure.tgt +=================================================================== +--- binutils-2.22.orig/gas/configure.tgt ++++ binutils-2.22/gas/configure.tgt +@@ -428,6 +428,12 @@ case ${generic_target} in + *-*-netware) fmt=elf em=netware ;; + esac + ++case ${generic_target} in ++ arm-*-*uclibc*) ++ need_libm=yes ++ ;; ++esac ++ + case ${cpu_type} in + alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k) + 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 @@ +Upstream-Status: Inappropriate [embedded specific] + +don't let the distro compiler point to the wrong installation location + +Thanks to RP for helping find the source code causing the issue. + +2010/08/13 +Nitin A Kamble +Index: binutils-2.22/libiberty/Makefile.in +=================================================================== +--- binutils-2.22.orig/libiberty/Makefile.in ++++ binutils-2.22/libiberty/Makefile.in +@@ -350,7 +350,8 @@ install-strip: install + # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the + # default multilib, so we have to take CFLAGS into account as well, + # since it will be passed the multilib flags. +-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++MULTIOSDIR = "" + install_to_libdir: all + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) + $(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 @@ +Upstream-Status: Inappropriate [embedded specific] + +Enabling sysroot support in libtool exposed a bug where the final +library had an RPATH encoded into it which still pointed to the +sysroot. This works around the issue until it gets sorted out +upstream. + +Fix suggested by Richard Purdie +Signed-off-by: Scott Garman + +Forward ported to 2.25 by Koen Kooi + +-- +diff --git a/ltmain.sh b/ltmain.sh +index 9503ec8..639f201 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -7104,6 +7104,10 @@ EOF + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" +@@ -7799,6 +7803,10 @@ EOF + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + 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 @@ +Upstream-Status: Inappropriate [SDK specific] + +This patch will modify the ELF linker scripts so that the crosssdk linker will +generate binaries with a 4096 bytes PT_INTERP section. When the binaries will +be relocated, at SDK install time, the interpreter path can be easily changed +by the relocating script. + +Signed-off-by: Laurentiu Palcu + +Index: binutils_git/ld/genscripts.sh +=================================================================== +--- binutils_git.orig/ld/genscripts.sh 2012-11-21 11:58:23.325441925 +0200 ++++ binutils_git/ld/genscripts.sh 2012-11-21 12:03:42.106815400 +0200 +@@ -290,6 +290,7 @@ + LD_FLAG=r + DATA_ALIGNMENT=${DATA_ALIGNMENT_r} + DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})" ++PARTIAL_LINKING=" " + ( echo "/* Script for ld -r: link without relocation */" + . ${CUSTOMIZER_SCRIPT} + . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc +@@ -298,10 +299,12 @@ + LD_FLAG=u + DATA_ALIGNMENT=${DATA_ALIGNMENT_u} + CONSTRUCTING=" " ++PARTIAL_LINKING=" " + ( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */" + . ${CUSTOMIZER_SCRIPT} + . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc + ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu ++unset PARTIAL_LINKING + + LD_FLAG= + DATA_ALIGNMENT=${DATA_ALIGNMENT_} +Index: binutils_git/ld/scripttempl/elf.sc +=================================================================== +--- binutils_git.orig/ld/scripttempl/elf.sc 2012-11-21 12:02:26.800377384 +0200 ++++ binutils_git/ld/scripttempl/elf.sc 2012-11-21 12:04:16.166109621 +0200 +@@ -124,8 +124,8 @@ + DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);" + DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);" + fi +-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then +- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }" ++if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then ++ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }" + fi + if test -z "$PLT"; then + 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 @@ +Upstream-Status: Backport + +From 27b829ee701e29804216b3803fbaeb629be27491 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 29 Jan 2014 13:46:39 +0000 +Subject: [PATCH 1/1] Following up on Tom's suggestion I am checking in a patch to replace the various + bfd_xxx_set macros with static inline functions, so that we can avoid compile time + warnings about comma expressions with unused values. + + * bfd-in.h (bfd_set_section_vma): Delete. + (bfd_set_section_alignment): Delete. + (bfd_set_section_userdata): Delete. + (bfd_set_cacheable): Delete. + * bfd.c (bfd_set_cacheable): New static inline function. + * section.c (bfd_set_section_userdata): Likewise. + (bfd_set_section_vma): Likewise. + (bfd_set_section_alignment): Likewise. + * bfd-in2.h: Regenerate. +--- + bfd/ChangeLog | 12 ++++++++++++ + bfd/bfd-in.h | 5 ----- + bfd/bfd-in2.h | 41 +++++++++++++++++++++++++++++++++++------ + bfd/bfd.c | 8 ++++++++ + bfd/section.c | 26 ++++++++++++++++++++++++++ + 5 files changed, 81 insertions(+), 11 deletions(-) + +diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h +index 3afd71b..c7c5a7d 100644 +--- a/bfd/bfd-in.h ++++ b/bfd/bfd-in.h +@@ -292,9 +292,6 @@ typedef struct bfd_section *sec_ptr; + + #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) + +-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) +-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) +-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) + /* Find the address one past the end of SEC. */ + #define bfd_get_section_limit(bfd, sec) \ + (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ +@@ -517,8 +514,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); + + #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) + +-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +- + extern bfd_boolean bfd_cache_close + (bfd *abfd); + /* NB: This declaration should match the autogenerated one in libbfd.h. */ +diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h +index 71996db..b5aeb40 100644 +--- a/bfd/bfd-in2.h ++++ b/bfd/bfd-in2.h +@@ -299,9 +299,6 @@ typedef struct bfd_section *sec_ptr; + + #define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0) + +-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma = (val)), ((ptr)->user_set_vma = TRUE), TRUE) +-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),TRUE) +-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),TRUE) + /* Find the address one past the end of SEC. */ + #define bfd_get_section_limit(bfd, sec) \ + (((bfd)->direction != write_direction && (sec)->rawsize != 0 \ +@@ -524,8 +521,6 @@ extern void warn_deprecated (const char *, const char *, int, const char *); + + #define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char) + +-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = bool), TRUE) +- + extern bfd_boolean bfd_cache_close + (bfd *abfd); + /* NB: This declaration should match the autogenerated one in libbfd.h. */ +@@ -1029,7 +1024,7 @@ bfd *bfd_openr (const char *filename, const char *target); + + bfd *bfd_fdopenr (const char *filename, const char *target, int fd); + +-bfd *bfd_openstreamr (const char *, const char *, void *); ++bfd *bfd_openstreamr (const char * filename, const char * target, void * stream); + + bfd *bfd_openr_iovec (const char *filename, const char *target, + void *(*open_func) (struct bfd *nbfd, +@@ -1596,6 +1591,32 @@ struct relax_table { + int size; + }; + ++/* Note: the following are provided as inline functions rather than macros ++ because not all callers use the return value. A macro implementation ++ would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some ++ compilers will complain about comma expressions that have no effect. */ ++static inline bfd_boolean ++bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) ++{ ++ ptr->userdata = val; ++ return TRUE; ++} ++ ++static inline bfd_boolean ++bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) ++{ ++ ptr->vma = ptr->lma = val; ++ ptr->user_set_vma = TRUE; ++ return TRUE; ++} ++ ++static inline bfd_boolean ++bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) ++{ ++ ptr->alignment_power = val; ++ return TRUE; ++} ++ + /* These sections are global, and are managed by BFD. The application + and target back end are not permitted to change the values in + these sections. */ +@@ -6415,6 +6436,14 @@ struct bfd + unsigned int selective_search : 1; + }; + ++/* See note beside bfd_set_section_userdata. */ ++static inline bfd_boolean ++bfd_set_cacheable (bfd * abfd, bfd_boolean val) ++{ ++ abfd->cacheable = val; ++ return TRUE; ++} ++ + typedef enum bfd_error + { + bfd_error_no_error = 0, +diff --git a/bfd/bfd.c b/bfd/bfd.c +index 8d0580c..2d174f3 100644 +--- a/bfd/bfd.c ++++ b/bfd/bfd.c +@@ -311,6 +311,14 @@ CODE_FRAGMENT + . unsigned int selective_search : 1; + .}; + . ++.{* See note beside bfd_set_section_userdata. *} ++.static inline bfd_boolean ++.bfd_set_cacheable (bfd * abfd, bfd_boolean val) ++.{ ++. abfd->cacheable = val; ++. return TRUE; ++.} ++. + */ + + #include "sysdep.h" +diff --git a/bfd/section.c b/bfd/section.c +index fb19d8c..a661228 100644 +--- a/bfd/section.c ++++ b/bfd/section.c +@@ -542,6 +542,32 @@ CODE_FRAGMENT + . int size; + .}; + . ++.{* Note: the following are provided as inline functions rather than macros ++. because not all callers use the return value. A macro implementation ++. would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some ++. compilers will complain about comma expressions that have no effect. *} ++.static inline bfd_boolean ++.bfd_set_section_userdata (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, void * val) ++.{ ++. ptr->userdata = val; ++. return TRUE; ++.} ++. ++.static inline bfd_boolean ++.bfd_set_section_vma (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, bfd_vma val) ++.{ ++. ptr->vma = ptr->lma = val; ++. ptr->user_set_vma = TRUE; ++. return TRUE; ++.} ++. ++.static inline bfd_boolean ++.bfd_set_section_alignment (bfd * abfd ATTRIBUTE_UNUSED, asection * ptr, unsigned int val) ++.{ ++. ptr->alignment_power = val; ++. return TRUE; ++.} ++. + .{* These sections are global, and are managed by BFD. The application + . and target back end are not permitted to change the values in + . these sections. *} +-- +1.7.1 + 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 @@ +require recipes-devtools/binutils/binutils.inc +require recipes-devtools/binutils/binutils-${PV}.inc + +DEPENDS += "flex bison zlib" + +EXTRA_OECONF += "--with-sysroot=/ \ + --enable-install-libbfd \ + --enable-install-libiberty \ + --enable-shared \ + " + +EXTRA_OECONF_class-native = "--enable-targets=all \ + --enable-64-bit-bfd \ + --enable-install-libbfd \ + --enable-install-libiberty" + +do_install_class-native () { + autotools_do_install + + # Install the libiberty header + install -d ${D}${includedir} + install -m 644 ${S}/include/ansidecl.h ${D}${includedir} + install -m 644 ${S}/include/libiberty.h ${D}${includedir} + + # We only want libiberty, libbfd and libopcodes + rm -rf ${D}${bindir} + rm -rf ${D}${prefix}/${TARGET_SYS} + rm -rf ${D}${prefix}/lib/ldscripts + rm -rf ${D}${prefix}/share/info + rm -rf ${D}${prefix}/share/locale + rm -rf ${D}${prefix}/share/man + rmdir ${D}${prefix}/share || : + rmdir ${D}/${libdir}/gcc-lib || : + rmdir ${D}/${libdir}64/gcc-lib || : + rmdir ${D}/${libdir} || : + rmdir ${D}/${libdir}64 || : +} + +BBCLASSEXTEND = "native" + +INSANE_SKIP_${PN} += "rpaths" -- cgit v1.2.3-54-g00ecf