scripts/internal: cleanup build symlinks
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Sep 11 17:55:54 2010 +0200 (2010-09-11)
changeset 211724aacb93191d
parent 2116 75ee9a87c0e4
child 2118 034de6dca38f
scripts/internal: cleanup build symlinks

The symlinks are needed only during the build process.
The final gcc will still search those dirs, but will also search
the standard lib/ dirs, so we can get rid of the symlinks.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/internals.sh
     1.1 --- a/scripts/build/internals.sh	Fri Sep 10 12:14:24 2010 +0200
     1.2 +++ b/scripts/build/internals.sh	Sat Sep 11 17:55:54 2010 +0200
     1.3 @@ -141,5 +141,25 @@
     1.4      # Remove headers installed by native companion libraries
     1.5      CT_DoForceRmdir "${CT_PREFIX_DIR}/include"
     1.6  
     1.7 +    # Remove the lib* symlinks, now:
     1.8 +    # The symlinks are needed only during the build process.
     1.9 +    # The final gcc will still search those dirs, but will also search
    1.10 +    # the standard lib/ dirs, so we can get rid of the symlinks
    1.11 +    for d in                            \
    1.12 +        "${CT_PREFIX_DIR}"              \
    1.13 +        "${CT_SYSROOT_DIR}"             \
    1.14 +        "${CT_SYSROOT_DIR}/usr"         \
    1.15 +        "${CT_PREFIX_DIR}/${CT_TARGET}" \
    1.16 +    ; do
    1.17 +        CT_DoExecLog ALL rm -f "${d}/lib32"
    1.18 +        CT_DoExecLog ALL rm -f "${d}/lib64"
    1.19 +    done
    1.20 +
    1.21 +    # Also remove the include/ and lib/ symlinks out-side of sysroot
    1.22 +    if [ "${CT_USE_SYSROOT}" = "y" ]; then
    1.23 +        CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/${CT_TARGET}/lib"
    1.24 +        CT_DoExecLog ALL rm -f "${CT_PREFIX_DIR}/${CT_TARGET}/include"
    1.25 +    fi
    1.26 +
    1.27      CT_EndStep
    1.28  }