<div><div dir="auto">Hello Vance</div></div><div dir="auto"><br></div><div dir="auto">Fantastic!!!</div><div dir="auto"><br></div><div dir="auto">It would be great if you can share some code.</div><div dir="auto">I’m totally lost with this tricky problem and no one was able to help me.</div><div dir="auto"><br></div><div dir="auto">Thanks in advance...</div><div dir="auto"><br></div><div dir="auto">/Frank</div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Dec 7, 2018 at 9:51 AM Frank Muller <<a href="mailto:frank.muller.erl@gmail.com" target="_blank">frank.muller.erl@gmail.com</a>> wrote:<br>
> Question: how can I derive the GCC's padding, and automatically add it to my Erlang binary?<br>
<br>
Frank,<br>
<br>
I used to write linked-in drivers for embedded systems which provided<br>
C library APIs. Back in those days I was building for 32 & 64 bit, x86<br>
& SPARC. I used GNU autotools to figure out the target environment and<br>
generate macros in my Erlang header files. It all worked quite<br>
smoothly in the end. I'd be happy to send you an example project if<br>
you think it'd helpful.<br>
<br>
To your specific question I think the autoconf macro AC_CHECK_ALIGNOF<br>
does what you want:<br>
<a href="https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Compiler-Characteristics.html" rel="noreferrer" target="_blank">https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Generic-Compiler-Characteristics.html</a><br>
<br>
-- <br>
-Vance<br>
</blockquote></div></div>