<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
Creating a static library from fat object files works fine as long as<br>
there's an index. That means using the -s option with ar, or running<br>
ranlib after creation. The usual command is "ar crs <libname>.a *.o".<br><br></blockquote><div><br></div><div>I was making a static lib that can be used by both darwintracelib1.0 and pextlib1.0.</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">darwintracelib1.0 uses UNIVERSAL_ARCHFLAGS in its build and pextlib1.0 doesn't.</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><font color="#000000" face="-webkit-standard"><span>So, on Catalina, the build works as </span></font><span style="color:rgb(0,0,0);font-family:-webkit-standard">UNIVERSAL_ARCHFLAGS resolve to x86_64 only.</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">But on 10.13, build fails as library is incompatible,</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><font color="#000000" face="-webkit-standard"><span style="caret-color: rgb(0, 0, 0);">Probably, for that reason sip_copy_proc.c is copied from pextlib1.0 to darwintracelib1.0 so that it is again separately compiled</span></font></div><div><font color="#000000" face="-webkit-standard"><span style="caret-color: rgb(0, 0, 0);">as per </span></font><span style="color:rgb(0,0,0);font-family:-webkit-standard">darwintracelib1.0 flags.</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">I was thinking to add </span><span style="color:rgb(0,0,0);font-family:-webkit-standard">UNIVERSAL_ARCHFLAGS to pextlib1.0's build as well so that the static lib is compatible with</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">both. </span><span style="color:rgb(0,0,0);font-family:-webkit-standard">I don't see what would be the issue if </span><span style="color:rgb(0,0,0);font-family:-webkit-standard">pextlib1.0 gets built for multiple -archs.</span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">Will it be okay to do so?</span><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard"><br></span></div><div><span style="color:rgb(0,0,0);font-family:-webkit-standard">MIhir</span></div></div></div></div></div></div></div></div></div></div></div>