Skip to content

Commit

Permalink
[gcc] Filter some opt flags. Contributes JB#47987
Browse files Browse the repository at this point in the history
  • Loading branch information
xfade committed Feb 10, 2020
1 parent 73f2cc3 commit dee3a79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gcc.spec
Expand Up @@ -539,12 +539,12 @@ mkdir obj-%{gcc_target_platform}
cd obj-%{gcc_target_platform}

OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_GLIBCXX_ASSERTIONS//g'`
#OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/\(-Wp,\)\?-D_GLIBCXX_ASSERTIONS//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
#OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security//g'`
#OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=format-security//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Werror=implicit-function-declaration//g'`
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wl,-z,defs -Wl,-z,now -Wl,-z,relro//g'`
#OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-Wl,-z,defs -Wl,-z,now -Wl,-z,relro//g'`
%ifarch %{ix86}
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
%endif
Expand Down

0 comments on commit dee3a79

Please sign in to comment.