summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2014-06-19 13:16:08 +0200
committerJohn Crispin <blogic@openwrt.org>2014-06-19 14:37:13 +0200
commit8e12022c3d00f8acca4471016d71794988113c34 (patch)
tree2b0a464e8eca389ce5643e8e58ec540afff25a61
parentded9fec7e4afae14fe2821608c132325afd65b7e (diff)
downloadunitd-8e12022c3d00f8acca4471016d71794988113c34.tar
unitd-8e12022c3d00f8acca4471016d71794988113c34.zip
make static linking work for upgraded
Signed-off-by: John Crispin <blogic@openwrt.org>
-rw-r--r--CMakeLists.txt2
-rw-r--r--upgraded/CMakeLists.txt4
-rwxr-xr-xupgraded/upgradedbin887098 -> 0 bytes
3 files changed, 2 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1616b72..dc7ecd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,9 +21,7 @@ IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF()
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips")
add_subdirectory(upgraded)
-ENDIF()
ADD_EXECUTABLE(procd ${SOURCES})
TARGET_LINK_LIBRARIES(procd ${LIBS})
diff --git a/upgraded/CMakeLists.txt b/upgraded/CMakeLists.txt
index 7e08c0e..093dba2 100644
--- a/upgraded/CMakeLists.txt
+++ b/upgraded/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.6)
PROJECT(upgraded C)
ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
-set(CMAKE_EXE_LINKER_FLAGS -static)
+set(CMAKE_EXE_LINKER_FLAGS "-static -fPIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
@@ -11,7 +11,7 @@ set(CMAKE_SHARED_LIBRARY_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
ADD_EXECUTABLE(upgraded upgraded.c ../watchdog.c)
-TARGET_LINK_LIBRARIES(upgraded ubox rt)
+TARGET_LINK_LIBRARIES(upgraded ubox rt -lc -lgcc_pic)
INSTALL(TARGETS upgraded
RUNTIME DESTINATION sbin
)
diff --git a/upgraded/upgraded b/upgraded/upgraded
deleted file mode 100755
index a78470c..0000000
--- a/upgraded/upgraded
+++ /dev/null
Binary files differ