[Slackbuilds-users] Modifying config.mk's CFLAGS variable

Tim Dickson dickson.tim at googlemail.com
Sat Apr 23 10:04:16 UTC 2022


for longer term solution submit a patch upstream. you might want to 
check the optimization flag because some applications don't run 
well/have runtime issues with some flags. In those cases you don't want 
to override them. (I have at least one package with that issue.)
Regards Tim

On 23/04/2022 05:53, Brandon Pribula wrote:
> Hi,
>
> I have a situation with an application I'm packaging. The CFLAGS 
> variable, et al in config.mk <http://config.mk> can't be prepended.
>
> CFLAGS = -std=c99 ...
>
> instead of
>
> CFLAGS += -std=c99 ...
>
> so as is I can't prepend $SLKFLAGS to $CFLAGS. It also contains an 
> optimization flag: -Os which conflicts with Slackware's.
>
> The solution I came up with is to change '=' to '+='
>
> sed -i '/CFLAGS/s/=/+=/' config.mk <http://config.mk>
>
> and remove the optimization flag -Os
>
> sed -i '/CFLAGS/s/-Os//' config.mk <http://config.mk>
>
> This works fine but I would like to know if there is a more preferable 
> solution with a slackbuild.
>
> Thanks
>
> _______________________________________________
> SlackBuilds-users mailing list
> SlackBuilds-users at slackbuilds.org
> https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users
> Archives -https://lists.slackbuilds.org/pipermail/slackbuilds-users/
> FAQ -https://slackbuilds.org/faq/
>


-- 
This email has been checked for viruses by AVG.
https://www.avg.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20220423/af19bddb/attachment.htm>


More information about the SlackBuilds-users mailing list