Skip to content

Commit

Permalink
Set AR similarly to CC.
Browse files Browse the repository at this point in the history
This mostly just moves the win32 AR setting into win32.tup, and makes
the structure mirror that of CC.
  • Loading branch information
gittup committed Apr 1, 2024
1 parent 628988f commit 748b7c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
31 changes: 13 additions & 18 deletions Tuprules.tup
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions win32.tup
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 748b7c7

Please sign in to comment.