mkports

recipes for building multiple softwares with mk(1)
git clone git://z3bra.org/mkports
Log | Files | Refs

commit 3b914facd798f23244dd3370af319deed6d28722
parent 9ba47205eb12f62b4dcbbd1b4475b11f682e1ff4
Author: z3bra <willyatmailoodotorg>
Date:   Wed Feb 17 23:46:17 2016

Add gcc port, finally!

Diffstat:
 config.mk  | 29 ++++++++++++++---------------
 deps.mk    |  1 +
 gcc/mkfile | 29 +++++++++++++++++++++++++++++
 mkfile     |  2 +-
 4 files changed, 45 insertions(+), 16 deletions(-)

diff --git a/config.mk b/config.mk @@ -1,29 +1,28 @@ -CROSS = /opt/cross -PATH = ${CROSS}/bin:${PATH} TOOLCHAIN_TRIPLET = x86_64-linux-musl -ROOT = ${CROSS}/${TOOLCHAIN_TRIPLET} -NPROC = 4 +CROSS = /opt/cross/${TOOLCHAIN_TRIPLET} +ROOT = ${CROSS}/${TOOLCHAIN_TRIPLET} +PATH = ${CROSS}/bin:${PATH} +NPROC = 8 -CC = ${TOOLCHAIN_TRIPLET}-gcc -LD = $CC -AR = ${TOOLCHAIN_TRIPLET}-ar +CC = ${TOOLCHAIN_TRIPLET}-gcc -static +CXX = ${TOOLCHAIN_TRIPLET}-g++ -static +LD = $CC +AR = ${TOOLCHAIN_TRIPLET}-ar HOSTCC = $CC RANLIB = ${TOOLCHAIN_TRIPLET}-ranlib STRIP = ${TOOLCHAIN_TRIPLET}-strip PKG_CONFIG = ${TOOLCHAIN_TRIPLET}-pkg-config -CHOST = ${TOOLCHAIN_TRIPLET} -CBUILD = ${TOOLCHAIN_TRIPLET} CPPFLAGS = CFLAGS = ${CPPFLAGS} -LDFLAGS = -static -MAKEFLAGS = -j4 PREFIX= prefix= MANDIR=/man mandir=/man MANPREFIX=/man +LDFLAGS = +MAKEFLAGS = -j${NPROC} PREFIX= prefix= MANDIR=/man mandir=/man MANPREFIX=/man CONFIGURE = --prefix= \ - --build=${CBUILD} \ - --host=${CHOST} \ + --host=${TOOLCHAIN_TRIPLET} \ --mandir=/man \ --libdir=/lib \ --includedir=/include \ + --enable-static \ + --disable-shared \ --disable-nls \ - --disable-multilib \ - --disable-shared + --disable-multilib diff --git a/deps.mk b/deps.mk @@ -1,4 +1,5 @@ curl:V: libressl +gcc:V: libmpc git:V: libz iputils:V: libressl libarchive:V: libz diff --git a/gcc/mkfile b/gcc/mkfile @@ -0,0 +1,29 @@ +pkg = gcc +ver = 5.3.0 +#ver = 4.9.3 +url = ftp://ftp.gnu.org/pub/gnu/gcc/$pkg-$ver/$pkg-$ver.tar.gz + +<../config.mk +<../default.mk + +MAKEFLAGS = ${MAKEFLAGS} all-gcc all-target-libgcc +CONFIGURE = ${CONFIGURE} \ + --with-sysroot= \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-libsanitizer \ + --disable-libstdcxx \ + --enable-threads=posix \ + --enable-languages=c \ + --with-pkgversion="SPOINK-x86_64-static" + +#build:QV: fetch patch +# cd $pkg-$ver +# ./configure $CONFIGURE +# make CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" ${MAKEFLAGS} all-gcc all-target-libgcc + +install:QV: build + mkdir -p $destdir + cd $pkg-$ver + make ${MAKEFLAGS} DESTDIR=$destdir install-gcc install-target-libgcc + diff --git a/mkfile b/mkfile @@ -19,7 +19,7 @@ all:QV: ${ALL} # target "command line arguments" NPROC = 1 %:V: - if ! pm -i $stem >/dev/null; then + if ! pm -i $stem 2>/dev/null >/dev/null; then for d in $prereq; do pm -af $d/$d#*.tar.bz2; done cd $stem env -i PATH=$PATH mk