From 0e3269efdc21cf73689358b195c5744f6a219787 Mon Sep 17 00:00:00 2001 From: Steffen Dettmer Date: Wed, 8 Apr 2020 19:30:20 +0200 Subject: [PATCH] Added support for FAKETIME_LINK_FLAGS for #243. --- NEWS | 4 ++++ README.packagers | 3 ++- src/Makefile | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0161eb7..0c7fcd8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ + - Additional link-time LDFLAGS can be passed via the + environment variable FAKETIME_LINK_FLAGS when + running 'make'. + Since 0.9.8: - Compile-time CFLAG FAKE_SETTIME can be enabled to intercept calls to clock_settime(), settimeofday(), and diff --git a/README.packagers b/README.packagers index c61571e..d2ef290 100644 --- a/README.packagers +++ b/README.packagers @@ -42,7 +42,8 @@ variable, so for example FAKETIME_COMPILE_CFLAGS="-DFORCE_PTHREAD_NONVER" make test would create the libfaketime binaries and run the tests with the -FORCE_PTHREAD_NONVER flag set in a single step. +FORCE_PTHREAD_NONVER flag set in a single step. Likewise there is +FAKETIME_LINK_FLAGS. Please do not use FORCE_MONOTONIC_FIX by default, as it would result in incorrect operations on platforms that do not need it. diff --git a/src/Makefile b/src/Makefile index 4f67ca3..eb3d2a0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -79,7 +79,7 @@ endif LIB_LDFLAGS += -shared -LDFLAGS += -lpthread +LDFLAGS += $(FAKETIME_LINK_FLAGS) -lpthread ifneq ($(PLATFORM),SunOS) LDFLAGS += -Wl,--version-script=libfaketime.map endif