From f84eb0c265197bddb51f8dbdc2d5f4ac133f5a93 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Fri, 21 Jun 2019 21:06:46 -0600 Subject: [PATCH] Compile statically on everything --- recipes/expat/recipe.sh | 1 + recipes/ffmpeg/recipe.sh | 2 +- recipes/gcc/recipe.sh | 2 +- recipes/gettext/recipe.sh | 2 +- recipes/glib/recipe.sh | 2 +- recipes/gnu-binutils/recipe.sh | 12 +++++++++++- recipes/gnu-grep/recipe.sh | 1 + recipes/gnu-make/recipe.sh | 8 +++++++- recipes/gstreamer/recipe.sh | 2 +- recipes/libiconv/recipe.sh | 1 + recipes/libjpeg/recipe.sh | 1 + recipes/libpng/recipe.sh | 2 +- recipes/llvm/recipe.sh | 1 + recipes/mgba/recipe.sh | 2 +- recipes/nasm/recipe.sh | 1 + recipes/ncdu/recipe.sh | 2 +- recipes/openjazz/recipe.sh | 2 +- recipes/osdemo/recipe.sh | 2 +- recipes/patch/recipe.sh | 1 + recipes/pcre/recipe.sh | 2 +- recipes/schismtracker/recipe.sh | 2 +- recipes/scummvm/recipe.sh | 2 +- recipes/sdl-player/recipe.sh | 2 +- recipes/sed/recipe.sh | 6 +++++- recipes/sopwith/recipe.sh | 8 ++++++-- recipes/timidity/recipe.sh | 7 ++++++- recipes/vice/recipe.sh | 2 +- recipes/vim/recipe.sh | 2 +- recipes/vttest/recipe.sh | 6 +++++- 29 files changed, 63 insertions(+), 23 deletions(-) diff --git a/recipes/expat/recipe.sh b/recipes/expat/recipe.sh index d8f78f611..65a48648c 100644 --- a/recipes/expat/recipe.sh +++ b/recipes/expat/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="--static" ./configure --build=${BUILD} --host=${HOST} --prefix=/ make -j"$(nproc)" skip=1 diff --git a/recipes/ffmpeg/recipe.sh b/recipes/ffmpeg/recipe.sh index c72997715..af1a18f76 100644 --- a/recipes/ffmpeg/recipe.sh +++ b/recipes/ffmpeg/recipe.sh @@ -15,8 +15,8 @@ function recipe_update { function recipe_build { sysroot="$PWD/../sysroot" - export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib -static" ./configure \ --enable-cross-compile \ --target-os=redox \ diff --git a/recipes/gcc/recipe.sh b/recipes/gcc/recipe.sh index 93a567e93..b325b3293 100644 --- a/recipes/gcc/recipe.sh +++ b/recipes/gcc/recipe.sh @@ -25,7 +25,7 @@ function recipe_build { mkdir -p "$sysroot/usr" ln -sf "$sysroot/include" "$sysroot/usr/include" ln -sf "$sysroot/lib" "$sysroot/usr/lib" - + export LDFLAGS="-static" ./configure \ --build=${BUILD} \ --host=${HOST} \ diff --git a/recipes/gettext/recipe.sh b/recipes/gettext/recipe.sh index 762f8f5e2..b36256561 100644 --- a/recipes/gettext/recipe.sh +++ b/recipes/gettext/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib --static" wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub ./configure \ --build=${BUILD} \ diff --git a/recipes/glib/recipe.sh b/recipes/glib/recipe.sh index cb9991f09..ac105727f 100644 --- a/recipes/glib/recipe.sh +++ b/recipes/glib/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib --static" glib_cv_stack_grows=no glib_cv_uscore=no ./autogen.sh \ --build=${BUILD} \ --host=${HOST} \ diff --git a/recipes/gnu-binutils/recipe.sh b/recipes/gnu-binutils/recipe.sh index 16c2b954d..53349d202 100644 --- a/recipes/gnu-binutils/recipe.sh +++ b/recipes/gnu-binutils/recipe.sh @@ -17,7 +17,17 @@ function recipe_build { mkdir -p "$sysroot/usr" ln -sf "$sysroot/include" "$sysroot/usr/include" ln -sf "$sysroot/lib" "$sysroot/usr/lib" - ./configure --build=${BUILD} --host=${HOST} --target=${HOST} --prefix=/ --with-sysroot=/ --with-build-sysroot="$sysroot" --disable-gdb --disable-nls --disable-werror + export LDFLAGS="--static" + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --target=${HOST} \ + --prefix=/ \ + --with-sysroot=/ \ + --with-build-sysroot="$sysroot" \ + --disable-gdb \ + --disable-nls \ + --disable-werror make -j"$(nproc)" skip=1 } diff --git a/recipes/gnu-grep/recipe.sh b/recipes/gnu-grep/recipe.sh index e45ebf0b4..691bb7c1d 100644 --- a/recipes/gnu-grep/recipe.sh +++ b/recipes/gnu-grep/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="-static" ./configure --build=${BUILD} --host=${HOST} --prefix=/ make -j"$(nproc)" skip=1 diff --git a/recipes/gnu-make/recipe.sh b/recipes/gnu-make/recipe.sh index 523b32e97..35be95aba 100644 --- a/recipes/gnu-make/recipe.sh +++ b/recipes/gnu-make/recipe.sh @@ -12,7 +12,13 @@ function recipe_update { } function recipe_build { - ./configure --build=${BUILD} --host=${HOST} --prefix=/ CFLAGS="-DPOSIX -DNO_ARCHIVES -DNO_OUTPUT_SYNC" --without-guile + export CFLAGS="-DPOSIX -DNO_ARCHIVES -DNO_OUTPUT_SYNC" + export LDFLAGS="-static" + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix=/ \ + --without-guile make -j"$(nproc)" skip=1 } diff --git a/recipes/gstreamer/recipe.sh b/recipes/gstreamer/recipe.sh index 370edb7f4..9cf1a3e5a 100644 --- a/recipes/gstreamer/recipe.sh +++ b/recipes/gstreamer/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib --static" export GLIB_GENMARSHAL="$(which glib-genmarshal)" export GLIB_MKENUMS="$(which glib-mkenums)" ./configure \ diff --git a/recipes/libiconv/recipe.sh b/recipes/libiconv/recipe.sh index 6f1cedaba..fb61b7924 100644 --- a/recipes/libiconv/recipe.sh +++ b/recipes/libiconv/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="--static" ./configure --build=${BUILD} --host=${HOST} --prefix='/' --disable-shared --enable-static make -j"$(nproc)" skip=1 diff --git a/recipes/libjpeg/recipe.sh b/recipes/libjpeg/recipe.sh index b476840be..f37b0c343 100644 --- a/recipes/libjpeg/recipe.sh +++ b/recipes/libjpeg/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="--static" ./configure --build=${BUILD} --host=${HOST} --prefix='/' make -j"$(nproc)" skip=1 diff --git a/recipes/libpng/recipe.sh b/recipes/libpng/recipe.sh index 224557ffe..6d9f93cf9 100644 --- a/recipes/libpng/recipe.sh +++ b/recipes/libpng/recipe.sh @@ -14,8 +14,8 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" - export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include" + export LDFLAGS="-L$sysroot/lib --static" chmod +w config.sub wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub ./configure --build=${BUILD} --host=${HOST} --prefix='/' diff --git a/recipes/llvm/recipe.sh b/recipes/llvm/recipe.sh index f84ffaf3e..923f9b182 100644 --- a/recipes/llvm/recipe.sh +++ b/recipes/llvm/recipe.sh @@ -26,6 +26,7 @@ function recipe_build { -DCMAKE_BUILD_TYPE=Release -DCMAKE_CROSSCOMPILING=True -DCMAKE_CXX_FLAGS="--std=gnu++11" + -DCMAKE_EXE_LINKER_FLAGS="-static" -DCMAKE_RANLIB="$(which "${RANLIB}")" -DCMAKE_INSTALL_PREFIX="/" -DCMAKE_SYSTEM_NAME=Generic diff --git a/recipes/mgba/recipe.sh b/recipes/mgba/recipe.sh index 57484eccc..e4da44bde 100644 --- a/recipes/mgba/recipe.sh +++ b/recipes/mgba/recipe.sh @@ -16,7 +16,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" mkdir -p build cd build diff --git a/recipes/nasm/recipe.sh b/recipes/nasm/recipe.sh index f2947f2ec..07b6db6c5 100644 --- a/recipes/nasm/recipe.sh +++ b/recipes/nasm/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="-static" ./configure --build=${BUILD} --host=${HOST} --prefix="" make -j"$(nproc)" skip=1 diff --git a/recipes/ncdu/recipe.sh b/recipes/ncdu/recipe.sh index cb90b7014..55f3e3683 100644 --- a/recipes/ncdu/recipe.sh +++ b/recipes/ncdu/recipe.sh @@ -13,8 +13,8 @@ function recipe_update { } function recipe_build { sysroot="$PWD/../sysroot" - export LDFLAGS="-L$sysroot/lib" export CPPFLAGS="-I$sysroot/include -I$sysroot/include/ncurses" + export LDFLAGS="-L$sysroot/lib -static" ./configure \ --build=${BUILD} \ --host="$HOST" \ diff --git a/recipes/openjazz/recipe.sh b/recipes/openjazz/recipe.sh index 5eb28453a..3ccda9877 100644 --- a/recipes/openjazz/recipe.sh +++ b/recipes/openjazz/recipe.sh @@ -16,7 +16,7 @@ function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -UUSE_SOCKETS -UUSE_SDL_NET" export CPPFLAGS="$CFLAGS" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" touch INSTALL NEWS README AUTHORS ChangeLog COPYING autoreconf -fvi autoconf diff --git a/recipes/osdemo/recipe.sh b/recipes/osdemo/recipe.sh index 37599034f..c32f72a00 100644 --- a/recipes/osdemo/recipe.sh +++ b/recipes/osdemo/recipe.sh @@ -19,7 +19,7 @@ function recipe_prepare { function recipe_build { sysroot="$(realpath ../sysroot)" set -x - "${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -lorbital $("${PKG_CONFIG}" --libs glu) -lglapi -lz + "${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" osdemo.c -o osdemo -static -lorbital $("${PKG_CONFIG}" --libs glu) -lglapi -lz set +x skip=1 } diff --git a/recipes/patch/recipe.sh b/recipes/patch/recipe.sh index 20e62b203..b0c6a791a 100644 --- a/recipes/patch/recipe.sh +++ b/recipes/patch/recipe.sh @@ -12,6 +12,7 @@ function recipe_update { } function recipe_build { + export LDFLAGS="-static" wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub autoreconf ./configure --build=${BUILD} --host=${HOST} --prefix=/ diff --git a/recipes/pcre/recipe.sh b/recipes/pcre/recipe.sh index 62a3aa6a9..b6f3df1b0 100644 --- a/recipes/pcre/recipe.sh +++ b/recipes/pcre/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib --static" ./configure \ --build=${BUILD} \ --host=${HOST} \ diff --git a/recipes/schismtracker/recipe.sh b/recipes/schismtracker/recipe.sh index 92e52eb34..933d1efdf 100644 --- a/recipes/schismtracker/recipe.sh +++ b/recipes/schismtracker/recipe.sh @@ -16,7 +16,7 @@ function recipe_update { function recipe_build { sysroot="${PWD}/../sysroot" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" export SDL_CONFIG="$sysroot/bin/sdl-config" autoreconf -i ./configure --build=${BUILD} --host=${HOST} --prefix='' diff --git a/recipes/scummvm/recipe.sh b/recipes/scummvm/recipe.sh index 582a42d5d..e0303fb00 100644 --- a/recipes/scummvm/recipe.sh +++ b/recipes/scummvm/recipe.sh @@ -16,7 +16,7 @@ function recipe_update { function recipe_build { wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub sysroot="$(realpath ../sysroot)" - + export LDFLAGS="-static" ./configure \ --host=${HOST} \ --prefix='' \ diff --git a/recipes/sdl-player/recipe.sh b/recipes/sdl-player/recipe.sh index 5c145cd09..0aedb7f71 100644 --- a/recipes/sdl-player/recipe.sh +++ b/recipes/sdl-player/recipe.sh @@ -14,7 +14,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" export CPPFLAGS="-I$sysroot/include" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" make -j"$(nproc)" skip=1 } diff --git a/recipes/sed/recipe.sh b/recipes/sed/recipe.sh index 1dce07714..90105f472 100644 --- a/recipes/sed/recipe.sh +++ b/recipes/sed/recipe.sh @@ -12,7 +12,11 @@ function recipe_update { } function recipe_build { - ./configure --build=${BUILD} --host=${HOST} --prefix=/ + export LDFLAGS="-static" + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix=/ make -j"$(nproc)" skip=1 } diff --git a/recipes/sopwith/recipe.sh b/recipes/sopwith/recipe.sh index 744950736..4f4603f96 100644 --- a/recipes/sopwith/recipe.sh +++ b/recipes/sopwith/recipe.sh @@ -16,9 +16,13 @@ function recipe_build { wget -O autotools/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub sysroot="$(realpath ../sysroot)" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" export LIBS="-lSDL -lorbital" # TODO: Uses sdl-config instead of pkg-config - ./configure --build=${BUILD} --host=${HOST} --prefix='' --with-sdl-prefix="$sysroot" + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix='' \ + --with-sdl-prefix="$sysroot" make -j"$(nproc)" skip=1 } diff --git a/recipes/timidity/recipe.sh b/recipes/timidity/recipe.sh index c10b7fee4..3c73161d3 100644 --- a/recipes/timidity/recipe.sh +++ b/recipes/timidity/recipe.sh @@ -14,9 +14,14 @@ function recipe_update { } function recipe_build { + export LDFLAGS="-static" autoreconf -f -i wget -O autoconf/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - ./configure --build=${BUILD} --host=${HOST} --prefix='' --enable-vt100 + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix='' \ + --enable-vt100 make -j"$(nproc)" skip=1 } diff --git a/recipes/vice/recipe.sh b/recipes/vice/recipe.sh index 5387bfdb4..9146c873d 100644 --- a/recipes/vice/recipe.sh +++ b/recipes/vice/recipe.sh @@ -20,7 +20,7 @@ function recipe_build { export sdl_config="$sysroot/bin/sdl-config" export CFLAGS="-I$sysroot/include -I$sysroot/include/SDL" export CXXFLAGS="$CFLAGS" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" ./configure \ --build=${BUILD} \ diff --git a/recipes/vim/recipe.sh b/recipes/vim/recipe.sh index afc09c279..a6e662ead 100644 --- a/recipes/vim/recipe.sh +++ b/recipes/vim/recipe.sh @@ -15,7 +15,7 @@ function recipe_update { function recipe_build { sysroot="$(realpath ../sysroot)" - export LDFLAGS="-L$sysroot/lib" + export LDFLAGS="-L$sysroot/lib -static" export CPPFLAGS="-I$sysroot/include" export vim_cv_toupper_broken=set export vim_cv_terminfo=no diff --git a/recipes/vttest/recipe.sh b/recipes/vttest/recipe.sh index b1147b68b..8b2b106db 100644 --- a/recipes/vttest/recipe.sh +++ b/recipes/vttest/recipe.sh @@ -12,8 +12,12 @@ function recipe_update { } function recipe_build { + export LDFLAGS="-static" wget -O config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - ./configure --build=${BUILD} --host=${HOST} --prefix='' + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix='' make -j"$(nproc)" skip=1 }