mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-21 12:24:17 +08:00
Merge remote-tracking branch 'origin/master' into redox-unix
This commit is contained in:
commit
8f73c678dc
10
cook.sh
10
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
|
||||
;;
|
||||
|
||||
@ -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)"
|
||||
|
||||
@ -12,6 +12,8 @@ function recipe_update {
|
||||
}
|
||||
|
||||
function recipe_build {
|
||||
export CFLAGS="-static"
|
||||
|
||||
./configure \
|
||||
--build="${BUILD}" \
|
||||
--host="${HOST}" \
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user