diff options
author | David Wagner <david.wagner@intel.com> | 2014-08-26 15:18:15 +0200 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-10-24 16:49:33 +0200 |
commit | 5ada13f33b51f6ad88098d42d7c160db80e2a800 (patch) | |
tree | bcfc57a789f49027a0228c723e458cfabdb400ac | |
parent | e3ee81c3d0f2c7835ac191bf8f08a30de021f353 (diff) | |
download | external_parameter-framework-5ada13f33b51f6ad88098d42d7c160db80e2a800.zip external_parameter-framework-5ada13f33b51f6ad88098d42d7c160db80e2a800.tar.gz external_parameter-framework-5ada13f33b51f6ad88098d42d7c160db80e2a800.tar.bz2 |
Fix pthread compilation flags
According to the sem_init(3) manpage, we must pass the -pthread flag at
link-time when using it. When using pthread_join(3), this flag must also be
passed at compile time.
The flags were wrong for libremote-processor and were missing for
test-platform_host.
Change-Id: Iec2797592d6d25297c87ceb2983e87e75624a576
Signed-off-by: David Wagner <david.wagner@intel.com>
-rw-r--r-- | remote-processor/Android.mk | 15 | ||||
-rw-r--r-- | test/test-platform/Android.mk | 4 |
2 files changed, 12 insertions, 7 deletions
diff --git a/remote-processor/Android.mk b/remote-processor/Android.mk index 913f037..af5d06f 100644 --- a/remote-processor/Android.mk +++ b/remote-processor/Android.mk @@ -48,9 +48,11 @@ common_cflags := \ -Wall \ -Werror \ -Wextra \ - -Wno-unused-parameter + -Wno-unused-parameter \ + -pthread + +common_ldlibs := -pthread -common_ldlibs := -lpthread ############################# # Target build @@ -58,12 +60,11 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) -LOCAL_MODULE := $(common_module) -LOCAL_MODULE_TAGS := $(common_module_tags) - LOCAL_CFLAGS := $(common_cflags) +LOCAL_LDLIBS := $(common_ldlibs) -LOCAL_LDLIBS += $(common_ldlibs) +LOCAL_MODULE := $(common_module) +LOCAL_MODULE_TAGS := $(common_module_tags) include external/stlport/libstlport.mk include $(BUILD_SHARED_LIBRARY) @@ -76,10 +77,10 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := $(common_src_files) LOCAL_CFLAGS := $(common_cflags) +LOCAL_LDLIBS := $(common_ldlibs) LOCAL_MODULE := $(common_module)_host LOCAL_MODULE_TAGS := $(common_module_tags) -LOCAL_LDLIBS += $(common_ldlibs) include $(BUILD_HOST_SHARED_LIBRARY) diff --git a/test/test-platform/Android.mk b/test/test-platform/Android.mk index a0ad8ba..0f58393 100644 --- a/test/test-platform/Android.mk +++ b/test/test-platform/Android.mk @@ -43,6 +43,8 @@ common_c_includes := \ $(LOCAL_PATH)/../../parameter/include \ $(LOCAL_PATH)/../../remote-processor/ +common_ldlibs := -pthread + common_shared_libraries := libparameter libremote-processor ############################# # Target build @@ -55,6 +57,7 @@ LOCAL_MODULE:= $(common_module) LOCAL_MODULE_TAGS := $(common_module_tags) LOCAL_C_INCLUDES := $(common_c_includes) +LOCAL_LDLIBS := $(common_ldlibs) LOCAL_STATIC_LIBRARIES := libpfw_utility LOCAL_SHARED_LIBRARIES := $(common_shared_libraries) @@ -73,6 +76,7 @@ LOCAL_MODULE:= $(common_module)_host LOCAL_MODULE_TAGS := $(common_module_tags) LOCAL_C_INCLUDES += $(common_c_includes) +LOCAL_LDLIBS := $(common_ldlibs) LOCAL_STATIC_LIBRARIES := libpfw_utility_host LOCAL_SHARED_LIBRARIES := $(foreach shared_library, $(common_shared_libraries), \ |