Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile.uk: Call tcb reserve conditionally #35

Conversation

razvand
Copy link
Contributor

@razvand razvand commented Jul 31, 2023

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: warning: [...]/build/libkvmplat.o: requires executable stack (because the .note.GNU-stack section is executable)
/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.

@razvand razvand added the documentation Improvements or additions to documentation label Jul 31, 2023
@razvand razvand requested a review from StefanJum July 31, 2023 14:29
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>
Copy link
Member

@StefanJum StefanJum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good, thanks.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com

Copy link
Member

@eduardvintila eduardvintila left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, thanks.

Approved-by: Eduard Vintilă eduard.vintila47@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/merged documentation Improvements or additions to documentation
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

4 participants