monochromatic

monochromatic blog: http://blog.z3bra.org
git clone git://z3bra.org/monochromatic
Log | Files | Refs

commit 984d0dd9a82ca1f52c770a214f4c17f0b4f127d9
parent 6380d9c028a53d991c9da53fb12863216ba74ac0
Author: z3bra <contactatz3bradotorg>
Date:   Thu,  6 Jul 2017 13:31:07 +0200

Remove traces of old extra directories

Diffstat:
Makefile | 6+++---
config.mk | 3+--
data/cross-pcc.sh | 210-------------------------------------------------------------------------------
data/info.sh | 61-------------------------------------------------------------
data/pcc-1.1.0-deflibdirs.diff | 30------------------------------
data/pcc-1.1.0-musl.diff | 21---------------------
data/pcc-libs-1.1.0-musl.diff | 22----------------------
7 files changed, 4 insertions(+), 349 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,10 +2,10 @@ include config.mk .PHONY: all check clean -all: $(PAGES) $(FEEDS) $(EXTRA) $(FAVICON) +all: $(PAGES) $(FEEDS) $(EXTRA) -$(NAME).tbz: $(PAGES) $(EXTRA) $(FEEDS) $(FAVICON) - tar -cvjf $@ $(PAGES) $(EXTRA) $(FEEDS) $(FAVICON) +$(NAME).tbz: $(PAGES) $(EXTRA) $(FEEDS) + tar -cvjf $@ $(PAGES) $(EXTRA) $(FEEDS) $(EXTRA): mkdir -p $@ diff --git a/config.mk b/config.mk @@ -36,5 +36,4 @@ PAGES = index.html \ 2016/09/pack-it-up.html FEEDS = rss/feed.xml -EXTRA = css img vid data errors -FAVICON = favicon.ico +EXTRA = css errors favicon.ico diff --git a/data/cross-pcc.sh b/data/cross-pcc.sh @@ -1,210 +0,0 @@ -#!/bin/sh -ex -# -# Couple of useful links: -# + http://pcc.ludd.ltu.se/cross-compiler/ -# + http://wiki.osdev.org/Cross-Compiler_Successful_Builds -# + https://git.framasoft.org/Ypnose/solyste/blob/master/scripts/create-crossenv -# + http://kegel.com/crosstool/ -# + https://github.com/GregorR/musl-cross/tree/master/patches -# -# 0. download and extract sources -# 1. patch everything that require patching -# 2. install linux headers -# 3. build binutils -# 4. build musl -# 5. build pcc with gcc -# 6. add pkg-config wrapper - -# cross compiler environment -MARCH=$(uname -m) -TRIPLE=${TRIPLE:-${MARCH}-linux-musl} -PREFIX=${PREFIX:-${HOME}/cross/pcc-${MARCH}} -BLDDIR=${BLDDIR:-${HOME}/cross/build} -SRCDIR=${SRCDIR:-${HOME}/cross/source} -PATCHD=${PATCHD:-${HOME}/cross/patches} - -# compilation variables -PATH="${PREFIX}/bin:${PATH}" -CFLAGS="-Os -fomit-frame-pointer -pipe" -CXXFLAGS="${CFLAGS}" -CPPFLAGS="${CFLAGS}" -LDFLAGS="-Wl,--as-needed" -MAKEFLAGS="-j8" - -# versions -PCCV=${PCCV:-1.1.0} -BINV=${BINV:-2.25} -MUSLV=${MUSLV:-1.1.10} -KERNV=${KERNV:-4.1.4} - - -# source mirrors -PCCMIRROR=ftp://pcc.ludd.ltu.se/pub/pcc-releases -GNUMIRROR=ftp://ftp.gnu.org/gnu -MUSLMIRROR=http://www.musl-libc.org/releases -LINUXMIRROR=https://www.kernel.org/pub/linux/kernel/v4.x - -# Preparing sources -mkdir -p "${SRCDIR}" "${BLDDIR}" "${PREFIX}" -cd "${SRCDIR}" - -# -# ┏━┓ -# ┃┃┃ -# ┗━┛╹ -# Get all GNU tarballs -grab_sources() { -curl -# "${PCCMIRROR}/pcc-${PCCV}.tgz" | tar xz -curl -# "${PCCMIRROR}/pcc-libs-${PCCV}.tgz" | tar xz -curl -# "${GNUMIRROR}/binutils/binutils-${BINV}.tar.gz" | tar xz -curl -# "${MUSLMIRROR}/musl-${MUSLV}.tar.gz" | tar xz -curl -# "${LINUXMIRROR}/linux-${KERNV}.tar.xz" | tar xJ -} - -# -# ╺┓ -# ┃ -# ╺┻╸╹ -# Patch all source trees. -# This will take all patches in $PATCHD matching the programs -patch_sources() { -for DIR in $(find "${SRCDIR}" -maxdepth 1 -type d); do - cd "${DIR}" - cat "${PATCHD}/$(basename ${DIR})"-*.diff | patch -Np1 -done -} - -# -# ┏━┓ -# ┏━┛ -# ┗━╸╹ -# Get linux headers -install_headers() { -cd "${SRCDIR}/linux-${KERNV}" -make ARCH=${MARCH} headers_check -make ARCH=${MARCH} INSTALL_HDR_PATH=${PREFIX}/${TRIPLE} headers_install -rm -r "${SRCDIR}/linux-${KERNV}" -} - -# -# ┏━┓ -# ╺━┫ -# ┗━┛╹ -# Build binutils and install them to ${PREFIX} -install_binutils() { -mkdir -p "${BLDDIR}/binutils" -cd "${BLDDIR}/binutils" -${SRCDIR}/binutils-${BINV}/configure --target=${TRIPLE} \ - --prefix=${PREFIX} \ - --with-sysroot=${PREFIX}/${TRIPLE} \ - --disable-nls \ - --disable-shared \ - --disable-multilib -make configure-host -make LDFLAGS="${LDFLAGS} -all-static -static" -make install -rm -rf "${BLDDIR}/binutils" -rm -rf "${SRCDIR}/binutils-${BINV}" -} - -# -# ╻ ╻ -# ┗━┫ -# ╹╹ -# Build the musl libc -install_musl() { -cd "${SRCDIR}/musl-${MUSLV}" -./configure --prefix=${PREFIX}/${TRIPLE} \ - --target=${TRIPLE} \ - --disable-gcc-wrapper \ - --disable-debug \ - --disable-shared \ - --disable-warning -make LDFLAGS="${LDFLAGS}" -make install -rm -rf "${SRCDIR}/musl-${MUSLV}" -} - -# -# ┏━╸ -# ┗━┓ -# ┗━┛╹ -# Build pcc linked against musl -install_pcc() { -mkdir -p "${BLDDIR}/pcc" -mkdir -p "${BLDDIR}/pcc-libs" -cd "${BLDDIR}/pcc" -${SRCDIR}/pcc-${PCCV}/configure --target=${TRIPLE} \ - --with-libdir=${PREFIX}/${TRIPLE}/lib \ - --with-incdir=${PREFIX}/${TRIPLE}/include \ - --prefix=${PREFIX} - -make LDFLAGS="${LDFLAGS} -static" \ - PCCLIBDIR=${PREFIX}/${TRIPLE}/pcc/lib \ - PCCINCDIR=${PREFIX}/${TRIPLE}/pcc/include -make PCCLIBDIR=${PREFIX}/${TRIPLE}/pcc/lib \ - PCCINCDIR=${PREFIX}/${TRIPLE}/pcc/include \ - install -rm -rf "${BLDDIR}/pcc" -rm -rf "${SRCDIR}/pcc-${PCCV}" -} - -# -# ┏━┓ -# ┣━┓ -# ┗━┛╹ -# Build pcc libraries against musl -install_pcc_libs() { -cd "${BLDDIR}/pcc-libs" -${SRCDIR}/pcc-libs-${PCCV}/configure --target=${TRIPLE} \ - --prefix=${PREFIX} - -make PCCLIBDIR=${PREFIX}/${TRIPLE}/pcc/lib \ - PCCINCDIR=${PREFIX}/${TRIPLE}/pcc/include -make PCCLIBDIR=${PREFIX}/${TRIPLE}/pcc/lib \ - PCCINCDIR=${PREFIX}/${TRIPLE}/pcc/include \ - install -rm -rf "${BLDDIR}/pcc-libs" -rm -rf "${SRCDIR}/pcc-libs-${PCCV}" -} - -# -# ┏━┓ -# ┃ -# ╹╹ -# Add pkg-config wrapper -install_pkgconfig() { -cat << EOF > "${PREFIX}/bin/${TRIPLE}-pkg-config" -#!/bin/sh -export PKG_CONFIG_SYSROOT_DIR=${PREFIX}/${TRIPLE} -export PKG_CONFIG_LIBDIR=${PREFIX}/${TRIPLE}/usr/lib/pkgconfig -export PKG_CONFIG_PATH=\$PKG_CONFIG_LIBDIR - -exec pkg-config --static "\$@" -EOF -chmod 755 "${PREFIX}/bin/${TRIPLE}-pkg-config" -} - -grab_sources -patch_sources -install_headers -install_binutils -install_musl -install_pcc -install_pcc_libs -install_pkgconfig - -# clean environment -rm -rf "${SRCDIR}" -rm -rf "${BLDDIR}" -rm -rf "${PREFIX}/share" -rm -f "${PREFIX}/lib/libiberty.a" - -cat << EOF | tee ${PREFIX}/README -TRIPLET : $TRIPLE -PREFIX : $PREFIX -PCC : $PCCV -BINUTILS: $BINV -MUSL : $MUSLV -KERNEL : $KERNV -EOF diff --git a/data/info.sh b/data/info.sh @@ -1,61 +0,0 @@ -#!/bin/sh - -gitdir=http://git.z3bra.org -myblog=http://blog.z3bra.org - -c00=$'\e[0;30m' -c01=$'\e[0;31m' -c02=$'\e[0;32m' -c03=$'\e[0;33m' -c04=$'\e[0;34m' -c05=$'\e[0;35m' -c06=$'\e[0;36m' -c07=$'\e[0;37m' -c08=$'\e[1;30m' -c09=$'\e[1;31m' -c10=$'\e[1;32m' -c11=$'\e[1;33m' -c12=$'\e[1;34m' -c13=$'\e[1;35m' -c14=$'\e[1;36m' -c15=$'\e[1;37m' - -f0=$'\e[1;30m' -f1=$'\e[1;37m' -f2=$'\e[0;37m' - -kernel=`uname -rmo` -cpuspe="`sed -n '/model\ name/s/^.*:\ //p' /proc/cpuinfo | uniq` (x`nproc`)" -system=`sed 's/\s*[\(\\]\+.*$//' /etc/issue` - -if [ -n "$DISPLAY" ]; then - wmname=`xprop -root WM_NAME|cut -d\" -f2` - termfn=`sed -n 's/^.*\*font:\s* -\*-\([^-]*\)-.*/\1/p' ~/.Xresources|sed 1q` - systfn=`sed -n 's/^.*font.*"\(.*\)".*$/\1/p' ~/.gtkrc-2.0` -else - wmname="none" - termfn="none" - systfn="none" -fi - -pkgnum=`pacman -Q|wc -l` -birthd=`sed -n '1s/^\[\([0-9-]*\).*$/\1/p' /var/log/pacman.log | tr - .` - -cat << EOF -${c00}▉▉ | ${f1}OS ${f0}........... $f2$system -${c08} ▉▉| ${f1}name ${f0}......... $f2$HOSTNAME -${c01}▉▉ | ${f1}birth day${f0}..... $f2$birthd -${c09} ▉▉| ${f1}packages ${f0}..... $f2$pkgnum -${c02}▉▉ | -${c10} ▉▉| ${f1}wm ${f0}........... $f2$wmname -${c03}▉▉ | ${f1}shell ${f0}........ $f2$SHELL -${c11} ▉▉| ${f1}terminal ${f0}..... $f2$TERM -${c04}▉▉ | ${f1}term font ${f0}.... $f2$termfn -${c12} ▉▉| ${f1}system font ${f0}.. $f2$systfn -${c05}▉▉ | -${c13} ▉▉| ${f1}kernel ${f0}....... $f2$kernel -${c06}▉▉ | ${f1}processor ${f0}.... $f2$cpuspe -${c14} ▉▉| -${c07}▉▉ | ${f1}blog ${f0}......... $f2$myblog -${c15} ▉▉| ${f1}git repos ${f0}.... $f2$gitdir -EOF diff --git a/data/pcc-1.1.0-deflibdirs.diff b/data/pcc-1.1.0-deflibdirs.diff @@ -1,30 +0,0 @@ -diff -urN a/cc/cc/cc.c b/cc/cc/cc.c ---- a/cc/cc/cc.c 2015-08-16 16:00:18.867457413 +0200 -+++ b/cc/cc/cc.c 2015-08-16 16:03:28.963466133 +0200 -@@ -207,9 +207,9 @@ - #endif - #ifndef DEFLIBDIRS /* default library search paths */ - #ifdef MULTIARCH_PATH --#define DEFLIBDIRS { "/usr/lib/", 0 } -+#define DEFLIBDIRS { LIBDIR, 0 } - #else --#define DEFLIBDIRS { "/usr/lib/", "/usr/lib/" MULTIARCH_PATH "/", 0 } -+#define DEFLIBDIRS { LIBDIR, LIBDIR MULTIARCH_PATH "/", 0 } - #endif - #endif - #ifndef DEFLIBS /* default libraries included */ -diff -urN a/os/linux/ccconfig.h b/os/linux/ccconfig.h ---- a/os/linux/ccconfig.h 2015-08-16 16:00:18.873457413 +0200 -+++ b/os/linux/ccconfig.h 2015-08-16 16:05:23.446471384 +0200 -@@ -48,9 +48,9 @@ - "-D__amd64", "-D__LP64__", "-D_LP64", NULL, } - #define DYNLINKER { "-dynamic-linker", "/lib64/ld-linux-x86-64.so.2", NULL } - #ifndef MULTIARCH_PATH --#define DEFLIBDIRS { "/usr/lib64/", 0 } -+#define DEFLIBDIRS { LIBDIR, 0 } - #else --#define DEFLIBDIRS { "/usr/lib64/", "/usr/lib/" MULTIARCH_PATH "/", 0 } -+#define DEFLIBDIRS { LIBDIR, LIBDIR MULTIARCH_PATH "/", 0 } - #endif - #elif defined(mach_mips) - #define CPPMDADD { "-D__mips__", NULL, } diff --git a/data/pcc-1.1.0-musl.diff b/data/pcc-1.1.0-musl.diff @@ -1,21 +0,0 @@ -diff -urN a/config.sub b/config.sub ---- a/config.sub 2015-08-11 21:55:34.497619099 +0200 -+++ b/config.sub 2015-08-11 21:56:21.652621262 +0200 -@@ -120,7 +120,7 @@ -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-musl | linux-newlib* | linux-uclibc* | \ -uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -storm-chaos* | os2-emx* | rtmk-nova*) -os=-$maybe_os -@@ -1289,6 +1289,9 @@ --linux-dietlibc) -os=-linux-dietlibc -;; -+ -linux-musl) -+ os=-linux-musl -+ ;; --linux*) -os=`echo $os | sed -e 's|linux|linux-gnu|'` diff --git a/data/pcc-libs-1.1.0-musl.diff b/data/pcc-libs-1.1.0-musl.diff @@ -1,22 +0,0 @@ -diff -urN a/config.sub b/config.sub ---- a/config.sub 2015-08-11 21:55:34.497619099 +0200 -+++ b/config.sub 2015-08-11 21:56:21.652621262 +0200 -@@ -120,7 +120,7 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-musl | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os -@@ -1289,6 +1289,9 @@ - -linux-dietlibc) - os=-linux-dietlibc - ;; -+ -linux-musl) -+ os=-linux-musl -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;;