<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 23, 2022, 3:04 AM Tim Dickson via SlackBuilds-users, <<a href="mailto:slackbuilds-users@slackbuilds.org">slackbuilds-users@slackbuilds.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div>
    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.)<br>
    Regards Tim<br>
    <br>
    <div>On 23/04/2022 05:53, Brandon Pribula
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">Hi,<br>
        <br>
        I have a situation with an application I'm packaging. The CFLAGS
        variable, et al in <a href="http://config.mk" target="_blank" rel="noreferrer">config.mk</a> can't be prepended.<br>
        <br>
        CFLAGS = -std=c99 ...<br>
        <br>
        instead of<br>
        <br>
        CFLAGS += -std=c99 ...<br>
        <br>
        so as is I can't prepend $SLKFLAGS to $CFLAGS. It also contains
        an optimization flag: -Os which conflicts with Slackware's.<br>
        <br>
        The solution I came up with is to change '=' to '+='<br>
        <br>
        sed -i '/CFLAGS/s/=/+=/' <a href="http://config.mk" target="_blank" rel="noreferrer">config.mk</a><br>
        <br>
        and remove the optimization flag -Os<br>
        <br>
        sed -i '/CFLAGS/s/-Os//' <a href="http://config.mk" target="_blank" rel="noreferrer">config.mk</a><br>
        <br>
        This works fine but I would like to know if there is a more
        preferable solution with a slackbuild.
        <div dir="auto"><br>
        </div>
        <div dir="auto">Thanks</div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
SlackBuilds-users mailing list
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank" rel="noreferrer">SlackBuilds-users@slackbuilds.org</a>
<a href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" target="_blank" rel="noreferrer">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a>
Archives - <a href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/" target="_blank" rel="noreferrer">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a>
FAQ - <a href="https://slackbuilds.org/faq/" target="_blank" rel="noreferrer">https://slackbuilds.org/faq/</a>

</pre>
    </blockquote>
    <br>
  <div id="m_9096267948796403190DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2">
<br><br>
<hr style="border:none;color:#909090;background-color:#b0b0b0;height:1px;width:99%">
<table style="border-collapse:collapse;border:none">
        <tbody><tr>
                <td style="border:none;padding:0px 15px 0px 8px">
                        <a href="https://www.avg.com/internet-security" target="_blank" rel="noreferrer">
                                <img border="0" src="https://static.avast.com/emails/avg-mail-stamp.png" alt="AVG logo">
                        </a>
                </td>
                <td>
                        <p style="color:#3d4d5a;font-family:"Calibri","Verdana","Arial","Helvetica";font-size:12pt">
                                This email has been checked for viruses by AVG antivirus software.
                                <br><a href="https://www.avg.com/internet-security" target="_blank" rel="noreferrer">www.avg.com</a>
                        </p>
                </td>
        </tr>
</tbody></table>
<br>
<a href="#m_9096267948796403190_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1" rel="noreferrer"> </a></div></div>

_______________________________________________<br>
SlackBuilds-users mailing list<br>
<a href="mailto:SlackBuilds-users@slackbuilds.org" target="_blank" rel="noreferrer">SlackBuilds-users@slackbuilds.org</a><br>
<a href="https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users" rel="noreferrer noreferrer" target="_blank">https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users</a><br>
Archives - <a href="https://lists.slackbuilds.org/pipermail/slackbuilds-users/" rel="noreferrer noreferrer" target="_blank">https://lists.slackbuilds.org/pipermail/slackbuilds-users/</a><br>
FAQ - <a href="https://slackbuilds.org/faq/" rel="noreferrer noreferrer" target="_blank">https://slackbuilds.org/faq/</a></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Thanks for the reply, Tim.</div><div dir="auto"><br></div><div dir="auto">The optimization it uses is -Os, which is optimize for size. I will test more tomorrow with and without that flag but I will probably just keep it as upstream intended.</div></div>