When building apps with `clang` for `x86`, an asm specific symbol,
`__muldc3`, appears, which results in a undefined reference error, at
link time.
This commit adds the `-ffast-math` flag, when `clang` is used in order
to fix this issue.
Signed-off-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #38
LIBMUSL_CFLAGS-$(call gcc_version_ge,8,0) += -Wno-cast-function-type
LIBMUSL_CFLAGS-y += -Wno-format-contains-nul
LIBMUSL_CFLAGS-y += -Wno-type-limits
+ifeq ($(CONFIG_LIBMUSL_COMPLEX),y)
+LIBMUSL_CFLAGS-$(call have_clang) += -ffast-math
+endif
LIBMUSL_CFLAGS-y += -DUK_LIBC_SYSCALL=0
LIBMUSL_CFLAGS-y += -D_XOPEN_SOURCE=700
LIBMUSL_CFLAGS-y += $(LIBMUSL_HDRS_FLAGS-y)