010-Kbuild-don-t-hardcode-path-to-awk-in-scripts-ld-vers.patch 601 B

123456789101112131415161718192021222324
  1. From: Felix Fietkau <nbd@nbd.name>
  2. Date: Mon, 18 Jan 2016 12:27:49 +0100
  3. Subject: [PATCH] Kbuild: don't hardcode path to awk in scripts/ld-version.sh
  4. On some systems /usr/bin/awk does not exist, or is broken. Find it via
  5. $PATH instead.
  6. Signed-off-by: Felix Fietkau <nbd@nbd.name>
  7. ---
  8. --- a/scripts/ld-version.sh
  9. +++ b/scripts/ld-version.sh
  10. @@ -1,8 +1,10 @@
  11. -#!/usr/bin/awk -f
  12. +#!/bin/sh
  13. # extract linker version number from stdin and turn into single number
  14. +exec awk '
  15. {
  16. gsub(".*\\)", "");
  17. split($1,a, ".");
  18. print a[1]*10000000 + a[2]*100000 + a[3]*10000 + a[4]*100 + a[5];
  19. exit
  20. }
  21. +'