From 4a23fc9bded92dbe398068ce5584d3e9e58f4a38 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Wed, 3 Apr 2013 11:29:07 -0700 Subject: Fix debuginfo generation There are two issues with apps/home/starter that are preventing debuginfo from being generated: - In the toplevel makefile, CMAKE_C_FLAGS does not include the '-g' flag, so debugging symbols are not added to the /usr/bin/starter binary. By using the %cmake macro in the spec file, the default CFLAGS from RPM (includes '-g') are exported to the build environment, and Cmake correctly uses these compiler flags during the build. - In lock-setting/lockscreen-options/CMakeLists.txt, CMAKE_CXX_FLAGS is used, but the three library source files are C source, not C++. Thus, CMAKE_CXX_FLAGS is undefined by default and does not include CXXFLAGS from the environment. The solution is to use CMAKE_C_FLAGS instead, which picks up CFLAGS from the environment. This commit fixes both issues. Change-Id: Ibe96bf8a34aab05d3cf29c02b33e881cc9eddaf3 Signed-off-by: Patrick McCarty --- lock-setting/lockscreen-options/CMakeLists.txt | 7 +++---- packaging/starter.spec | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) mode change 100755 => 100644 packaging/starter.spec diff --git a/lock-setting/lockscreen-options/CMakeLists.txt b/lock-setting/lockscreen-options/CMakeLists.txt index 09dde8d..719f98e 100755 --- a/lock-setting/lockscreen-options/CMakeLists.txt +++ b/lock-setting/lockscreen-options/CMakeLists.txt @@ -24,12 +24,11 @@ INCLUDE(FindPkgConfig) pkg_check_modules(pkgs_lock-screen-options REQUIRED elementary ui-gadget-1 edje evas ail capi-appfw-application) FOREACH(flag ${pkgs_lock-screen-options_CFLAGS}) - SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}") + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") ENDFOREACH(flag) -SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} -fvisibility=hidden -Wall") -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS}") -SET(CMAKE_C_FLAGS ${CMAKE_CXX_FLAGS}) +SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -Wall") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") diff --git a/packaging/starter.spec b/packaging/starter.spec old mode 100755 new mode 100644 index ec20f9b..3dbccff --- a/packaging/starter.spec +++ b/packaging/starter.spec @@ -47,7 +47,7 @@ Description: Starter %prep %setup -q -cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} +%cmake . %build -- cgit v1.2.3