From ab95a71636d683f339375c9dc35ac5ea2dda4f51 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Thu, 25 Apr 2019 17:09:57 +0200 Subject: [PATCH 1/6] New flag: Enable example binaries alongside using EXAMPLES=1 --- cook.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cook.sh b/cook.sh index 6cd0bf228..bad288a48 100755 --- a/cook.sh +++ b/cook.sh @@ -10,6 +10,7 @@ export CARGO=(env RUSTFLAGS="$PREFIX_RUSTFLAGS" xargo) export CARGOBUILD=rustc export CARGOFLAGS= export DEBUG= +export EXAMPLES= export PREPARE_COPY=1 if [ ! "$(uname -s)" = "Redox" ] @@ -355,6 +356,7 @@ function op { op $1 unstage mkdir -p stage stage="$(realpath stage)" + source="$(realpath source)" pushd build > /dev/null skip=0 if [ "$(type -t recipe_stage)" = "function" ] @@ -372,15 +374,15 @@ function op { fi bins="$(find target/$TARGET/$build/ -maxdepth 1 -type f ! -name '*.*')" - if [ -z "$bins" ] + if [ -z "$bins" ] || [ "$EXAMPLES" == 1 ] then example=true - bins="$(find target/$TARGET/$build/examples/ -maxdepth 1 -type f ! -name '*.*' ! -name '*-*' \ + bins="$bins $(find target/$TARGET/$build/examples/ -maxdepth 1 -type f ! -name '*.*' ! -name '*-*' \ 2> /dev/null || true)" fi if [ -n "$bins" ] then - if [ -n "$example" ] + if [ -n "$example" ] && [ "$EXAMPLES" != 1 ] then echo "$(tput bold)Note$(tput sgr0): No binaries detected, using example binaries" fi @@ -398,7 +400,7 @@ function op { echo "$(tput bold)Warning$(tput sgr0): Recipe does not have any binaries" >&2 fi - docgen ../source ../stage/ref + docgen "$source" "$stage/ref" fi popd > /dev/null ;; From 137cf05779f3f2d8903a910ce20a53488b8ae735 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 14 May 2019 13:55:11 -0600 Subject: [PATCH 2/6] Strip userutils binaries --- recipes/userutils/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/userutils/recipe.sh b/recipes/userutils/recipe.sh index 4384373c2..08015f655 100644 --- a/recipes/userutils/recipe.sh +++ b/recipes/userutils/recipe.sh @@ -27,7 +27,7 @@ function recipe_stage { for bin in "${BINS[@]}" do - cp -v "target/$TARGET/$build/$bin" "$1/bin" + "$STRIP" -v "target/$TARGET/$build/$bin" -o "$1/bin/$bin" done cp -Rv "res" "$1/etc" From c61e25dbd2897e8f4e9b8f529e6705c9bf05978d Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 2 Jun 2019 10:50:15 -0600 Subject: [PATCH 3/6] Build xz statically and disable executables --- recipes/xz/recipe.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/recipes/xz/recipe.sh b/recipes/xz/recipe.sh index d5ca281d1..8e483f20b 100644 --- a/recipes/xz/recipe.sh +++ b/recipes/xz/recipe.sh @@ -12,14 +12,23 @@ function recipe_update { } function recipe_build { - # Workaround of - # xzdec: hidden symbol `main' in xzdec-xzdec.o is referenced by DSO - export CFLAGS="-fvisibility=default" + export CFLAGS="-static" ./autogen.sh chmod +w build-aux/config.sub wget -O build-aux/config.sub http://git.savannah.gnu.org/cgit/config.git/plain/config.sub - ./configure --build=${BUILD} --host=${HOST} --prefix=/ --enable-threads=no + ./configure \ + --build=${BUILD} \ + --host=${HOST} \ + --prefix=/ \ + --disable-lzmadec \ + --disable-lzmainfo \ + --disable-xz \ + --disable-xzdec \ + --enable-shared=no \ + --enable-static=yes \ + --enable-threads=no \ + --with-pic=no make -j"$(nproc)" skip=1 } From 9ada0d9674bc93de2aadccd8465def5ed0dba379 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 2 Jun 2019 11:05:56 -0600 Subject: [PATCH 4/6] Fix ion by reverting --- recipes/curl/recipe.sh | 2 +- recipes/ion/recipe.sh | 1 + recipes/mesa/recipe.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/curl/recipe.sh b/recipes/curl/recipe.sh index 0bf0d3882..988c35e35 100644 --- a/recipes/curl/recipe.sh +++ b/recipes/curl/recipe.sh @@ -1,7 +1,7 @@ VERSION="7.62.0" #TAR=https://curl.haxx.se/download/curl-$VERSION.tar.gz GIT=https://gitlab.redox-os.org/redox-os/curl.git -GIT_BRANCH=redox +BRANCH=redox BUILD_DEPENDS=(nghttp2 openssl zlib) DEPENDS="ca-certificates" diff --git a/recipes/ion/recipe.sh b/recipes/ion/recipe.sh index fda62673f..6505c4a2b 100644 --- a/recipes/ion/recipe.sh +++ b/recipes/ion/recipe.sh @@ -1 +1,2 @@ GIT=https://gitlab.redox-os.org/redox-os/ion.git +BRANCH=redox diff --git a/recipes/mesa/recipe.sh b/recipes/mesa/recipe.sh index 861cb33a1..16b053a38 100644 --- a/recipes/mesa/recipe.sh +++ b/recipes/mesa/recipe.sh @@ -1,6 +1,6 @@ GIT=https://gitlab.redox-os.org/redox-os/mesa.git GIT_UPSTREAM=git://anongit.freedesktop.org/mesa/mesa -GIT_BRANCH=redox +BRANCH=redox BUILD_DEPENDS=(expat llvm zlib) function recipe_version { From b24ca8c7e16b25bcf3b70063c61b11a09a5dfd53 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sun, 2 Jun 2019 11:08:52 -0600 Subject: [PATCH 5/6] nghttp2: static compilation --- recipes/nghttp2/recipe.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes/nghttp2/recipe.sh b/recipes/nghttp2/recipe.sh index f077220c8..7b1325c4f 100644 --- a/recipes/nghttp2/recipe.sh +++ b/recipes/nghttp2/recipe.sh @@ -12,6 +12,8 @@ function recipe_update { } function recipe_build { + export CFLAGS="-static" + ./configure \ --build="${BUILD}" \ --host="${HOST}" \ From 1483b6cd5c724870b0c2a9d7fc6dd4eca6a6c3db Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 11 Jun 2019 16:51:18 -0600 Subject: [PATCH 6/6] Build netsurf statically --- recipes/netsurf/recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/netsurf/recipe.sh b/recipes/netsurf/recipe.sh index 0bfc582b2..898ac433e 100644 --- a/recipes/netsurf/recipe.sh +++ b/recipes/netsurf/recipe.sh @@ -17,7 +17,7 @@ function recipe_build { sysroot="$(realpath ../sysroot)" export TARGET="framebuffer" export CFLAGS="-I$sysroot/include -I${PWD}/inst-${TARGET}/include" - export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib -Wl,--allow-multiple-definition -Wl,-Bstatic" + export LDFLAGS="-L$sysroot/lib -L${PWD}/inst-${TARGET}/lib -static -Wl,--allow-multiple-definition -Wl,-Bstatic" # nghttp2 is not linked for some reason export LDFLAGS="${LDFLAGS} -lcurl -lnghttp2" make V=1 -j"$(nproc)"