https://bugzilla.redhat.com/show_bug.cgi?id=1278676
--- Comment #5 from Ľuboš Kardoš lkardos@redhat.com --- (In reply to fujiwara from comment #4)
(In reply to Ľuboš Kardoš from comment #3)
You can do this with '--define "optflags `rpm -E %{optflags}` -g"'. If
The suggestion does not help my case since the default optflags includes "-O2".
That's not problem, you can override it with another option -O. From gdb man:
If you use multiple -O options, with or without level numbers, the last such option is the one that is effective.