Skip to content

Commit 5e13f4c

Browse files
committed
using CC -dumpmachine instead of uname
1 parent 39c1916 commit 5e13f4c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

janus/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _BUILD = build
1919

2020

2121
# =====
22-
ifneq ($(shell sh -c 'uname 2>/dev/null || echo Unknown'),FreeBSD)
22+
ifeq ($(findstring bsd,$(shell $(CC) -dumpmachine)),)
2323
override _LDFLAGS += -latomic
2424
endif
2525

src/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _OBJS = $(_USTR_SRCS:%.c=$(_BUILD)/%.o) $(_DUMP_SRCS:%.c=$(_BUILD)/%.o)
4646

4747

4848
# =====
49-
ifneq ($(shell sh -c 'uname 2>/dev/null || echo Unknown'),FreeBSD)
49+
ifeq ($(findstring bsd,$(shell $(CC) -dumpmachine)),)
5050
override _USTR_LDFLAGS += -latomic
5151
override _DUMP_LDFLAGS += -latomic
5252
override _V4P_LDFLAGS += -latomic
@@ -78,7 +78,7 @@ endif
7878

7979
ifneq ($(MK_WITH_SETPROCTITLE),)
8080
override _CFLAGS += -DMK_WITH_SETPROCTITLE -DWITH_SETPROCTITLE
81-
ifeq ($(shell uname -s | tr A-Z a-z),linux)
81+
ifneq ($(findstring linux,$(shell $(CC) -dumpmachine)),)
8282
override _USTR_LDFLAGS += -lbsd
8383
endif
8484
endif

0 commit comments

Comments
 (0)