From bc611cf36e54f2abd4a666c38bab12c0a9c29f1a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 5 Jan 2019 10:26:23 -0700 Subject: [PATCH] Prepare for use of llvmpipe --- recipes/cargo/recipe.sh | 8 +++++--- recipes/gears/recipe.sh | 4 ++-- recipes/hematite/recipe.sh | 10 ++++------ 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/recipes/cargo/recipe.sh b/recipes/cargo/recipe.sh index d970be189..a5cbda87c 100644 --- a/recipes/cargo/recipe.sh +++ b/recipes/cargo/recipe.sh @@ -1,9 +1,11 @@ GIT=https://gitlab.redox-os.org/redox-os/cargo.git +GIT_UPSTREAM=https://github.com/rust-lang/cargo.git BRANCH=redox BUILD_DEPENDS=(openssl zlib) function recipe_build { - export DEP_OPENSSL_ROOT="$PWD/../sysroot" - export OPENSSL_DIR="$PWD/../sysroot" - export DEP_Z_ROOT="$PWD/../sysroot" + sysroot="$(realpath ../sysroot)" + export DEP_OPENSSL_ROOT="$sysroot" + export OPENSSL_DIR="$sysroot" + export DEP_Z_ROOT="$sysroot" } diff --git a/recipes/gears/recipe.sh b/recipes/gears/recipe.sh index 77f19a9b8..12e1e41b9 100644 --- a/recipes/gears/recipe.sh +++ b/recipes/gears/recipe.sh @@ -1,4 +1,4 @@ -BUILD_DEPENDS=(liborbital mesa mesa_glu zlib) +BUILD_DEPENDS=(liborbital llvm mesa mesa_glu zlib) function recipe_version { printf "1.0.0" @@ -19,7 +19,7 @@ function recipe_prepare { function recipe_build { sysroot="$(realpath ../sysroot)" set -x - "${CXX}" -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -lorbital $("${PKG_CONFIG}" --libs glu) -lglapi -lz -Wl,--whole-archive -lpthread -Wl,--no-whole-archive + "${CXX}" -O2 -I "$sysroot/include" -L "$sysroot/lib" gears.c -o gears -lorbital $("${PKG_CONFIG}" --libs glu) -lglapi -lz set +x skip=1 } diff --git a/recipes/hematite/recipe.sh b/recipes/hematite/recipe.sh index 077664969..7dfcbbd6a 100644 --- a/recipes/hematite/recipe.sh +++ b/recipes/hematite/recipe.sh @@ -1,18 +1,16 @@ GIT=https://gitlab.redox-os.org/redox-os/hematite.git GIT_UPSTREAM=https://github.com/PistonDevelopers/hematite.git -BUILD_DEPENDS=(mesa zlib) +BUILD_DEPENDS=(mesa llvm zlib) BRANCH=redox function recipe_build { sysroot="$(realpath ../sysroot)" cp -p "$ROOT/Xargo.toml" "Xargo.toml" + set -x xargo rustc --target "$TARGET" --release ${CARGOFLAGS} \ -- \ -L "${sysroot}/lib" \ - -l OSMesa \ - -l glapi \ - -l z \ - -l stdc++ \ - -C link-args="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" + -C link-args="$("${PKG_CONFIG}" --libs osmesa) -lglapi -lz -lstdc++ -lc -lgcc" + set +x skip=1 }