From cc48f4499a6b4d646c19b99c0905324161eb03ed Mon Sep 17 00:00:00 2001 From: Heiko Eissfeldt Date: Tue, 2 Jul 2019 20:20:07 +0200 Subject: add librt under NetBSD --- Makefile | 4 ++++ llvm_mode/Makefile | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 2075b90f..7acdd049 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,10 @@ ifneq "$(filter Linux GNU%,$(shell uname))" "" LDFLAGS += -ldl -lrt endif +ifeq "$(shell uname)" "NetBSD" + LDFLAGS += -lrt +endif + ifeq "$(findstring clang, $(shell $(CC) --version 2>/dev/null))" "" TEST_CC = afl-gcc else diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 9f3cd010..e2ed07d6 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -54,6 +54,9 @@ ifeq "$(shell uname)" "Darwin" CLANG_LFL += -Wl,-flat_namespace -Wl,-undefined,suppress endif +ifeq "$(shell uname)" "NetBSD" + LDFLAGS += -lrt +endif ifeq "$(shell echo '\#include XXX\#include XXX\#include XXXvoid main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, NULL);}' | sed 's/XXX/\n/g' | $(CC) -x c - -o .test2 && echo 1 || echo 0 )" "1" SHMAT_OK=1 -- cgit 1.4.1