[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
%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} \