Hi.
Resuscitate this old thread with a musl lib update.
https://musl.libc.org/releases.html
```
musl-1.2.4.tar.gz (sig) - May 1, 2023
This release adds TCP fallback to the DNS stub resolver, fixing the
longstanding inability to query large DNS records and incompatibility
with recursive nameservers that don't give partial results in truncated
UDP responses. It also makes a number of other bug fixes and
improvements in DNS and related functionality, including making both the
modern and legacy API results differentiate between NODATA and NxDomain
conditions so that the caller can handle them differently.
....
```
Regards
Alex
On 2020-04-16 (Do.) 13:26, Willy Tarreau wrote:
On Thu, Apr 16, 2020 at 12:29:42PM +0200, Tim Düsterhus wrote:
FWIW musl seems to work OK here when building for linux-glibc-legacy.
Yes. HAProxy linked against Musl is smoke tested as part of the Docker
Official Images program, because the Alpine-based Docker images use Musl
as their libc. In fact you can even use TARGET=linux-glibc + USE_BACKTRACE=.
By the way, I initially thought I was the only one building with musl
for my EdgeRouter-x that I'm using as a distcc load balancer for the
build farm at work. But if there are other users, we'd rather add
a linux-musl target, as the split between OS and library was precisely
made for this purpose!
Anyone objects against something like this (+ the appropriate entries
in other places and doc) ?
diff --git a/Makefile b/Makefile
index d5841a5..a3dad36 100644
--- a/Makefile
+++ b/Makefile
@@ -341,6 +341,18 @@ ifeq ($(TARGET),linux-glibc-legacy)
USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_GETADDRINFO)
endif
+# For linux >= 2.6.28 and musl
+ifeq ($(TARGET),linux-musl)
+ set_target_defaults = $(call default_opts, \
+ USE_POLL USE_TPROXY USE_LIBCRYPT USE_DL USE_RT USE_CRYPT_H USE_NETFILTER \
+ USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY \
+ USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO \
+ USE_GETADDRINFO)
+ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E -xc - | grep
'^[^\#]'),__arm__/__aarch64__)
+ TARGET_LDFLAGS=-latomic
+endif
+endif
+
# Solaris 8 and above
ifeq ($(TARGET),solaris)
# We also enable getaddrinfo() which works since solaris 8.
Willy