From 8eecdc92578d5bc0119b12ba77a7b40808e6e567 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 18 Oct 2002 23:03:14 +0000 Subject: This patch, based on a patch from Stefan Allius, lets us pick an appropriate awk implementation at compile time, so we can again compile on Solaris and whatnot. -Erik --- Rules.mak | 3 +++ libc/sysdeps/linux/common/Makefile | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Rules.mak b/Rules.mak index 41d41c924..e8745a14a 100644 --- a/Rules.mak +++ b/Rules.mak @@ -37,6 +37,9 @@ UCLIBC_LDSO:=ld-uClibc.so.$(MAJOR_VERSION) LIBC:=$(TOPDIR)libc/libc.a LIBGCC:=$(shell $(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name) +# check if we have nawk, otherwise user awk +AWK:= ${shell if [ -x /usr/bin/nawk ]; then echo "/usr/bin/nawk"; else echo "/usr/bin/awk"; fi} + NATIVE_ARCH:= ${shell uname -m | sed \ -e 's/i.86/i386/' \ -e 's/sparc.*/sparc/' \ diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile index 79bccadf0..d91b4981d 100644 --- a/libc/sysdeps/linux/common/Makefile +++ b/libc/sysdeps/linux/common/Makefile @@ -64,7 +64,7 @@ initfini.s: initfini.c $(CC) $(SAFECFLAGS) -I$(TOPDIR)include -c initfini.c -S -o initfini.s crti.S crtn.S: initfini.s $(TOPDIR)/extra/scripts/initfini.awk - $(TOPDIR)/extra/scripts/initfini.awk initfini.s + $(AWK) -f $(TOPDIR)extra/scripts/initfini.awk initfini.s crti.o: crti.S $(CC) $(SAFECFLAGS) -c crti.S -o crti.o @@ -81,5 +81,5 @@ $(TOPDIR)lib/crtn.o: crtn.o cp crtn.o $(TOPDIR)lib/ clean: - rm -f *.[oa] *~ core crti.* crtn.* initfini.s + rm -f *.[oa] *~ core crt[in].* initfini.s -- cgit v1.2.3