Skip to content

Commit

Permalink
[build] Remove separate invocations of ranlib
Browse files Browse the repository at this point in the history
All relevant versions of "ar" are capable of generating the index,
without requiring a separate invocation of "ranlib".

Signed-off-by: Michael Brown <[email protected]>
  • Loading branch information
mcb30 committed Dec 6, 2023
1 parent 369b00b commit 7ef1d0a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ CC_i386 = $(CROSS_i386)gcc
AS_i386 = $(CROSS_i386)as
LD_i386 = $(CROSS_i386)ld
AR_i386 = $(CROSS_i386)ar
RANLIB_i386 = $(CROSS_i386)ranlib
OBJCOPY_i386 = $(CROSS_i386)objcopy

# Build tools for x86_64 target
Expand All @@ -52,7 +51,6 @@ CC_x86_64 = $(CROSS_x86_64)gcc
AS_x86_64 = $(CROSS_x86_64)as
LD_x86_64 = $(CROSS_x86_64)ld
AR_x86_64 = $(CROSS_x86_64)ar
RANLIB_x86_64 = $(CROSS_x86_64)ranlib
OBJCOPY_x86_64 = $(CROSS_x86_64)objcopy

# Build tools for arm64 target
Expand All @@ -61,7 +59,6 @@ CC_arm64 = $(CROSS_arm64)gcc
AS_arm64 = $(CROSS_arm64)as
LD_arm64 = $(CROSS_arm64)ld
AR_arm64 = $(CROSS_arm64)ar
RANLIB_arm64 = $(CROSS_arm64)ranlib
OBJCOPY_arm64 = $(CROSS_arm64)objcopy

# Build flags for host binaries
Expand Down Expand Up @@ -202,8 +199,7 @@ wimboot.cab : wimboot.i386.efi wimboot.x86_64.efi wimboot.arm64.efi Makefile

lib.i386.a : $(OBJECTS_i386) Makefile
$(RM) -f $@
$(AR_i386) r $@ $(OBJECTS_i386)
$(RANLIB_i386) $@
$(AR_i386) -r -s $@ $(OBJECTS_i386)

###############################################################################
#
Expand All @@ -230,8 +226,7 @@ lib.i386.a : $(OBJECTS_i386) Makefile

lib.x86_64.a : $(OBJECTS_x86_64) $(OBJECTS_i386_x86_64) Makefile
$(RM) -f $@
$(AR_x86_64) r $@ $(OBJECTS_x86_64) $(OBJECTS_i386_x86_64)
$(RANLIB_x86_64) $@
$(AR_x86_64) -r -s $@ $(OBJECTS_x86_64) $(OBJECTS_i386_x86_64)

###############################################################################
#
Expand All @@ -248,8 +243,7 @@ lib.x86_64.a : $(OBJECTS_x86_64) $(OBJECTS_i386_x86_64) Makefile

lib.arm64.a : $(OBJECTS_arm64) Makefile
$(RM) -f $@
$(AR_arm64) r $@ $(OBJECTS_arm64)
$(RANLIB_arm64) $@
$(AR_arm64) -r -s $@ $(OBJECTS_arm64)

###############################################################################
#
Expand Down

0 comments on commit 7ef1d0a

Please sign in to comment.