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

fix: simplify include path assignment #17

Merged
merged 1 commit into from
Sep 29, 2024

Conversation

danielinux
Copy link
Collaborator

@danielinux danielinux commented Sep 29, 2024

Both musl and gnu build can use the musl system path to resolve libc symbols/includes.

This fix removes dependencies on relative paths, so now cjit can run from anywhere.

Target make install added

@jaromil
Copy link
Member

jaromil commented Sep 29, 2024

This still requires musl to be installed everywhere... I am trying another more portable solution.

@danielinux
Copy link
Collaborator Author

This still requires musl to be installed everywhere... I am trying another more portable solution.

This was already the case for the static musl build, I think it's OK to depend on musl if required on linux-x86. I can move this to gnu libc via /usr/include if it sounds better and reduces dependencies for linux-x86. Eventually linux-x86 uses GNU libc, so it makes sense to import the original glibc includes there.

@danielinux
Copy link
Collaborator Author

Last commit (968ec9f) ensures that the LIBC_MUSL build only uses musl symbols and does not import any GNU LIBC from the compiling host. This is done via -nostdlib flags, so the cjit binary is correctly linked to musl libc functions only.

@jaromil
Copy link
Member

jaromil commented Sep 29, 2024

OK, this is definitely an improvement! cheers

- Added make install
- MUSL build now builds without any stdlib symbol (`-nostdlib`)
- Removed all relative paths, cjit can now run from any path
@jaromil jaromil merged commit fb8c93e into dyne:main Sep 29, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants