scripts: exporting (even empty) LIBRARY_PATH and/or LPATH breaks gcc
author"Yann E. MORIN" <yann.morin.1998@free.fr>
Wed Sep 26 00:53:29 2012 +0200 (2012-09-26)
changeset 3063bb9c279516dd
parent 3062 f36c207348ef
child 3064 7df954dd93df
scripts: exporting (even empty) LIBRARY_PATH and/or LPATH breaks gcc

If either LIBRARY_PATH or LPATH is set, even to the empty string,
the gcc build breaks.

Fix that by bailing-out rather than re-setting.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Thu Sep 20 11:20:16 2012 +0800
     1.2 +++ b/scripts/crosstool-NG.sh.in	Wed Sep 26 00:53:29 2012 +0200
     1.3 @@ -37,12 +37,10 @@
     1.4  # Some sanity checks in the environment and needed tools
     1.5  CT_DoLog INFO "Performing some trivial sanity checks"
     1.6  CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"
     1.7 +CT_TestAndAbort "Don't set LIBRARY_PATH. It screws up the build." -n "${LIBRARY_PATH}"
     1.8 +CT_TestAndAbort "Don't set LPATH. It screws up the build." -n "${LPATH}"
     1.9  CT_TestAndAbort "Don't set CFLAGS. It screws up the build." -n "${CFLAGS}"
    1.10  CT_TestAndAbort "Don't set CXXFLAGS. It screws up the build." -n "${CXXFLAGS}"
    1.11 -CT_Test "LIBRARY_PATH screws up the build. Resetting." -n "${LIBRARY_PATH}"
    1.12 -export LIBRARY_PATH=
    1.13 -CT_Test "LPATH screws up the build. Resetting." -n "$LPATH"
    1.14 -export LPATH=
    1.15  CT_Test "GREP_OPTIONS screws up the build. Resetting." -n "${GREP_OPTIONS}"
    1.16  export GREP_OPTIONS=
    1.17  # Workaround against openSUSE 12.1 that breaks ./configure for cross-compilation: