Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1339223 > unrolled thread

scripts/ld-version.sh doesn't work, breaking mips build with older toolchain.

Started byRob Landley <rob@landley.net>
First post2016-02-22 09:50 +0100
Last post2016-02-22 09:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  scripts/ld-version.sh doesn't work, breaking mips build with older toolchain. Rob Landley <rob@landley.net> - 2016-02-22 09:50 +0100

#1339223 — scripts/ld-version.sh doesn't work, breaking mips build with older toolchain.

FromRob Landley <rob@landley.net>
Date2016-02-22 09:50 +0100
Subjectscripts/ld-version.sh doesn't work, breaking mips build with older toolchain.
Message-ID<r4UlP-2Z4-3@gated-at.bofh.it>
The 4.4 kernel no longer builds for me on mips, ala:

/tmp/ccXLGh3W.s: Assembler messages:
/tmp/ccXLGh3W.s:44: Error: can't resolve `_start' {*UND* section} -
`L0' {.text section}
/tmp/ccXLGh3W.s:1217: Error: can't resolve `_start' {*UND* section} -
`L0' {.text section}
make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1
make[1]: *** [arch/mips/vdso] Error 2

And the reason is:

$ ld --version scripts/ld-version.sh
GNU ld (GNU Binutils for Ubuntu) 2.22
...
$ ld --version | scripts/ld-version.sh
22200000
$ mips-ld --version
GNU ld (GNU Binutils) 2.17.50.20070703
...
$ mips-ld --version | scripts/ld-version.sh
2029270300

Well, the _other_ reason is that busybox awk complains the regex
doesn't compile due to an unmatched ")" but that's easy enough to fix:

diff --git a/scripts/ld-version.sh b/scripts/ld-version.sh
index 198580d..9ae1666 100755
--- a/scripts/ld-version.sh
+++ b/scripts/ld-version.sh
@@ -1,7 +1,7 @@
 #!/usr/bin/awk -f
 # extract linker version number from stdin and turn into single number
        {
-       gsub(".*)", "");
+       gsub(".*[)]", "");
        split($1,a, ".");
        print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
        exit

And possibly the busybox guys are at fault for using ERE when they
should be using BRE, but once that's fixed the "longer number vs
larger number" issue crops up.

Rob

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web