<p></p>
<h3>Description</h3>
<p>I want to debug <code>Kamailio</code> using <code>GDB</code> and compiled sources on <code>aarch64</code> architecture (<code>t4g</code> AWS instance).<br>
But produces object files do not contain debug info.</p>
<p>Then executed</p>
<pre><code>make -n
</code></pre>
<p>And found that no <code>-g</code> options used during compilation.<br>
I have specified <code>CFLAGS</code> and <code>CPPFLAGS</code> but with wont help.</p>
<h3>Expected behavior</h3>
<p>On all dist used <code>-g</code> compilation flag by default.<br>
If I have specified <code>CFLAGS</code> and <code>CPPFLAGS</code> as environment variables, then these flags used by GCC during compilation.</p>
<h4>Actual observed behavior</h4>
<p><code>-g</code> flag do not used by default on <code>aarch64</code> architecture.<br>
<code>CFLAGS</code> and <code>CPPFLAGS</code> as environment variables do not used during compilation time.</p>
<h3>Additional info</h3>
<p>as hotfix I have used this patch</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/src/Makefile.defs b/src/Makefile.defs</span>
index 027c985798..c91c34a7bb 100644
<span class="pl-md">--- a/src/Makefile.defs</span>
<span class="pl-mi1">+++ b/src/Makefile.defs</span>
<span class="pl-mdr">@@ -885,7 +885,7 @@</span> endif

 ifeq ($(ARCH), aarch64)
        use_fast_lock=yes
<span class="pl-md"><span class="pl-md">-</span>       C_DEFS+=-DNOSMP # memory barriers not implemented for arm</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>       C_DEFS+= -g -DNOSMP # memory barriers not implemented for arm</span>
 endif

 ifeq ($(ARCH), ppc)</pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2789">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPCVZ2VZSD4QNMKXULTUWWK7ANCNFSM47LHPEGA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZM35IPNKKJ7TOKBSXDTUWWK7A5CNFSM47LHPEGKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4N3Y5BHA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2789",
"url": "https://github.com/kamailio/kamailio/issues/2789",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>