From 069f15a410c8995f1c0a858ea292735f30b5b82e Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 08 Sep 2013 11:38:12 -0400 Subject: Remove awk portability patches. glibc/eglibc 2.18 will be a bit harder to build without gawk. So we're just using gawk. --- (limited to 'patches/06_fix-use-of-undefined-asort-awk-function.patch') diff --git a/patches/06_fix-use-of-undefined-asort-awk-function.patch b/patches/06_fix-use-of-undefined-asort-awk-function.patch deleted file mode 100644 index fd53a6d..0000000 --- a/patches/06_fix-use-of-undefined-asort-awk-function.patch +++ /dev/null @@ -1,95 +0,0 @@ -From: "P. J. McDermott" -Description: Don't use asort() and asorti() awk functions - BusyBox awk doesn't define them and they aren't necessary for simple array - iteration. - . - Also, fix some newlines in errlist-compat.awk. POSIX.1-2008 states, "a - shall not occur within a string constant." GNU Awk allows newlines - in strings and allows them to be escaped. BusyBox awk also allows newlines in - strings, but it ignores any preceeding backslash. - . - As a result, in BusyBox awk, erroneous newlines are added to errlist-compat.c, - including in the string in the link_warning macro. This causes the following - warnings and errors: - . - gcc ../sysdeps/gnu/errlist.c -c [...] - In file included from ../sysdeps/gnu/errlist.c:1482:0: - /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/stdio-common/errlist-compat.c:87:28: warning: missing terminating " character [enabled by default] - /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/stdio-common/errlist-compat.c:88:59: warning: missing terminating ' character [enabled by default] - /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/stdio-common/errlist-compat.c:90:25: warning: missing terminating " character [enabled by default] - /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/stdio-common/errlist-compat.c:91:56: warning: missing terminating ' character [enabled by default] - /usr/src/eglibc_2.17~r22751+sip1-1/tmp/libcbuild/stdio-common/errlist-compat.c:91:0: error: unterminated argument list invoking macro "link_warning" - ../sysdeps/gnu/errlist.c:1483:0: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input - -diff -Naur src.orig/libc/scripts/option-groups.awk src/libc/scripts/option-groups.awk ---- src.orig/libc/scripts/option-groups.awk 2007-12-13 13:16:57.000000000 -0500 -+++ src/libc/scripts/option-groups.awk 2013-06-21 11:14:39.304717753 -0400 -@@ -32,10 +32,9 @@ - print "" - - # Produce a sorted list of variable names. -- i=0 -+ n=0 - for (var in vars) -- names[i++] = var -- n = asort (names) -+ names[n++] = var - - for (i = 1; i <= n; i++) - { -diff -Naur src.orig/libc/sysdeps/gnu/errlist-compat.awk src/libc/sysdeps/gnu/errlist-compat.awk ---- src.orig/libc/sysdeps/gnu/errlist-compat.awk 2012-04-21 13:19:39.000000000 -0400 -+++ src/libc/sysdeps/gnu/errlist-compat.awk 2013-06-21 13:17:44.606655144 -0400 -@@ -84,10 +84,8 @@ - printf "#define ERR_MAX %d\n\n", highest - 1; - } - -- # same regardless of awk's ordering of the associative array. -- num_compat_elems = asorti(compat, compat_indices) -- for (i = 1; i <= num_compat_elems; i++) { -- old = compat_indices[i] -+ for (compat_index in compat) { -+ old = compat_index; - new = compat[old]; - n = vcount[old]; - printf "#if SHLIB_COMPAT (libc, %s, %s)\n", old, new; -@@ -113,21 +111,23 @@ - printf "#endif\n\n"; - } - -- printf "\ --extern const char *const __sys_errlist_internal[NERR];\n\ --extern const int __sys_nerr_internal;\n\ --strong_alias (_sys_errlist_internal, __sys_errlist_internal)\n\ --strong_alias (_sys_nerr_internal, __sys_nerr_internal)\n\ --extern const char *const sys_errlist[NERR];\n\ --versioned_symbol (libc, _sys_errlist_internal, sys_errlist, %s);\n\ --versioned_symbol (libc, __sys_errlist_internal, _sys_errlist, %s);\n\ --versioned_symbol (libc, _sys_nerr_internal, sys_nerr, %s);\n\ --versioned_symbol (libc, __sys_nerr_internal, _sys_nerr, %s);\n", \ -- lastv, lastv, lastv, lastv; -+ printf "extern const char *const __sys_errlist_internal[NERR];\n" -+ printf "extern const int __sys_nerr_internal;\n" -+ printf "strong_alias (_sys_errlist_internal, __sys_errlist_internal)\n" -+ printf "strong_alias (_sys_nerr_internal, __sys_nerr_internal)\n" -+ printf "extern const char *const sys_errlist[NERR];\n" -+ printf "versioned_symbol (libc, _%s_internal, %s, %s);\n", \ -+ "sys_errlist", "sys_errlist", lastv; -+ printf "versioned_symbol (libc, _%s_internal, %s, %s);\n", \ -+ "_sys_errlist", "_sys_errlist", lastv; -+ printf "versioned_symbol (libc, _%s_internal, %s, %s);\n", \ -+ "sys_nerr", "sys_nerr", lastv; -+ printf "versioned_symbol (libc, _%s_internal, %s, %s);\n", \ -+ "_sys_nerr", "_sys_nerr", lastv; - -- print "\n\ --link_warning (sys_errlist, \"\ --`sys_errlist' is deprecated; use `strerror' or `strerror_r' instead\")\n\ --link_warning (sys_nerr, \"\ --`sys_nerr' is deprecated; use `strerror' or `strerror_r' instead\")"; -+ printf "\n" -+ printf "link_warning (sys_errlist, \"`sys_errlist' " -+ printf "is deprecated; use `strerror' or `strerror_r' instead\")\n" -+ printf "link_warning (sys_nerr, \"`sys_nerr' " -+ printf "is deprecated; use `strerror' or `strerror_r' instead\")"; - } -- cgit v0.9.1