From: Razvan Deaconescu Date: Mon, 31 Jul 2023 14:24:50 +0000 (+0300) Subject: Makefile.uk: Call tcb reserve conditionally X-Git-Tag: RELEASE-0.14.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cf6c9f09a76aac873aa5f537ebacf8cfcb432eeb;p=unikraft%2Flibs%2Fnewlib.git Makefile.uk: Call tcb reserve conditionally The `ukarch_tls_tcb_reserve` call in `Makefile.uk` should only be made when Newlib is selected (i.e. when `CONFIG_LIBNEWLIBC` is set to `y`). Otherwise, if `newlib` is downloaded in the build directory, but is *not* selected in the configuration, a build error occurs: ``` LD simple_qemu-x86_64.dbg /usr/bin/ld: [...]/build/libcontext.o: in function `ukarch_tls_area_init': [...]/unikraft/arch/x86/x86_64/tls.c:201: undefined reference to `ukarch_tls_tcb_init' ``` Add an `ifeq` / `endif` wrapper to the call to `ukarch_tls_tcb_reserve`, such that the call is made only when Newlib is selected for configuration. Signed-off-by: Razvan Deaconescu Reviewed-by: Stefan Jumarea Approved-by: Eduard Vintilă Tested-by: Unikraft CI GitHub-Closes: #35 --- diff --git a/Makefile.uk b/Makefile.uk index 9925053..95598f7 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -35,7 +35,9 @@ # Please refer to ./arch/Makefile.rules for more details. # In our case, 16 bytes is sufficient to also cover for the minimum size required by ARM. ################################################################################ +ifeq ($(CONFIG_LIBNEWLIBC),y) $(eval $(call ukarch_tls_tcb_reserve,16)) +endif