aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2023-12-10 14:15:37 +0100
committerTormod Volden <debian.tormod@gmail.com>2023-12-10 17:29:13 +0100
commit52bb0ede722f3124777ba766bcdfac719bb2622b (patch)
tree598188123eeb93380058c18f88b56865229202b2
parent43db4d97d7eaaaa0f4e9c775bdd992b05351ef37 (diff)
downloadlibusb-52bb0ede722f3124777ba766bcdfac719bb2622b.tar.gz
tests: Use AM_LDFLAGS for -static flag to allow LDFLAGS override
Fixes the following warning from automake: tests/Makefile.am:3: warning: 'LDFLAGS' is a user variable, you should not override it; tests/Makefile.am:3: use 'AM_LDFLAGS' instead Also, since stress_mt_LDFLAGS is set (even in a conditional), AM_LDFLAGS will not be applied for stress_mt unless added explicitly. Closes #1371 Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
-rw-r--r--libusb/version_nano.h2
-rw-r--r--tests/Makefile.am5
2 files changed, 4 insertions, 3 deletions
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 856132c..cdab6d7 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11846
+#define LIBUSB_NANO 11847
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0fd4aa6..c39b2bb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
AM_CPPFLAGS = -I$(top_srcdir)/libusb
LDADD = ../libusb/libusb-1.0.la
-LDFLAGS = -static
+AM_LDFLAGS = -static
stress_SOURCES = stress.c testlib.c
stress_mt_SOURCES = stress_mt.c
@@ -10,13 +10,14 @@ macos_SOURCES = macos.c testlib.c
stress_mt_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
stress_mt_LDADD = $(LDADD) $(THREAD_LIBS)
+stress_mt_LDFLAGS = $(AM_LDFLAGS)
if OS_EMSCRIPTEN
# On the Web you can't block the main thread as this blocks the event loop itself,
# causing deadlocks when trying to use async APIs like WebUSB.
# We use the PROXY_TO_PTHREAD Emscripten's feature to move the main app to a separate thread
# where it can block safely.
-stress_mt_LDFLAGS = ${AM_LDFLAGS} -s PROXY_TO_PTHREAD -s EXIT_RUNTIME
+stress_mt_LDFLAGS += ${AM_LDFLAGS} -s PROXY_TO_PTHREAD -s EXIT_RUNTIME
endif
noinst_HEADERS = libusb_testlib.h