]> Untitled Git - hvlinux.git/commitdiff
Remove /tools and /cross-tools links on host system
authorHugo Villeneuve <hugo@hugovil.com>
Fri, 3 Oct 2014 02:31:23 +0000 (22:31 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 27 Dec 2014 03:26:26 +0000 (22:26 -0500)
TODO
functions/main
stage0/hv-install-2
stage0/ipkg.def
stage0/pkg/binutils
stage0/pkg/gcc
stage0/pkg/glibc
stage0/pkg/linux
stage0/pkg/ncurses
stage0/pre-install

diff --git a/TODO b/TODO
index 142f98c0a9fd016eb32cbd6f0d8aeece745d4118..525bfaacec3936d5c3cf7e4da1ea64bf94eb52e3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -73,4 +73,3 @@ du fichier sysinfos).
 Faire un script de test (tester la présence de certains programmes à la
 toute fin de l'installation (ou dans chaque script d'installation)
 
-Éliminer les liens /tools et /cross-tools
index 038b99d8a2077d02ab9b691873bd1e9c4c96625a..4af62ad87c267a9182b7c7bb17befcc2b346fdb0 100644 (file)
@@ -62,6 +62,9 @@ fi
 
 CLFS=${LFS}
 
+CROSS_TOOLS_DIR=${CLFS}/cross-tools
+TOOLS_DIR=${CLFS}/tools
+
 # Load functions
 source ../functions/fpkg
 source ../functions/lpkg
index 7b7f32e998463dfcb6e9965140a1404f6e60ccd5..5c9d66b167269f40c6de1128b386b1bcf9137f31 100755 (executable)
@@ -20,25 +20,25 @@ ipkg ${GMP} "\
     --enable-cxx \
     --disable-static"
 
-export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+export LDFLAGS="-Wl,-rpath,${CROSS_TOOLS_DIR}/lib"
 
 ipkg ${MPFR} "\
     --disable-static \
-    --with-gmp=/cross-tools"
+    --with-gmp=${CROSS_TOOLS_DIR}"
 
 ipkg ${MPC} "\
     --disable-static \
-    --with-gmp=/cross-tools \
-    --with-mpfr=/cross-tools"
+    --with-gmp=${CROSS_TOOLS_DIR} \
+    --with-mpfr=${CROSS_TOOLS_DIR}"
 
 ipkg ${ISL} "\
     --disable-static \
-    --with-gmp-prefix=/cross-tools"
+    --with-gmp-prefix=${CROSS_TOOLS_DIR}"
 
 ipkg ${CLOOG} "\
     --disable-static \
     --with-bits=gmp \
-    --with-gmp-prefix=/cross-tools"
+    --with-gmp-prefix=${CROSS_TOOLS_DIR}"
 
 LDFLAGS=""
 
index 312982d32610837d7340a37694dec912d0aeb911..d846ceec76cc23c07e57e97c9ed0a698c5a342a9 100644 (file)
@@ -4,5 +4,5 @@ export BUILD64="-m64"
 
 # Setting default configure options for all scripts
 CONFIGURE_OPTS="\
-      --prefix=/cross-tools \
+      --prefix=${CROSS_TOOLS_DIR} \
       ${CONFIGURE_OPTS}"
index 40c82706d83733f3eb2751daaccae7d8af418159..2653b0d799025bde7f0a397c82045f8e2aaa375f 100644 (file)
@@ -8,7 +8,8 @@ hvconfig_pre()
     # --with-lib-path:
     # Set to dummy (non-existent) directory to prevent having
     # host directories list.
-    CONFIGURE_OPTS+=" \
+    CONFIGURE_OPTS=" \
+        --prefix=/cross-tools \
         --host=${CLFS_HOST} \
         --target=${CLFS_TARGET} \
         --with-sysroot=${CLFS} \
@@ -30,6 +31,12 @@ hvconfig_pre()
     esac
 }
 
