Proper fix of debug build issue
authorPiotr Bartosiewicz <p.bartosiewi@partner.samsung.com>
Tue, 1 Apr 2014 14:25:43 +0000 (16:25 +0200)
committerJan Olszak <j.olszak@samsung.com>
Mon, 19 May 2014 11:47:15 +0000 (13:47 +0200)
[Bug/Feature]   Previous fix for build in debug mode issue was
                unnecessarily too complicated.
[Cause]         N/A
[Solution]      N/A
[Verification]  Build with --define "build_type DEBUG" gbs option

Change-Id: I83da147dc67ff62d851f14d7acc06b067fd0b15e

packaging/security-containers.spec

index 7991de6..e7df526 100644 (file)
@@ -33,11 +33,9 @@ between them. A process from inside a container can request a switch of context
 %build
 %{!?build_type:%define build_type "RELEASE"}
 
-%if %{build_type} == "DEBUG"
-    # workaround for a bug in build.conf
-    %global optflags %(echo %{optflags} | sed 's/-Wp,-D_FORTIFY_SOURCE=2//')
-    export CFLAGS=""
-    export CXXFLAGS=""
+%if %{build_type} == "DEBUG" || %{build_type} == "PROFILING"
+    CFLAGS="$CFLAGS -Wp,-U_FORTIFY_SOURCE"
+    CXXFLAGS="$CXXFLAGS -Wp,-U_FORTIFY_SOURCE"
 %endif
 
 %cmake . -DVERSION=%{version} \