All,

Redirecting from http://forum.ipxe.org/showthread.php?tid=6979 at Robin's suggestion...

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:
http://forum.ipxe.org/showthread.php?tid=4559

$ make
FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
[...]
[DEPS] libgcc/__divdi3.c
FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
[...]
FATAL:/usr/bin/../libexec/as/x86_64/as: I don't understand '-' flag!
[BUILD] bin/__divdi3.o
In file included from <command-line>:0:
./include/compiler.h:196:1: error: "__weak" redefined
<built-in>: error: this is the location of the previous definition
make: *** [bin/__divdi3.o] Error 1


I managed to narrow down the error to this shell call in Makefile.housekeeping:
OLDGAS := $(shell $(AS) --version | grep -q '2\.9\.1' && $(ECHO) -DGAS291)

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:
./include/compiler.h:196:1: error: "__weak" redefined

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:

[BUILD] bin/__divdi3.o
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.
make: *** [bin/__divdi3.o] Error 1

At Robin's suggestion, I tried make NO_WERROR=1 with the same result.


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. ;-)

It seems to me that a few things need to be fixed:
* Add some intelligence around the 'as' check to skip it on certain platforms like Xcode
* Figure out what's up with the pre-definition of __weak, and if that's an issue
* Linker error for .provided

Thanks,
Richard

_______________________________________________
ipxe-devel mailing list
[email protected]
https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

Reply via email to