From 0f47876d2e8e5c87c44b4731a37e817095f4285e Mon Sep 17 00:00:00 2001 From: whitequark Date: Sun, 26 Jul 2015 03:20:23 +0300 Subject: [PATCH] common.mak: remove RANLIB. `ranlib` is not necessary on any system we can possibly build for, as it is superseded by `ar s` for the last ten years or so (at least). Thus, change ar invocations to `ar crs`, also removing a `l` flag that is ignored by binutils. --- software/common.mak | 4 ---- software/libbase/Makefile | 6 ++---- software/libcompiler-rt/Makefile | 3 +-- software/libnet/Makefile | 3 +-- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/software/common.mak b/software/common.mak index 8131bfd14..11c29683b 100644 --- a/software/common.mak +++ b/software/common.mak @@ -8,14 +8,12 @@ CX_normal := $(TARGET_PREFIX)g++ AR_normal := $(TARGET_PREFIX)ar LD_normal := $(TARGET_PREFIX)ld OBJCOPY_normal := $(TARGET_PREFIX)objcopy -RANLIB_normal := $(TARGET_PREFIX)ranlib CC_quiet = @echo " CC " $@ && $(TARGET_PREFIX)gcc CX_quiet = @echo " CX " $@ && $(TARGET_PREFIX)g++ AR_quiet = @echo " AR " $@ && $(TARGET_PREFIX)ar LD_quiet = @echo " LD " $@ && $(TARGET_PREFIX)ld OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(TARGET_PREFIX)objcopy -RANLIB_quiet = @echo " RANLIB " $@ && $(TARGET_PREFIX)ranlib MSC_GIT_ID := $(shell cd $(MSCDIR) && python3 -c "from misoclib.cpu.identifier import get_id; print(hex(get_id()), end='')") @@ -25,14 +23,12 @@ ifeq ($(V),1) AR = $(AR_normal) LD = $(LD_normal) OBJCOPY = $(OBJCOPY_normal) - RANLIB = $(RANLIB_normal) else CC = $(CC_quiet) CX = $(CX_quiet) AR = $(AR_quiet) LD = $(LD_quiet) OBJCOPY = $(OBJCOPY_quiet) - RANLIB = $(RANLIB_quiet) endif # Toolchain options diff --git a/software/libbase/Makefile b/software/libbase/Makefile index 500847522..c1f2434df 100644 --- a/software/libbase/Makefile +++ b/software/libbase/Makefile @@ -9,12 +9,10 @@ all: crt0-$(CPU).o libbase.a libbase-nofloat.a -include $(OBJECTS:.o=.d) libbase.a: $(OBJECTS) vsnprintf.o - $(AR) clr libbase.a $(OBJECTS) vsnprintf.o - $(RANLIB) libbase.a + $(AR) crs libbase.a $(OBJECTS) vsnprintf.o libbase-nofloat.a: $(OBJECTS) vsnprintf-nofloat.o - $(AR) clr libbase-nofloat.a $(OBJECTS) vsnprintf-nofloat.o - $(RANLIB) libbase-nofloat.a + $(AR) crs libbase-nofloat.a $(OBJECTS) vsnprintf-nofloat.o vsnprintf-nofloat.o: vsnprintf.c $(call compile-dep,-DNO_FLOAT) diff --git a/software/libcompiler-rt/Makefile b/software/libcompiler-rt/Makefile index 39c367d8d..917c0aee4 100644 --- a/software/libcompiler-rt/Makefile +++ b/software/libcompiler-rt/Makefile @@ -13,8 +13,7 @@ all: libcompiler-rt.a -include $(OBJECTS:.o=.d) libcompiler-rt.a: $(OBJECTS) - $(AR) clr libcompiler-rt.a $(OBJECTS) - $(RANLIB) libcompiler-rt.a + $(AR) crs libcompiler-rt.a $(OBJECTS) %.o: $(MSCDIR)/software/compiler-rt/lib/builtins/%.c $(compile-dep) diff --git a/software/libnet/Makefile b/software/libnet/Makefile index ad6a0473c..dc2a28362 100644 --- a/software/libnet/Makefile +++ b/software/libnet/Makefile @@ -9,8 +9,7 @@ all: libnet.a -include $(OBJECTS:.o=.d) libnet.a: $(OBJECTS) - $(AR) clr libnet.a $(OBJECTS) - $(RANLIB) libnet.a + $(AR) crs libnet.a $(OBJECTS) %.o: %.c $(compile-dep)