Some awk implementations such as old versions of mawk do not support the
length() function. Use the return value of the POSIX split() function instead.
## https://sourceware.org/PR28917
AWK_UNIQUE_OBJS = $(AWK) '{ \
for (i = NF; i > 0; --i) { \
- split($$i, parts, "/"); \
- name = parts[length(parts)]; \
+ count = split($$i, parts, "/"); \
+ name = parts[count]; \
if (!(name in seen)) { \
objs[i] = $$i; \
seen[name] = 1; \
toollib_DATA = $(CRT0) $(CRT1)
AWK_UNIQUE_OBJS = $(AWK) '{ \
for (i = NF; i > 0; --i) { \
- split($$i, parts, "/"); \
- name = parts[length(parts)]; \
+ count = split($$i, parts, "/"); \
+ name = parts[count]; \
if (!(name in seen)) { \
objs[i] = $$i; \
seen[name] = 1; \