From edf53ed2849a0b425d2ae2dd60860ed1f0830fa8 Mon Sep 17 00:00:00 2001 From: Kalle Vahlman Date: Sat, 1 Jan 2000 04:10:59 +0000 Subject: Fix linking issue by forcing pthread into ELF DT_NEEDED tag For some reason giving --as-needed for the linker drops pthread from the hdmiservice.so DT_NEEDED tag, while it clearly requires it since the final link fails to find pthread symbols. Work around this by adding --no-as-needed to the LDFLAGS. --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 957550f..d956aa9 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,9 @@ PACKAGE_NAME=hdmi_service CFLAGS += -c -Wall -O2 -fPIC -LDFLAGS += -L./ -lpthread -shared +# no-as-needed is a work-around, pthread is dropped from the DT_NEEDED +# for some reason, and yet the final link fails due to missing symbols +LDFLAGS += -L./ -Wl,--no-as-needed -lpthread -shared LDFLAGS_2 = -L./ INCLUDES += -I./include HDMILIBS = hdmiservice.so -- cgit v1.2.3