| 28 Dec 2025 |
Ihar Hrachyshka | where does one define common CFLAGS / CPPFLAGS for darwin? | 23:17:43 |
Ihar Hrachyshka | * where does one define common CFLAGS / CPPFLAGS for darwin? (for all nixpkgs) | 23:18:00 |
Randy Eckenrode | Usually in the wrapper. What flags? | 23:21:52 |
Ihar Hrachyshka | the ones for SET_FDSIZE increase | 23:52:09 |
Ihar Hrachyshka | is it the wrapper postFixup? | 23:54:47 |
| 29 Dec 2025 |
Ihar Hrachyshka | is it something like this? https://github.com/NixOS/nixpkgs/pull/474914 | 00:01:45 |
Randy Eckenrode | That looks reasonable. | 00:28:13 |
emily | can you explain "except the need to pass POSIX certification"? | 00:38:13 |
Randy Eckenrode | POSIX requires that select return EINVAL when nfds is larger than SET_FDSIZE. | 00:39:37 |
Ihar Hrachyshka | there's some more info in https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4953
but basically "POSIX requires EINVAL if nfds >= FD_SETSIZE" | 00:39:45 |
Randy Eckenrode | Which is 1024 AFAIK for historical reasons. | 00:40:02 |
Randy Eckenrode | Darwin has a way to allow bigger sizes, but you have to opt into it. | 00:40:53 |
emily | I'm not a fan of setting global compiler flags that diverge from the platform defaults and that can result in programs having hidden security vulnerabilities when compiled with standard flags. _DARWIN_UNLIMITED_SELECT especially is a kind of crazy hack | 00:41:10 |
emily | programs that need/can handle such a definition should set the flags themselves in their own build systems | 00:41:28 |
Randy Eckenrode | The only issue I can see with forcing a larger size for all packages is what happens when packages request their own size (e.g., a smaller one). | 00:42:00 |