mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-21 01:21:27 +00:00
This patch, submitted upstream but not (yet?) accepted, adds a third parameter to the specs file 'getenv' function that provides a value for when the environment variable is not set, instead of having gcc fail. This seemed like the safest way to provide a mechanism for getting the installed location of the toolchain from inside a specs file as, when not installed in the built-in location, gcc already sets the GCC_EXEC_PREFIX environment variable to a well defined location within that directory hierarchy, but when installed in the location specified at compile time, gcc does not. Providing a default value that matches the compile-time location then allows the specs file to compute paths relative to the current GCC installation location, whereever it is installed. Signed-off-by: Keith Packard <keithp@keithp.com>