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

[c/c++] Investigate $SYSROOT #103

Open
Mic92 opened this issue Mar 11, 2021 · 1 comment
Open

[c/c++] Investigate $SYSROOT #103

Mic92 opened this issue Mar 11, 2021 · 1 comment

Comments

@Mic92
Copy link
Member

Mic92 commented Mar 11, 2021

compiler/linker respect a variable called SYSROOT to set the default lookup path for includes/libraries. This might be handy for the devshell case.
Advantage:

  • Rarely override in build systems unless they want to take over control, in which case the probably provide their own set of libraries/headers
  • One environment variable for both header/libraries
  • Also changes lookup path for libstdc++ and libc (Those can usually not just changed by using setting the INCLUDE_PATH to $dev/include, since they may contain subdirectories)

This still only affects the compile time. For runtime we still need flags like LD_LIBRARY_PATH to point to the right lib directory.

@Mic92
Copy link
Member Author

Mic92 commented Mar 11, 2021

Related to #102

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

No branches or pull requests

1 participant