configure: fix compilation on recent macOS Xcode versions
Back in
ccf2d89d39b21bc8c7b497b40be5b82eadb80863 ("configure: try to
disable weak linking on OSX") disabling weak symbols was done to prevent
depending on features when building on a newer macOS but targeting an
older one. Fast-forward to Xcode 11.4 and it turns out Apple have broken
this by depending on weak symbols for critical symbols like FD_SET
leading to compilation errors like the following
ld: weak import of symbol '___darwin_check_fd_set_overflow' not supported because of option: -no_weak_imports for architecture x86_64
Other people/projects have been hit by this issue:
- https://openradar.appspot.com/
FB7647406
- https://github.com/mono/mono/issues/19393
but Apple have kept this behaviour into XCode 12 so we should adapt.
- Introduce the concept of configure only CFLAGS
- Switch to using -Werror=partial-availability with the above
- Stop logging a message about disabling weak linking
The above should avoid finding features the target platform doesn't have
while allowing weak linking. The name CONFIGURE_CFLAGS is used to remain
similar to QEMU's configure. Fingers crossed this approach stays
supported by Apple...
Fixes https://github.com/axboe/fio/issues/1006
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>