From 9a95b0e6992878aa401378813200c9b55e55465a Mon Sep 17 00:00:00 2001 From: phanes Date: Mon, 20 Feb 2023 00:51:16 -0500 Subject: [PATCH] functional chroot --- rex.project/x86_64/components/stage1/gcc.bash | 9 +++++---- rex.project/x86_64/units/stage2.units | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rex.project/x86_64/components/stage1/gcc.bash b/rex.project/x86_64/components/stage1/gcc.bash index fde8d11..f177a04 100755 --- a/rex.project/x86_64/components/stage1/gcc.bash +++ b/rex.project/x86_64/components/stage1/gcc.bash @@ -365,13 +365,13 @@ mode_build_gcc_pass2() { # patches logprint "Applying patches..." - patch -p0 < "${PATCHES_DIR}/gcc_libarchpath_fhs.patch" + #patch -p0 < "${PATCHES_DIR}/gcc_libarchpath_fhs.patch" + sed -e '/m64=/s/lib64/lib/' -i.orig gcc/config/i386/t-linux64 assert_zero $? # TODO turn this into a patch logprint "Enabling posix thread support..." - sed '/thread_header =/s/@.*@/gthr-posix.h/' \ - -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in + sed '/thread_header =/s/@.*@/gthr-posix.h/' -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in assert_zero $? logprint "Entering build subdirectory" @@ -419,7 +419,7 @@ mode_install_gcc_pass2() { pushd "${T_SOURCE_DIR}/build" assert_zero $? - make -DESTDIR=${T_SYSROOT} install + make DESTDIR=${T_SYSROOT} install assert_zero $? @@ -462,6 +462,7 @@ fi if [ "$MODE_GCC_PASS2" = "true" ]; then logprint "PASS2 selected." + rm -Rf ${T_SOURCE_DIR} MODE_STAGE=true MODE_BUILD_GCC_PASS2=true MODE_INSTALL_GCC_PASS2=true diff --git a/rex.project/x86_64/units/stage2.units b/rex.project/x86_64/units/stage2.units index a63c22e..3887a15 100644 --- a/rex.project/x86_64/units/stage2.units +++ b/rex.project/x86_64/units/stage2.units @@ -326,7 +326,7 @@ }, { "name": "set sysroot ownership for chroot", - "target": "components/stage1/fix_chroot_perms.bash", + "target": "components/stage2/fix_chroot_perms.bash", "is_shell_command": true, "shell_definition": "bash", "force_pty": true, @@ -344,7 +344,7 @@ }, { "name": "preparing virtual kernel file systems", - "target": "components/stage1/prepare_vkfs.bash", + "target": "components/stage2/prepare_vkfs.bash", "is_shell_command": true, "shell_definition": "bash", "force_pty": true,