Permalink
Browse files

Explicitely link pthread

Gold linker requires explicit linking of pthread.

Open-webOS-DCO-1.0-Signed-off-by: Jose Dapena Paz <jose.dapena@palm.com>

Change-Id: I4fdd9871ac02077a8772ded242dd6be1613475db
  • Loading branch information...
1 parent d9c1f44 commit 8eee52baae537934eb01bbcceec09ce5caae3f53 @jdapena jdapena committed Nov 27, 2012
Showing with 5 additions and 2 deletions.
  1. +3 −0 CMakeLists.txt
  2. +2 −2 Makefile.Ubuntu
View
@@ -48,6 +48,8 @@ pkg_check_modules(DB8 REQUIRED db8)
include_directories(${DB8_INCLUDE_DIRS})
webos_add_compiler_flags(ALL ${DB8_CFLAGS_OTHER})
+find_library(PTHREAD pthread REQUIRED)
+
file(GLOB SOURCE_FILES src/*.cpp)
add_executable(configurator ${SOURCE_FILES} )
@@ -57,6 +59,7 @@ target_link_libraries(configurator
${GLIB2_LDFLAGS}
${LUNASERVICE_LDFLAGS}
${CJSON_LDFLAGS}
+ ${PTHREAD}
)
webos_configure_header_files(src)
View
@@ -1,11 +1,11 @@
BUILD_TYPE := debug
PLATFORM := linux-x86
OBJDIR := $(BUILD_TYPE)-$(PLATFORM)
-LOCAL_CFLAGS := -O0 -g -Wall -Werror -DDEBUG -DMOJ_LINUX -DMOJ_X86 -DMOJ_DEBUG $(shell pkg-config --cflags glib-2.0)
+LOCAL_CFLAGS := -O0 -g -Wall -Werror -DDEBUG -DMOJ_LINUX -DMOJ_X86 -DMOJ_DEBUG $(shell pkg-config --cflags glib-2.0) -pthread
LOCAL_CPPFLAGS := $(CFLAGS) -fno-rtti
BEDLAM_ROOT ?= /opt/Palm/luna/desktop-binaries
ARCH_LDFLAGS ?= -Wl,-rpath-link ${BEDLAM_ROOT}/lib
-LDFLAGS := $(ARCH_LDFLAGS) -L/home/user/eclipse/workspace/mojodb/debug-linux-x86 -L$(BEDLAM_ROOT)/lib
+LDFLAGS := $(ARCH_LDFLAGS) -L/home/user/eclipse/workspace/mojodb/debug-linux-x86 -L$(BEDLAM_ROOT)/lib -pthread
INCLUDES := \
-I$(BEDLAM_ROOT)/include \

0 comments on commit 8eee52b

Please sign in to comment.