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 <razvand@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #35
# 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