Team,
Any takers here?
[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
This seems to be an issue with the section directive in src/include/compiler.h. The only suspicious thing is that the section appears to be referenced differently for assembly vs. non-assembly modules:
#define PROVIDE_SYMBOL( _sym ) \
.section ".provided", "a", @nobits ;
But seems to define this for non-assembly modules:
#define PROVIDE_SYMBOL( _sym ) \
__attribute__ (( section ( ".provided" ) ))
The format of the __attribute__ statement seems to be missing the section name that the original error is compaining about. Toying with the contents of this statement yielded different errors but no real progress (e.g., 'section ( ".provided,a" )'.
Any ideas? I'm really out of my depth to troubleshoot this, but it smells close.
-------- Original Message --------
Subject: Unable to Make iPXE on Mac OSX 10.8.3
From: "Richard D. Hornbaker" <[email protected]>
Date: Thu, July 25, 2013 10:51 pm
To: "iPXE Developers" <[email protected]>
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 1I 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 1At 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 .providedThanks,Richard
_______________________________________________ ipxe-devel mailing list [email protected] https://lists.ipxe.org/mailman/listinfo.cgi/ipxe-devel

