Skip to content

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

Description

@Mic92

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions