Skip to content

Commit

Permalink
env: Bail out if CPATH and friends are set
Browse files Browse the repository at this point in the history
If CPATH, C_INCLUDE_PATH, CPLUS_INCLUDE_PATH, or OBJC_INCLUDE_PATH are set, bail out.
These environment variables are known to break crosstool-ng's build.

This closes #327

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
  • Loading branch information
bhundven committed Feb 4, 2016
1 parent a812405 commit 10af186
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/crosstool-NG.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ CT_DoLog INFO "Performing some trivial sanity checks"
CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"
CT_TestAndAbort "Don't set LIBRARY_PATH. It screws up the build." -n "${LIBRARY_PATH}"
CT_TestAndAbort "Don't set LPATH. It screws up the build." -n "${LPATH}"
CT_TestAndAbort "Don't set CPATH. It screws up the build." -n "${CPATH}"
CT_TestAndAbort "Don't set C_INCLUDE_PATH. It screws up the build." -n "${C_INCLUDE_PATH}"
CT_TestAndAbort "Don't set CPLUS_INCLUDE_PATH. It screws up the build." -n "${CPLUS_INCLUDE_PATH}"
CT_TestAndAbort "Don't set OBJC_INCLUDE_PATH. It screws up the build." -n "${OBJC_INCLUDE_PATH}"
CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
Expand Down

0 comments on commit 10af186

Please sign in to comment.