<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/ReklatsMasters">Dmitry Tsvettsikh</a>
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1389#note_510920946">commented</a>:
</p>
<div style="">
<p dir="auto"><a href="https://gitlab.com/ametzler" data-user="301779" data-reference-type="user" data-container="body" data-placement="top" class="gfm gfm-project_member js-user-link" title="Andreas Metzler">@ametzler</a> here is my test case. <code>HOGWEED_LIBS="-L${ROOT_DIR}/dependencies/lib -lhogweed -lgmp" \</code> is hotfix for this bug, this should be whithout <code>-lgmp</code>.</p>
<pre class="code highlight js-syntax-highlight make" lang="make" v-pre="true"><code><span id="LC1" class="line" lang="make"><span class="c"># Source</span></span>
<span id="LC2" class="line" lang="make"><span class="nv">ARCHIVE_GNUTLS</span><span class="o">=</span>https://www.gnupg.org/ftp/gcrypt/gnutls/v3.6/gnutls-3.6.15.tar.xz</span>
<span id="LC3" class="line" lang="make"><span class="nv">ARCHIVE_LIBTASN</span><span class="o">=</span>https://ftp.gnu.org/gnu/libtasn1/libtasn1-4.16.0.tar.gz</span>
<span id="LC4" class="line" lang="make"><span class="nv">ARCHIVE_NETTLE</span><span class="o">=</span>https://ftp.gnu.org/gnu/nettle/nettle-3.7.tar.gz</span>
<span id="LC5" class="line" lang="make"><span class="nv">ARCHIVE_GMPLIB</span><span class="o">=</span>https://gmplib.org/download/gmp/gmp-6.2.1.tar.xz</span>
<span id="LC6" class="line" lang="make"></span>
<span id="LC7" class="line" lang="make"><span class="c"># Build</span></span>
<span id="LC8" class="line" lang="make"><span class="nv">ROOT_DIR</span><span class="o">=</span><span class="nv">${PWD}</span></span>
<span id="LC9" class="line" lang="make"><span class="nv">MAKE</span><span class="o">=</span>make</span>
<span id="LC10" class="line" lang="make"><span class="nv">CFLAGS</span><span class="o">=</span><span class="s2">"-O3"</span></span>
<span id="LC11" class="line" lang="make"><span class="nv">CONFIGURE</span><span class="o">=</span>./configure <span class="nv">CFLAGS</span><span class="o">=</span><span class="nv">${CFLAGS}</span> <span class="nt">--prefix</span><span class="o">=</span><span class="nv">${ROOT_DIR}</span>/dependencies <span class="nt">--disable-shared</span></span>
<span id="LC12" class="line" lang="make"><span class="nv">CURL</span><span class="o">=</span>curl <span class="nt">-s</span></span>
<span id="LC13" class="line" lang="make"><span class="nv">EXTRACT_XZ</span><span class="o">=</span><span class="nb">tar</span> <span class="nt">-xJ</span></span>
<span id="LC14" class="line" lang="make"><span class="nv">EXTRACT_GZ</span><span class="o">=</span><span class="nb">tar</span> <span class="nt">-xz</span></span>
<span id="LC15" class="line" lang="make"><span class="nv">EMCC_DEBUG</span><span class="o">=</span>0</span>
<span id="LC16" class="line" lang="make"></span>
<span id="LC17" class="line" lang="make"><span class="nl">all</span><span class="o">:</span> <span class="nf">gnutls</span></span>
<span id="LC18" class="line" lang="make"></span>
<span id="LC19" class="line" lang="make"><span class="nl">clean</span><span class="o">:</span></span>
<span id="LC20" class="line" lang="make">   <span class="nb">rm</span> <span class="nt">-rf</span> gnutls-3.6.15 gmp-6.2.1 nettle-3.7 libtasn1-4.16.0 dependencies</span>
<span id="LC21" class="line" lang="make"></span>
<span id="LC22" class="line" lang="make"><span class="c"># gmp</span></span>
<span id="LC23" class="line" lang="make"></span>
<span id="LC24" class="line" lang="make"><span class="nl">gmp-6.2.1/configure</span><span class="o">:</span></span>
<span id="LC25" class="line" lang="make">   <span class="nv">${CURL}</span> <span class="nv">${ARCHIVE_GMPLIB}</span> | <span class="nv">${EXTRACT_XZ}</span></span>
<span id="LC26" class="line" lang="make"></span>
<span id="LC27" class="line" lang="make"><span class="nl">gmp-6.2.1/Makefile</span><span class="o">:</span> <span class="nf">gmp-6.2.1/configure</span></span>
<span id="LC28" class="line" lang="make">   <span class="nb">cd </span>gmp-6.2.1 <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC29" class="line" lang="make">   <span class="nv">${CONFIGURE}</span> <span class="se">\</span></span>
<span id="LC30" class="line" lang="make">           <span class="nt">--prefix</span><span class="o">=</span><span class="nv">${ROOT_DIR}</span>/dependencies <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC31" class="line" lang="make">   <span class="nb">cd</span> -</span>
<span id="LC32" class="line" lang="make"></span>
<span id="LC33" class="line" lang="make"><span class="nl">dependencies/lib/libgmp.a</span><span class="o">:</span> <span class="nf">gmp-6.2.1/Makefile</span></span>
<span id="LC34" class="line" lang="make">   <span class="nb">cd </span>gmp-6.2.1 <span class="o">&&</span> <span class="nv">${MAKE}</span> <span class="nb">install</span> <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC35" class="line" lang="make"></span>
<span id="LC36" class="line" lang="make"><span class="nl">gmp</span><span class="o">:</span> <span class="nf">dependencies/lib/libgmp.a</span></span>
<span id="LC37" class="line" lang="make"></span>
<span id="LC38" class="line" lang="make"><span class="c"># libtasn1</span></span>
<span id="LC39" class="line" lang="make"></span>
<span id="LC40" class="line" lang="make"><span class="nl">libtasn1-4.16.0/configure</span><span class="o">:</span></span>
<span id="LC41" class="line" lang="make">   <span class="nv">${CURL}</span> <span class="nv">${ARCHIVE_LIBTASN}</span> | <span class="nv">${EXTRACT_GZ}</span></span>
<span id="LC42" class="line" lang="make"></span>
<span id="LC43" class="line" lang="make"><span class="nl">libtasn1-4.16.0/Makefile</span><span class="o">:</span> <span class="nf">libtasn1-4.16.0/configure</span></span>
<span id="LC44" class="line" lang="make">   <span class="nb">cd </span>libtasn1-4.16.0 <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC45" class="line" lang="make">   <span class="nv">${CONFIGURE}</span> <span class="se">\</span></span>
<span id="LC46" class="line" lang="make">           <span class="nt">--disable-doc</span> <span class="se">\</span></span>
<span id="LC47" class="line" lang="make">           <span class="nt">--disable-valgrind-tests</span> <span class="se">\</span></span>
<span id="LC48" class="line" lang="make">           <span class="nt">--prefix</span><span class="o">=</span><span class="nv">${ROOT_DIR}</span>/dependencies <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC49" class="line" lang="make">   <span class="nb">cd</span> -</span>
<span id="LC50" class="line" lang="make"></span>
<span id="LC51" class="line" lang="make"><span class="nl">dependencies/lib/libtasn1.a</span><span class="o">:</span> <span class="nf">libtasn1-4.16.0/Makefile</span></span>
<span id="LC52" class="line" lang="make">   <span class="nb">cd </span>libtasn1-4.16.0 <span class="o">&&</span> <span class="nv">${MAKE}</span> <span class="nb">install</span> <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC53" class="line" lang="make"></span>
<span id="LC54" class="line" lang="make"><span class="nl">asn1</span><span class="o">:</span> <span class="nf">dependencies/lib/libtasn1.a</span></span>
<span id="LC55" class="line" lang="make"></span>
<span id="LC56" class="line" lang="make"><span class="c"># nettle</span></span>
<span id="LC57" class="line" lang="make"></span>
<span id="LC58" class="line" lang="make"><span class="nl">nettle-3.7/configure</span><span class="o">:</span></span>
<span id="LC59" class="line" lang="make">   <span class="nv">${CURL}</span> <span class="nv">${ARCHIVE_NETTLE}</span> | <span class="nv">${EXTRACT_GZ}</span></span>
<span id="LC60" class="line" lang="make"></span>
<span id="LC61" class="line" lang="make"><span class="nl">nettle-3.7/Makefile</span><span class="o">:</span> <span class="nf">nettle-3.7/configure dependencies/lib/libgmp.a</span></span>
<span id="LC62" class="line" lang="make">   <span class="nb">cd </span>nettle-3.7 <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC63" class="line" lang="make">   <span class="nv">${CONFIGURE}</span> <span class="se">\</span></span>
<span id="LC64" class="line" lang="make">           <span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib"</span> <span class="se">\</span></span>
<span id="LC65" class="line" lang="make">           <span class="nv">LIBS</span><span class="o">=</span><span class="s2">"-lgmp"</span> <span class="se">\</span></span>
<span id="LC66" class="line" lang="make">           <span class="nt">--disable-documentation</span> <span class="se">\</span></span>
<span id="LC67" class="line" lang="make">           <span class="nt">--enable-x86-aesni</span> <span class="se">\</span></span>
<span id="LC68" class="line" lang="make">           <span class="nt">--enable-public-key</span> <span class="se">\</span></span>
<span id="LC69" class="line" lang="make">           <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC70" class="line" lang="make"></span>
<span id="LC71" class="line" lang="make"><span class="nl">dependencies/lib/libnettle.a</span><span class="o">:</span> <span class="nf">nettle-3.7/Makefile</span></span>
<span id="LC72" class="line" lang="make">   <span class="nb">cd </span>nettle-3.7 <span class="o">&&</span> <span class="nv">${MAKE}</span> <span class="nb">install</span> <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC73" class="line" lang="make"></span>
<span id="LC74" class="line" lang="make"><span class="nl">nettle</span><span class="o">:</span> <span class="nf">dependencies/lib/libnettle.a</span></span>
<span id="LC75" class="line" lang="make"></span>
<span id="LC76" class="line" lang="make"><span class="c"># gnutls</span></span>
<span id="LC77" class="line" lang="make"></span>
<span id="LC78" class="line" lang="make"><span class="nl">gnutls-3.6.15/configure</span><span class="o">:</span></span>
<span id="LC79" class="line" lang="make">   <span class="nv">${CURL}</span> <span class="nv">${ARCHIVE_GNUTLS}</span> | <span class="nv">${EXTRACT_XZ}</span></span>
<span id="LC80" class="line" lang="make"></span>
<span id="LC81" class="line" lang="make"><span class="nl">gnutls-3.6.15/Makefile</span><span class="o">:</span> <span class="nf">gnutls-3.6.15/configure dependencies/lib/libnettle.a dependencies/lib/libtasn1.a dependencies/lib/libgmp.a</span></span>
<span id="LC82" class="line" lang="make">   <span class="nb">cd </span>gnutls-3.6.15 <span class="o">&&</span> <span class="se">\</span></span>
<span id="LC83" class="line" lang="make">   <span class="nv">${CONFIGURE}</span> <span class="se">\</span></span>
<span id="LC84" class="line" lang="make">           <span class="nv">NETTLE_CFLAGS</span><span class="o">=</span><span class="s2">"-I</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/include"</span> <span class="se">\</span></span>
<span id="LC85" class="line" lang="make">           <span class="nv">NETTLE_LIBS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib -lnettle"</span> <span class="se">\</span></span>
<span id="LC86" class="line" lang="make">           <span class="nv">HOGWEED_CFLAGS</span><span class="o">=</span><span class="s2">"-I</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/include"</span> <span class="se">\</span></span>
<span id="LC87" class="line" lang="make">           <span class="nv">HOGWEED_LIBS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib -lhogweed -lgmp"</span> <span class="se">\</span></span>
<span id="LC88" class="line" lang="make">           <span class="nv">GMP_CFLAGS</span><span class="o">=</span><span class="s2">"-I</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/include"</span> <span class="se">\</span></span>
<span id="LC89" class="line" lang="make">           <span class="nv">GMP_LIBS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib -lgmp"</span> <span class="se">\</span></span>
<span id="LC90" class="line" lang="make">           <span class="nv">LIBTASN1_CFLAGS</span><span class="o">=</span><span class="s2">"-I</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/include"</span> <span class="se">\</span></span>
<span id="LC91" class="line" lang="make">           <span class="nv">LIBTASN1_LIBS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib -ltasn1"</span> <span class="se">\</span></span>
<span id="LC92" class="line" lang="make">           <span class="nv">LDFLAGS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">${ROOT_DIR}</span><span class="s2">/dependencies/lib"</span> <span class="se">\</span></span>
<span id="LC93" class="line" lang="make">           <span class="nt">--disable-maintainer-mode</span> <span class="se">\</span></span>
<span id="LC94" class="line" lang="make">           <span class="nt">--disable-doc</span> <span class="se">\</span></span>
<span id="LC95" class="line" lang="make">           <span class="nt">--disable-tools</span> <span class="se">\</span></span>
<span id="LC96" class="line" lang="make">           <span class="nt">--disable-cxx</span> <span class="se">\</span></span>
<span id="LC97" class="line" lang="make">           <span class="nt">--disable-ssl3-support</span> <span class="se">\</span></span>
<span id="LC98" class="line" lang="make">           <span class="nt">--disable-ssl2-support</span> <span class="se">\</span></span>
<span id="LC99" class="line" lang="make">           <span class="nt">--disable-tests</span> <span class="se">\</span></span>
<span id="LC100" class="line" lang="make">          <span class="nt">--disable-valgrind-tests</span> <span class="se">\</span></span>
<span id="LC101" class="line" lang="make">          <span class="nt">--disable-full-test-suite</span> <span class="se">\</span></span>
<span id="LC102" class="line" lang="make">          <span class="nt">--disable-rpath</span> <span class="se">\</span></span>
<span id="LC103" class="line" lang="make">          <span class="nt">--disable-libtool-lock</span> <span class="se">\</span></span>
<span id="LC104" class="line" lang="make">          <span class="nt">--disable-libdane</span> <span class="se">\</span></span>
<span id="LC105" class="line" lang="make">          <span class="nt">--with-included-unistring</span> <span class="se">\</span></span>
<span id="LC106" class="line" lang="make">          <span class="nt">--without-zlib</span> <span class="se">\</span></span>
<span id="LC107" class="line" lang="make">          <span class="nt">--without-libz-prefix</span> <span class="se">\</span></span>
<span id="LC108" class="line" lang="make">          <span class="nt">--without-idn</span> <span class="se">\</span></span>
<span id="LC109" class="line" lang="make">          <span class="nt">--without-libidn2</span> <span class="se">\</span></span>
<span id="LC110" class="line" lang="make">          <span class="nt">--without-tpm</span> <span class="se">\</span></span>
<span id="LC111" class="line" lang="make">          <span class="nt">--without-p11-kit</span> <span class="se">\</span></span>
<span id="LC112" class="line" lang="make">          <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC113" class="line" lang="make"></span>
<span id="LC114" class="line" lang="make"><span class="nl">dependencies/lib/libgnutls.a</span><span class="o">:</span> <span class="nf">gnutls-3.6.15/Makefile</span></span>
<span id="LC115" class="line" lang="make">  <span class="nb">cd </span>gnutls-3.6.15 <span class="o">&&</span> <span class="nv">${MAKE}</span> <span class="nb">install</span> <span class="o">&&</span> <span class="nb">cd</span> -</span>
<span id="LC116" class="line" lang="make"></span>
<span id="LC117" class="line" lang="make"><span class="nl">gnutls</span><span class="o">:</span> <span class="nf">dependencies/lib/libgnutls.a</span></span>
<span id="LC118" class="line" lang="make"></span></code></pre>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1389#note_510920946">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/277d4a94fb4aecb4b3eea60711a60a27/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1389#note_510920946"}}</script>


</p>
</div>
</body>
</html>