BUILD: Makefile: add linux-musl to TARGET
Other users are using musl, namely on Docker. It builds fine with linux-glibc-legacy but not linux-glibc, which needs to first disable USE_BACKTRACE. Better add a valid entry for it instead of hacking around another libc.
This commit is contained in:
parent
6e6f59b7e0
commit
39b2fda915
1
INSTALL
1
INSTALL
|
@ -372,6 +372,7 @@ and assign it to the TARGET variable :
|
||||||
|
|
||||||
- linux-glibc for Linux kernel 2.6.28 and above
|
- linux-glibc for Linux kernel 2.6.28 and above
|
||||||
- linux-glibc-legacy for Linux kernel 2.6.28 and above without new features
|
- linux-glibc-legacy for Linux kernel 2.6.28 and above without new features
|
||||||
|
- linux-musl for Linux kernel 2.6.28 and above with musl libc
|
||||||
- solaris for Solaris 8 or 10 (others untested)
|
- solaris for Solaris 8 or 10 (others untested)
|
||||||
- freebsd for FreeBSD 5 to 12 (others untested)
|
- freebsd for FreeBSD 5 to 12 (others untested)
|
||||||
- netbsd for NetBSD
|
- netbsd for NetBSD
|
||||||
|
|
20
Makefile
20
Makefile
|
@ -139,8 +139,8 @@ DOCDIR = $(PREFIX)/doc/haproxy
|
||||||
#### TARGET system
|
#### TARGET system
|
||||||
# Use TARGET=<target_name> to optimize for a specific target OS among the
|
# Use TARGET=<target_name> to optimize for a specific target OS among the
|
||||||
# following list (use the default "generic" if uncertain) :
|
# following list (use the default "generic" if uncertain) :
|
||||||
# linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,
|
# linux-glibc, linux-glibc-legacy, linux-musl, solaris, freebsd, openbsd,
|
||||||
# cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic, custom
|
# netbsd, cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic, custom
|
||||||
TARGET =
|
TARGET =
|
||||||
|
|
||||||
#### TARGET CPU
|
#### TARGET CPU
|
||||||
|
@ -341,6 +341,18 @@ ifeq ($(TARGET),linux-glibc-legacy)
|
||||||
USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_GETADDRINFO)
|
USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_GETADDRINFO)
|
||||||
endif
|
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
|
# Solaris 8 and above
|
||||||
ifeq ($(TARGET),solaris)
|
ifeq ($(TARGET),solaris)
|
||||||
# We also enable getaddrinfo() which works since solaris 8.
|
# We also enable getaddrinfo() which works since solaris 8.
|
||||||
|
@ -757,8 +769,8 @@ all:
|
||||||
@echo
|
@echo
|
||||||
@echo "Please choose the target among the following supported list :"
|
@echo "Please choose the target among the following supported list :"
|
||||||
@echo
|
@echo
|
||||||
@echo " linux-glibc, linux-glibc-legacy, solaris, freebsd, openbsd, netbsd,"
|
@echo " linux-glibc, linux-glibc-legacy, linux-musl, solaris, freebsd, openbsd, "
|
||||||
@echo " cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic, custom"
|
@echo " netbsd, cygwin, haiku, aix51, aix52, aix72-gcc, osx, generic, custom"
|
||||||
@echo
|
@echo
|
||||||
@echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
|
@echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
|
||||||
@echo "want to precisely tweak every option, or choose the target which"
|
@echo "want to precisely tweak every option, or choose the target which"
|
||||||
|
|
Loading…
Reference in New Issue