1
Fork 0
Commit Graph

5 Commits

Author SHA1 Message Date
Motiejus Jakštys 8d1e1c9fa6 res_search: fix for aarch64
On linux_aarch64 `res_search` is `__res_search@GLIBC_2.17`, which is
different from the x86_64 counterpart `__res_search@GLIBC_2.2.5`.

Also fix tests.
2023-01-18 22:39:35 +02:00
Motiejus Jakštys a47c7abc96 upgrade gazelle, add -lresolv
does not fix the test
2023-01-18 16:58:08 +02:00
Motiejus Jakštys 7b0de33070 work-around res_search on older glibcs
`res_search` became a proper symbol only in glibc 2.34. Until that it
was re-defined in headers, hitting the (in-)famous
https://github.com/ziglang/zig/issues/9485

glibc 2.34+:

    resolv/resolv.h:int             res_search (const char *, int, int, unsigned char *, int)

Old glibc:

    resolv/resolv.h:#define res_search              __res_search

Also, remove the toplevel includes, as they should never be included in
the first place: the headers are included explicitly when needed.
2023-01-18 15:45:47 +02:00
Motiejus Jakštys 3ac217e2cc windows tests: move tests, get rid of wine-binfmt
This removes all other Bazel test commands, so all tests can be again
tested with `bazel test ...`.

Also, fixes linux-arm64 glibc tests. Until now they've worked only in
CI. Now they work everywhere I tried.
2022-06-06 10:33:46 +03:00
Motiejus Jakštys 9ce21b5276 [zig ld] --gc-sections workaround + tests
`zig cc` emits `--gc-sections` for the linker, which is incompatbile
with what CGo thinks about linking.

This commit adds a workaround: it will add `--no-gc-sections` to the
linking step if the command is not specified (falling back to the
default behavior of gcc/clang).

Related: https://github.com/golang/go/issues/52690
2022-05-05 13:36:58 +03:00