+hvbuild()
+{
+    ${HVMAKE}
+    ${HVMAKE} install DESTDIR=${CLFS}
+}
+
 hvconfig_post()
 {
     unset AR
index ed373acf412bcefc82303472893328a2c517a4d0..70f69c7052da61a339dd05417dc146494f1e21d7 100644 (file)
@@ -3,7 +3,7 @@
 hvconfig_pre()
 {
     export AR=ar
-    export LDFLAGS="-Wl,-rpath,/cross-tools/lib"
+    export LDFLAGS="-Wl,-rpath,${CROSS_TOOLS_DIR}/lib"
 
     # Common options for passes 1 & 2
     # --with-local-prefix:
@@ -19,19 +19,20 @@ hvconfig_pre()
     #     --with-native-system-header-dir=/tools/include
     #   then GCC will search for system headers in:
     #     /opt/toolchain/tools/include
-    CONFIGURE_OPTS+=" \
+    CONFIGURE_OPTS=" \
+        --prefix=/cross-tools \
         --build=${CLFS_HOST} \
         --host=${CLFS_HOST} \
         --target=${CLFS_TARGET} \
         --with-sysroot=${CLFS} \
-        --with-local-prefix=/tools \
+        --with-local-prefix=${TOOLS_DIR} \
         --with-native-system-header-dir=/tools/include \
         --disable-nls \
-        --with-mpfr=/cross-tools \
-        --with-gmp=/cross-tools \
-        --with-isl=/cross-tools \
-        --with-cloog=/cross-tools \
-        --with-mpc=/cross-tools
+        --with-mpfr=${CROSS_TOOLS_DIR} \
+        --with-gmp=${CROSS_TOOLS_DIR} \
+        --with-isl=${CROSS_TOOLS_DIR} \
+        --with-cloog=${CROSS_TOOLS_DIR} \
+        --with-mpc=${CROSS_TOOLS_DIR}
         --with-system-zlib \
         --enable-checking=release \
         --disable-multilib"
@@ -61,8 +62,8 @@ hvconfig_pre()
 
         # We will create a dummy limits.h so the build will not use the one
         # provided by the host distro:
-        mkdir -p /tools/include
-        touch /tools/include/limits.h
+        mkdir -p ${TOOLS_DIR}/include
+        touch ${TOOLS_DIR}/include/limits.h
     else
         CONFIGURE_OPTS+=" \
             --enable-shared \
@@ -97,11 +98,11 @@ hvbuild()
 {
     if [ "x${HVLABEL}" = "x${GCC}-pass1" ]; then
         ${HVMAKE} all-gcc all-target-libgcc
-        ${HVMAKE} install-gcc install-target-libgcc
+        ${HVMAKE} install-gcc install-target-libgcc DESTDIR=${CLFS}
     else
         ${HVMAKE} \
             AS_FOR_TARGET="${CLFS_TARGET}-as" \
             LD_FOR_TARGET="${CLFS_TARGET}-ld"
-        ${HVMAKE} install
+        ${HVMAKE} install DESTDIR=${CLFS}
     fi
 }
index d31ab21fd40655bbd89de410effeae107ff8653b..acf6b5ab248b4419d246b38da72dc8028fd60b58 100644 (file)
@@ -20,9 +20,9 @@ hvconfig_pre()
         --with-tls \
         --enable-kernel=$(get_pkg_ver3 ${KERNEL}) \
         --with-__thread \
-        --with-binutils=/cross-tools/bin \
+        --with-binutils=${CROSS_TOOLS_DIR}/bin \
         --enable-obsolete-rpc \
-        --with-headers=/tools/include"
+        --with-headers=${TOOLS_DIR}/include"
 }
 
 # For Glibc to support NPTL:
@@ -36,6 +36,12 @@ libc_cv_ssp=no
 EOF
 }
 
+hvbuild()
+{
+    ${HVMAKE}
+    ${HVMAKE} install install_root=${CLFS}
+}
+
 hvconfig_post()
 {
     unset BUILD_CC
index 1107e1b6cafbbf31aee2e1037a2d8977fe671ae9..19781c78d2b62d2af2699ea0b3ff8a78e14c8835 100644 (file)
@@ -6,6 +6,6 @@ hvbuild()
 
     ${HVMAKE} mrproper
     ${HVMAKE} ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install
-    install -dv /tools/include
-    cp -rv dest/include/* /tools/include
+    install -dv ${TOOLS_DIR}/include
+    cp -rv dest/include/* ${TOOLS_DIR}/include
 }
index b2126bcfe24f8f20ea316ebe44c3edb598f4abc9..07328837395a574ec3e19fe45f5d4a1f8ae9571a 100644 (file)
@@ -14,5 +14,5 @@ hvbuid()
     ${HVMAKE} -C progs tic
 
     # Install tic
-    install -v -m755 progs/tic /cross-tools/bin
+    install -v -m755 progs/tic ${CROSS_TOOLS_DIR}/bin
 }
index 5ff17d2e93e761b156c724317d2fed6f04fa5ba3..0d72afd7b92ce0012200b289406dd1b81529fe4b 100755 (executable)
@@ -30,17 +30,12 @@ done
 
 chown -R lfs:lfs ${LFS}
 
-# Creating a link from the host root directory to LFS cross-tools directories
-for subdir in tools cross-tools; do
-    ln -sfvT ${LFS}/${subdir} /${subdir}
-done
-
 cat > /home/lfs/.bashrc << "EOF"
 # Setting up the environment
 set +h
 umask 022
 LC_ALL=POSIX
-PATH=/cross-tools/bin:/bin:/usr/bin
+PATH=_CLFS_CROSS_TOOLS_PATH_/bin:/bin:/usr/bin
 HVMAKE="make -j ${MAKEJOBS}"
 
 unset CFLAGS
@@ -49,6 +44,8 @@ unset CXXFLAGS
 export LC_ALL PATH HVMAKE
 EOF
 
+sed -e "s@_CLFS_CROSS_TOOLS_PATH_@${CROSS_TOOLS_DIR}@" -i /home/lfs/.bashrc
+
 chown lfs:lfs /home/lfs/.bashrc
 
 exit $?