Commit b6a1e63
committed
configure: fix compilation on recent macOS Xcode versions
Back in ccf2d89 ("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
- mono/mono#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 axboe#1006
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>1 parent ced2246 commit b6a1e63
1 file changed
+6
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | 98 | | |
98 | | - | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
360 | 361 | | |
361 | 362 | | |
362 | 363 | | |
363 | | - | |
| 364 | + | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
370 | | - | |
371 | | - | |
372 | | - | |
| 371 | + | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
0 commit comments