summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/03_ld-fix-tests-on-busybox-ash.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/patches/03_ld-fix-tests-on-busybox-ash.patch b/patches/03_ld-fix-tests-on-busybox-ash.patch
new file mode 100644
index 0000000..6b5cc4f
--- /dev/null
+++ b/patches/03_ld-fix-tests-on-busybox-ash.patch
@@ -0,0 +1,71 @@
+Author: "P. J. McDermott" <pjm@nac.net>
+Subject: ld: Fix tests on BusyBox ash
+
+BusyBox ash doesn't recognize the delimeter ("EOF") of a here-document
+unless it's followed by a newline character.
+
+So, running the test suite with /bin/sh linked to busybox results in the
+following errors with ld's tests (note the "EOF: not found" errors):
+
+ Test Run By root on Mon Dec 9 02:21:30 2013
+ Native configuration is x86_64-unknown-linux-gnu
+
+ === ld tests ===
+
+ Schedule of variations:
+ unix
+
+ Running target unix
+ Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
+ Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
+ Using /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/config/default.exp as tool-and-target-specific interface file.
+ ERROR: tcl error sourcing tool-and-target-specific interface file /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/config/default.exp.
+ Error getting native link files: -dynamic-linker /lib/core-linux-eglibc/ld-linux-x86-64.so.2 /usr/lib/core-linux-eglibc/crt1.o /usr/lib/core-linux-eglibc/crti.o /usr/lib/core-linux-eglibc/gcc-4.7/crtbegin.o
+ sh: eval: line 2: EOF: not found
+ Error getting native link files: -dynamic-linker /lib/core-linux-eglibc/ld-linux-x86-64.so.2 /usr/lib/core-linux-eglibc/crt1.o /usr/lib/core-linux-eglibc/crti.o /usr/lib/core-linux-eglibc/gcc-4.7/crtbegin.o
+ sh: eval: line 2: EOF: not found
+ while executing
+ "error "Error getting native link files: $result" "
+ invoked from within
+ "if $status { error "Error getting native link files: $result" }"
+ invoked from within
+ "if ![info exists $varname] {
+ #configure.host returns variables that can be substituted into
+ #makefile rules, with embedded shell variable expansions..."
+ (procedure "get_link_files" line 6)
+ invoked from within
+ "get_link_files $x"
+ ("foreach" body line 2)
+ invoked from within
+ "foreach x {HOSTING_CRT0 HOSTING_LIBS} {
+ get_link_files $x
+ }"
+ invoked from within
+ "if [isnative] {
+ foreach x {HOSTING_CRT0 HOSTING_LIBS} {
+ get_link_files $x
+ }
+ } else {
+ foreach x {HOSTING_CRT0 HOSTING_LIBS} { set $x "" }
+ ..."
+ (file "/usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/config/default.exp" line 141)
+ invoked from within
+ "source /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/config/default.exp"
+ ("uplevel" body line 1)
+ invoked from within
+ "uplevel #0 source /usr/src/binutils_2.23.2-1/tmp/src/ld/testsuite/config/default.exp"
+ invoked from within
+ "catch "uplevel #0 source ${dir}/${initfile}" error"
+
+diff -Naur src.orig/ld/testsuite/config/default.exp src/ld/testsuite/config/default.exp
+--- src.orig/ld/testsuite/config/default.exp 2012-03-14 21:57:57.000000000 -0400
++++ src/ld/testsuite/config/default.exp 2013-12-08 23:32:51.502069716 -0500
+@@ -119,7 +119,7 @@
+ #configure.host returns variables that can be substituted into
+ #makefile rules, with embedded shell variable expansions.
+ #make wants $$shell_var, we want $shell_var ...
+- set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' <<EOF\n\$$varname\nEOF"
++ set cmd "host='$target_triplet' && . $srcdir/../configure.host && sed -e 's,\\\$\\\$,\$,g' <<EOF\n\$$varname\nEOF\n"
+ set status [catch "exec sh -c [list $cmd]" result]
+ if $status { error "Error getting native link files: $result" }
+ set cmd "CC='$CC' && eval echo \"$result\""