]> xenbits.xensource.com Git - unikraft/libs/musl.git/commitdiff
Makefile.uk: Add flag to avoid gcc specifc symbol
authorMaria Sfiraiala <maria.sfiraiala@gmail.com>
Sat, 11 Mar 2023 15:30:19 +0000 (17:30 +0200)
committerUnikraft <monkey@unikraft.io>
Thu, 4 May 2023 14:29:00 +0000 (14:29 +0000)
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

Makefile.uk

index 5d2f40a8590995ffd498acfbe60c3af389c40bfe..3796ac82f7969cfd571bbf0917e00627abe5b95f 100644 (file)
@@ -141,6 +141,9 @@ LIBMUSL_CFLAGS-y += -Wno-missing-braces
 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)