using CC -dumpmachine instead of uname

This commit is contained in:
Maxim Devaev 2026-02-07 17:02:43 +02:00
parent 39c1916f61
commit 5e13f4cd58
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ _BUILD = build
# ===== # =====
ifneq ($(shell sh -c 'uname 2>/dev/null || echo Unknown'),FreeBSD) ifeq ($(findstring bsd,$(shell $(CC) -dumpmachine)),)
override _LDFLAGS += -latomic override _LDFLAGS += -latomic
endif endif

View File

@ -46,7 +46,7 @@ _OBJS = $(_USTR_SRCS:%.c=$(_BUILD)/%.o) $(_DUMP_SRCS:%.c=$(_BUILD)/%.o)
# ===== # =====
ifneq ($(shell sh -c 'uname 2>/dev/null || echo Unknown'),FreeBSD) ifeq ($(findstring bsd,$(shell $(CC) -dumpmachine)),)
override _USTR_LDFLAGS += -latomic override _USTR_LDFLAGS += -latomic
override _DUMP_LDFLAGS += -latomic override _DUMP_LDFLAGS += -latomic
override _V4P_LDFLAGS += -latomic override _V4P_LDFLAGS += -latomic
@ -78,7 +78,7 @@ endif
ifneq ($(MK_WITH_SETPROCTITLE),) ifneq ($(MK_WITH_SETPROCTITLE),)
override _CFLAGS += -DMK_WITH_SETPROCTITLE -DWITH_SETPROCTITLE override _CFLAGS += -DMK_WITH_SETPROCTITLE -DWITH_SETPROCTITLE
ifeq ($(shell uname -s | tr A-Z a-z),linux) ifneq ($(findstring linux,$(shell $(CC) -dumpmachine)),)
override _USTR_LDFLAGS += -lbsd override _USTR_LDFLAGS += -lbsd
endif endif
endif endif