From 748b7c7dd2ae1f77a24719f356b89343162ed4bd Mon Sep 17 00:00:00 2001 From: Mike Shal Date: Mon, 1 Apr 2024 15:43:57 -0700 Subject: [PATCH] Set AR similarly to CC. This mostly just moves the win32 AR setting into win32.tup, and makes the structure mirror that of CC. --- Tuprules.tup | 31 +++++++++++++------------------ win32.tup | 1 + 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Tuprules.tup b/Tuprules.tup index 907befbf1..3b774373e 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -21,24 +21,6 @@ CFLAGS += -fsanitize=undefined LDFLAGS += -lubsan endif -ifdef AR -AR = @(AR) -else -ifeq ($(TARGET),win32) -AR = x86_64-w64-mingw32-ar -else -AR = ar -endif -endif - -# Override AR settings if being built with busybox kconfig -ifeq ($(AR),y) -AR = ar -endif -ifeq ($(AR),n) -AR = ar -endif - CFLAGS += -W CFLAGS += -Wall ifeq (@(TUP_WERROR),y) @@ -81,6 +63,7 @@ endif # included $(TARGET).tup file, and can be overridden by the user in the # tup.config file by setting CONFIG_CC (and/or CONFIG_CC32 on Windows). CC = gcc +AR = ar TUP_MONITOR = null TUP_SUID_GROUP = root @@ -95,6 +78,18 @@ ifdef CC32 CC32 = @(CC32) endif +ifdef AR +AR = @(AR) +endif + +# Override AR settings if being built with busybox kconfig +ifeq ($(AR),y) +AR = ar +endif +ifeq ($(AR),n) +AR = ar +endif + ifdef TUP_USE_SYSTEM_PCRE use_system_pcre = @(TUP_USE_SYSTEM_PCRE) else diff --git a/win32.tup b/win32.tup index ddce44ad6..69e3bd5c1 100644 --- a/win32.tup +++ b/win32.tup @@ -1,5 +1,6 @@ CC = x86_64-w64-mingw32-gcc CC32 = i686-w64-mingw32-gcc +AR = x86_64-w64-mingw32-ar # Compatibility function prototypes and include path for wrapper functions CFLAGS += -include $(TUP_CWD)/src/compat/win32/mingw.h