]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Makefile.uk: Call tcb reserve conditionally RELEASE-0.14.0
authorRazvan Deaconescu <razvand@unikraft.io>
Mon, 31 Jul 2023 14:24:50 +0000 (17:24 +0300)
committerUnikraft <monkey@unikraft.io>
Wed, 9 Aug 2023 10:47:38 +0000 (10:47 +0000)
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

Makefile.uk

index 992505361c523998e8e2c89ef1aad44b8ca08dca..95598f7d4946f68721c809adbaa87d508f06b5fd 100644 (file)
@@ -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