<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>All,</div><div><br></div><div>Redirecting from <a href="http://forum.ipxe.org/showthread.php?tid=6979" mce_href="http://forum.ipxe.org/showthread.php?tid=6979" title="http://forum.ipxe.org/showthread.php?tid=6979" target="_blank">http://forum.ipxe.org/showthread.php?tid=6979</a> at Robin's suggestion...</div><div><br></div><div><span style="">I'm trying to build this package on Mac OS 10.8.3 (command-line tools from Xcode 4.6.3), but getting an error during the make process. I've only found one hit on the forums, but no resolution - I've got the same issue:</span><br style=""><a href="http://forum.ipxe.org/showthread.php?tid=4559" target="_blank" style="">http://forum.ipxe.org/showthread.php?tid=4559</a><br style=""><br style=""><span style="">$ make</span><br style=""><b><span style="">FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!</span><br style=""></b><span style="">[...]</span><br style=""><span style="">[DEPS] libgcc/__divdi3.c</span><br style=""><span style="">FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!</span><br style=""><span style="">[...]</span><br style=""><span style="">FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!</span><br style=""><span style="">[BUILD] bin/__divdi3.o</span><br style=""><span style="">In file included from <command-line>:0:</span><br style=""><b><span style="">./include/compiler.h:196:1: error: "__weak" redefined</span><br style=""></b><span style=""><built-in>: error: this is the location of the previous definition</span><br style=""><span style="">make: *** [bin/__divdi3.o] Error 1</span><br style=""><br style=""></div><div><br></div><div><span style="">I managed to narrow down the error to this shell call in Makefile.housekeeping:</span><br style=""><span style="">OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && $(ECHO) -DGAS291)</span><br style=""><br style=""><span style="">In this context, it looks like the "fatal" console error is probably cosmetic, and due to --version flag not being supported by 'as'.  The real hangup was this hard error:</span><br style=""><span style=""><b>./include/compiler.h:196:1: error: "__weak" redefined</b></span><br style=""><br style=""><span style="">I searched for "__weak" and only got a hit in compiler.h for its definition.  I first tried making it conditional, then tried commenting it out, both with the same result (apparently it's being pre-defined somewhere outside of ipxe's source).  That pre-definition may in itself be a conflict, but getting past that error just revealed the next layer of the onion:</span><br style=""><br style=""><span style="">[BUILD] bin/__divdi3.o</span><br style=""><span style=""><b>cc1: error in backend: Global variable 'obj___divdi3' has an invalid section specifier '.provided': mach-o section specifier requires a segment and section separated by a comma.</b></span><br style=""><span style="">make: *** [bin/__divdi3.o] Error 1</span><br style=""></div><div><br></div><div>At Robin's suggestion, I tried make NO_WERROR=1 with the same result.</div><div><br></div><div><br></div><div>I'm happy to be a test mule here to get this debugged.  Caveat: I'm a hack programmer, so a bit out of my element here; patience please. ;-)</div><div><br></div><div>It seems to me that a few things need to be fixed:</div><div>* Add some intelligence around the 'as' check to skip it on certain platforms like Xcode</div><div>* Figure out what's up with the pre-definition of __weak, and if that's an issue</div><div>* Linker error for .provided</div><div><br></div><div>Thanks,</div><div>Richard</div><div><br></div></span></div></span></body></html>