Compiled on X8DTU with 2 physical Intel Xeon E5530 CPU (8C16T) -- Compile Flags: # 'dynamic_cast' not permitted with '-fno-rtti' # '-fno-exceptions' exception handling required See "Preparation" below, trying out a different method. -- Dependencies: bash # required for bootstrap compiletc # required for bootstrap git # required for bootstrap node # required for bootstrap libsecret-dev # required for bootstrap libX11-dev # required for bootstrap libxkbfile-dev # required for bootstrap nss # required for build gdk-pixbuf2 # required for build libXext # required for build libXrender # required for build libXfixes # required for build libXdamage # required for build cairo # required for build pango # required for build atk # required for build dbus # required for build libXcomposite # required for build libXcursor # required for build libXi # required for build libXrandr # required for build at-spi2-core # required for build at-spi2-atk # required for build gtk3 # required for build libXtst # required for build libXss # required for build libasound # required for build libcups # required for build hicolor-icon-theme # required for build patchelf # required for binaries -- Preparation: # inspired by distcc masquerade script # https://linux.die.net/man/1/distcc sudo unlink /usr/local/bin/gcc sudo unlink /usr/local/bin/g++ # use a different linker script # http://forum.tinycorelinux.net/index.php/topic,23623.0.html ==== sudo vi /usr/local/bin/gcc ==== #!/bin/sh ARG=$(echo " $* " | awk '{gsub(/ \-O[0-9] /, " ");gsub(/ \-g /, " ");print}') /tmp/tcloop/gcc/usr/local/bin/gcc ${ARG} -mtune=generic -Os -pipe -flto -fuse-linker-plugin \ -ffunction-sections -fdata-sections -Wl,--gc-sections \ -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn -Wl,-O1 echo $(LANG=C date) $* >> /tmp/all.gcc.cmd ==== sudo vi /usr/local/bin/g++ ==== #!/bin/sh ARG=$(echo " $* " | awk '{gsub(/ \-O[0-9] /, " ");gsub(/ \-g /, " ");print}') /tmp/tcloop/gcc/usr/local/bin/g++ ${ARG} -mtune=generic -Os -pipe -flto -fuse-linker-plugin \ -ffunction-sections -fdata-sections -Wl,--gc-sections \ -Wl,-T/usr/local/lib/ldscripts/elf_x86_64.xbn -Wl,-O1 echo $(LANG=C date) $* >> /tmp/all.g++.cmd ==================================== # it appears that only g++ is called sudo chmod +x /usr/local/bin/gcc /usr/local/bin/g++ -- Compilation: tar -zxf v1.59.0.tar.gz cd atom-1.59.0 # temporary fix sudo ln -s /lib /lib64 patch -Np3 < ../Atom-TC-packing.patch # just in case # this also cleans /home/tc/.atom ./script/clean # bootstrap, if failed, load missing deps and restart time ./script/bootstrap real 5m 29.13s user 14m 47.25s sys 1m 13.45s # make the missing directory before installation mkdir -p /tmp/atom-root/usr/local/share/icons/hicolor # compile and install time ./script/build --install=/tmp/atom-root/usr/local --no-bootstrap real 11m 8.14s user 14m 4.06s sys 0m 52.95s # for future reference tar cf 59.tar atom-root du -h 59.tar [625M] -- Packing: cd /tmp/atom-root find . -type f -exec file {} ';' > /tmp/file.info ## Removing # remove python bytecode grep byte-compiled /tmp/file.info | cut -d : -f 1 | xargs rm -f # remove useless MicroSoft Windows files grep Windows /tmp/file.info | cut -d : -f 1 | xargs rm -f grep bat: /tmp/file.info | cut -d : -f 1 | xargs rm -f grep DOS /tmp/file.info | cut -d : -f 1 | xargs rm -f grep cmd: /tmp/file.info | cut -d : -f 1 | xargs ls 2> /dev/null | grep -v gyp | xargs rm -f # remove static library grep 'current ar archive' /tmp/file.info | cut -d : -f 1 | xargs rm -f ## Adjusting # perl grep -rIl '\/usr\/bin\/perl' . | xargs sed -i 's:/usr/bin/perl:/usr/local/bin/perl:g' # edit the main script (#!/bin/bash --> #!/bin/sh) sed -i 's:bash:sh:' ./usr/local/bin/atom # add export FONTCONFIG_PATH=/usr/local/etc/fonts sed -i '2i export FONTCONFIG_PATH=/usr/local/etc/fonts' ./usr/local/bin/atom # desktop: fix icon and path echo X-FullPathIcon=/usr/local/share/icons/hicolor/48x48/apps/atom.png \ >> ./usr/local/share/applications/atom.desktop sed -i 's:/tmp/atom-root::' ./usr/local/share/applications/atom.desktop # strip binaries (strip before patchelf, otherwise sometimes it may not strip) # grep ELF /tmp/file.info | cut -d : -f 1 | xargs strip --strip-unneeded # grep ELF /tmp/file.info | cut -d xar: -f 1 | xargs strip --remove-section=.note.gnu.build-id # using for loop, because xargs and/or strip is acting buggy here for E in $(grep ELF /tmp/file.info | cut -d : -f 1); do strip --strip-unneeded $E strip --remove-section=.note.gnu.build-id $E done # patchelf, replace interpreter with the realpath grep -lr '/lib64/ld-linux-x86-64.so.2' . > /tmp/lib64 for E in $(cat /tmp/lib64); do patchelf --set-interpreter '/lib/ld-linux-x86-64.so.2' $E done # patchelf: rename libraries, should be backward compatible patchelf --replace-needed libssl.so.1.0.0 libssl.so.1.1 \ ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-imap-send patchelf --replace-needed libcrypto.so.1.0.0 libcrypto.so.1.1 \ ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/libexec/git-core/git-imap-send # -- atom-libs.tcz # shared objects, we can use the system ones mkdir -p /tmp/atom-share/usr/local/share/atom/ mv ./usr/local/share/atom/libEGL.so /tmp/atom-share/usr/local/share/atom/ mv ./usr/local/share/atom/libGLESv2.so /tmp/atom-share/usr/local/share/atom/ mv ./usr/local/share/atom/swiftshader /tmp/atom-share/usr/local/share/atom/ # this is a new one, I don't think atom really need this mv ./usr/local/share/atom/libvulkan.so /tmp/atom-share/usr/local/share/atom/ # create link mkdir -p ./usr/local/share/atom/swiftshader ln -s /usr/local/share/atom/libvulkan.so ./usr/local/share/atom/libvulkan.so ln -s /usr/local/share/atom/libEGL.so ./usr/local/share/atom/libEGL.so ln -s /usr/local/share/atom/libGLESv2.so ./usr/local/share/atom/libGLESv2.so ln -s /usr/local/share/atom/swiftshader/libEGL.so ./usr/local/share/atom/swiftshader/libEGL.so ln -s /usr/local/share/atom/swiftshader/libGLESv2.so ./usr/local/share/atom/swiftshader/libGLESv2.so # -- locale mkdir -p /tmp/atom-loc/usr/local/share/atom/ mv ./usr/local/share/atom/locales/ /tmp/atom-loc/usr/local/share/atom/ mkdir -p /tmp/atom-loc/usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/ mv ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/locale/ /tmp/atom-loc/usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/ ln -s /usr/local/share/atom/locales ./usr/local/share/atom/locales ln -s /usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/locale \ ./usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/locale # apm: Atom Package Manager mkdir -p /tmp/atom-apm/usr/local/bin/ mv ./usr/local/bin/apm /tmp/atom-apm/usr/local/bin/ mkdir -p /tmp/atom-apm/usr/local/share/atom/resources/app/ mv ./usr/local/share/atom/resources/app/apm /tmp/atom-apm/usr/local/share/atom/resources/app/ mkdir -p ./usr/local/share/atom/resources/app/apm/bin # these links are created so that apm can be extracted as a extendable tcz ln -s /usr/local/share/atom/resources/app/apm/bin/apm ./usr/local/share/atom/resources/app/apm/bin/apm ln -s /usr/local/share/atom/resources/app/apm/bin/node ./usr/local/share/atom/resources/app/apm/bin/node ln -s /usr/local/share/atom/resources/app/apm/bin/npm ./usr/local/share/atom/resources/app/apm/bin/npm # clear empty directories (if any) find -depth -exec rmdir {} \; 2> /dev/null # tce.installed mkdir -m 775 ./usr/local/tce.installed vi ./usr/local/tce.installed/atom #!/bin/sh gtk-update-icon-cache -q -f -t /usr/local/share/icons/hicolor # These are link files for tcz so atom can see them in tcloop # they should be removed so that they don't clash with atom-apm, atom-locale, atom-libs # apm rm /usr/local/share/atom/resources/app/apm/bin/apm rm /usr/local/share/atom/resources/app/apm/bin/node rm /usr/local/share/atom/resources/app/apm/bin/npm # locale rm /usr/local/share/atom/locales rm /usr/local/share/atom/resources/app.asar.unpacked/node_modules/dugite/git/share/locale # libs rm /usr/local/share/atom/libvulkan.so rm /usr/local/share/atom/libEGL.so rm /usr/local/share/atom/libGLESv2.so rm /usr/local/share/atom/swiftshader/libEGL.so rm /usr/local/share/atom/swiftshader/libGLESv2.so