Merge pull request #390 from devnexen/obsd_no_retpoline

OpenBSD build update and llvm mode fix
This commit is contained in:
hexcoder
2020-06-03 18:32:44 +02:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@ -100,7 +100,7 @@ ifeq "$(shell uname -s)" "DragonFly"
endif endif
ifeq "$(shell uname -s)" "OpenBSD" ifeq "$(shell uname -s)" "OpenBSD"
override CFLAGS += -I /usr/local/include/ override CFLAGS += -I /usr/local/include/ -mno-retpoline
LDFLAGS += -Wl,-z,notext -L /usr/local/lib/ LDFLAGS += -Wl,-z,notext -L /usr/local/lib/
endif endif

View File

@ -226,6 +226,10 @@ endif
ifeq "$(shell uname)" "OpenBSD" ifeq "$(shell uname)" "OpenBSD"
CLANG_LFL += `$(LLVM_CONFIG) --libdir`/libLLVM.so CLANG_LFL += `$(LLVM_CONFIG) --libdir`/libLLVM.so
CLANG_CFL += -mno-retpoline
CFLAGS += -mno-retpoline
# Needed for unwind symbols
LDFLAGS += -lc++abi
endif endif
ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1" ifeq "$(shell echo '$(HASH)include <sys/ipc.h>@$(HASH)include <sys/shm.h>@int main() { int _id = shmget(IPC_PRIVATE, 65536, IPC_CREAT | IPC_EXCL | 0600); shmctl(_id, IPC_RMID, 0); return 0;}' | tr @ '\n' | $(CC) -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"