On Mon, Aug 16, 2021 at 3:32 PM Julian Sikorski
<belegdol(a)gmail.com> wrote:
>
> W dniu 16.08.2021 o 21:24, Neal Gompa pisze:
>> On Mon, Aug 16, 2021 at 3:14 PM Julian Sikorski <belegdol(a)gmail.com>
wrote:
>>>
>>> Hi,
>>>
>>> mame needs to have the symbols level reduced to -g1 or the compilation
>>> will fail due to relocation overflows and generally excessive memory and
>>> disk space usage. Right now this is taken care of by editing $RPM_OPT_FLAGS:
>>>
https://src.fedoraproject.org/rpms/mame/blob/30873dfe8d2ab851bb018b7a1049...
>>> Upstream are considering switching to cmake, which is going to render
>>> this approach inoperable. Is there a preferred way of editing the flags
>>> used by %cmake macro? Thanks!
>>>
>>
>> Overriding the %build_cflags and %build_cxxflags macros is sufficient here.
>>
>>
>>
> Thanks! And what is the recommended way of doing this? Just defining it
> in the spec?
> The advantage of the approach used until now is that it only drops -g(2)
> to -g1, leaving other flags intact.
>
Do it the same way you're doing it now, just change $() for %().
I must be having a short between the headphones:
%global build_cflags %(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@")
%global build_cxxflags %(echo $RPM_OPT_FLAGS | sed "s@-g@-g1@")
this results in no flags being passed to cmake whatsoever.