-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds ENV variable that can be used to redirect /usr/include files fro…
…m wrapper_open (#42) * Redirect usr/include from open * Some renames * fix typo * Combine both redirects into a single function * Docs.md * Allow override to auto redirect of /usr/lib as well change the env var from IDO_CC to USR_LIB * PR review * Fix comment * Exit instead of silently fail * get_env_var * Fix usr/include doc comment * move comment
- Loading branch information
Showing
2 changed files
with
103 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Custom Functionality | ||
|
||
## Redirection | ||
IDO recomp currently has two forms of path redirection, both involving the `/usr` folder. | ||
|
||
### `/usr/lib` | ||
In order for users to not having to worry about installing the binaries in particular locations in `/usr/lib`, recomp automatically redirects `/usr/lib/` paths. This is done by determining the location of `cc` and redirecting to the same directory. This does mean all the binaries and `err.english.cc` are expected to be a part of a single flattened directory. | ||
|
||
It is also possible to override the auto redirect by using the environment variable `USR_LIB` with the desired redirection path. This can be used if the binaries are not in a flattened directory with `cc` or if on Linux and are unable to read `/proc/self/exe`. | ||
|
||
Wrapper functions implementing this redirection: | ||
* `init_file` | ||
* `wrapper_execvp` | ||
|
||
### /usr/include | ||
The other form of redirection is completely optional and is done by setting the environment variable `USR_INCLUDE` to the desired redirection path. This will than redirect all opened files files there. This is done so that the `mdebug` section file paths will still use `/usr/include` path, but the files themselves can be located elsewhere for greater flexibility. | ||
|
||
Wrapper functions implementing this redirection: | ||
* `wrapper_open` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters