scripts: don't set LD_PRELOAD with static companion libraries
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Apr 29 00:25:17 2010 +0200 (2010-04-29)
changeset 193894b8465b45f3
parent 1937 384b7f8fc780
child 1939 39fce98b3747
scripts: don't set LD_PRELOAD with static companion libraries

When cpmpanion libraries are built statically, it is useless to set
LD_PRELOAD. Worse, it might break the build in some corner cases.
scripts/crosstool-NG.sh.in
     1.1 --- a/scripts/crosstool-NG.sh.in	Wed Apr 28 22:24:01 2010 +0200
     1.2 +++ b/scripts/crosstool-NG.sh.in	Thu Apr 29 00:25:17 2010 +0200
     1.3 @@ -152,6 +152,9 @@
     1.4  CT_CONFIG_DIR="${CT_BUILD_DIR}/configs"
     1.5  if [ "${CT_COMPLIBS_SHARED}" = "y" ]; then
     1.6      CT_COMPLIBS_DIR="${CT_PREFIX_DIR}"
     1.7 +    # Set LD_LIBRARY_PATH to point to prefix/lib so we can find our own
     1.8 +    # libraries; add as first path, so we get hit first by the dynamic linker
     1.9 +    CT_SetLibPath "${CT_COMPLIBS_DIR}/lib" first
    1.10  else
    1.11      CT_COMPLIBS_DIR="${CT_BUILD_DIR}/static"
    1.12  fi
    1.13 @@ -161,10 +164,6 @@
    1.14  CT_CC_CORE_STATIC_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-static"
    1.15  CT_CC_CORE_SHARED_PREFIX_DIR="${CT_BUILD_DIR}/${CT_CC}-core-shared"
    1.16  
    1.17 -# Set LD_LIBRARY_PATH to point to prefix/lib so we can find our own
    1.18 -# libraries; add as first path, so we get hit first by the dynamic linker
    1.19 -CT_SetLibPath "${CT_PREFIX_DIR}/lib" first
    1.20 -
    1.21  # We must ensure that we can restart if asked for!
    1.22  if [ -n "${CT_RESTART}" -a ! -d "${CT_STATE_DIR}"  ]; then
    1.23      CT_DoLog ERROR "You asked to restart a non-restartable build"