shithub: openh264

Download patch

ref: 110f7c5bc42c47602fe8ac525267254314c3aa2a
parent: 5d335504fa9966abb0ef5a984a2c15f5a3d23c10
author: Martin Storsjö <martin@martin.st>
date: Mon Jan 2 08:55:35 EST 2017

Include -lpthread -lm in the pkg-config file when used as static library

When linking using the C++ frontend, -lm is included automatically,
but it has to be manually specified otherwise.

Likewise the -lpthread flag needs to be added in order to properly
link with the static library; it only worked previously if the user
included that flag already for some other reason.

--- a/build/platform-bsd.mk
+++ b/build/platform-bsd.mk
@@ -5,6 +5,7 @@
 SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
 CFLAGS += -fPIC
 LDFLAGS += -lpthread
+STATIC_LDFLAGS += -lpthread -lm
 ifeq ($(ASM_ARCH), x86)
 ifeq ($(ARCH), x86_64)
 ASMFLAGS += -f elf64
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -5,6 +5,7 @@
 SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXMAJORVER)
 CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
 LDFLAGS += -lpthread
+STATIC_LDFLAGS += -lpthread -lm
 AR_OPTS = crD $@
 ifeq ($(ASM_ARCH), x86)
 ifeq ($(ARCH), x86_64)