Merge remote-tracking branch 'origin/master' into allow_build_on_freebsd

This commit is contained in:
Iori Yoneji 2017-06-04 17:57:11 +00:00
commit 7c14c6e970
7 changed files with 179 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[dependencies.std]
features = ["panic_unwind"]
[dependencies.test]
stage = 1
#[dependencies.test]
#stage = 1

View File

@ -62,7 +62,12 @@ function op {
then
if [ ! -d source ]
then
git clone --recursive "$GIT" source
if [ -n "$BRANCH" ]
then
git clone --recursive "$GIT" -b "$BRANCH" source
else
git clone --recursive "$GIT" source
fi
fi
pushd source > /dev/null
@ -194,7 +199,7 @@ function op {
echo "target = \"$TARGET\"" >> "stage.toml"
mkdir -p stage/pkg
cp -v stage.toml "stage/pkg/$1.toml"
$ROOT/pkgutils/target/release/pkg create stage
TARGET=x86_64-unknown-redox cargo run --release --manifest-path "$ROOT/pkgutils/Cargo.toml" --bin pkg -- create stage
;;
untar)
rm -rfv stage.tar stage.sig stage.toml

@ -1 +1 @@
Subproject commit 4cf2e9d216721282a8f2bb82c031ee90ede878f4
Subproject commit de029601fdc1ec6368afa7fb6eeb33b9333beac9

60
recipes/gcc/recipe.sh Normal file
View File

@ -0,0 +1,60 @@
GIT=https://github.com/redox-os/gcc.git
BRANCH=redox
HOST=x86_64-elf-redox
export AR="${HOST}-ar"
export AS="${HOST}-as"
export CC="${HOST}-gcc"
export CXX="${HOST}-g++"
export LD="${HOST}-ld"
export NM="${HOST}-nm"
export OBJCOPY="${HOST}-objcopy"
export OBJDUMP="${HOST}-objdump"
export RANLIB="${HOST}-ranlib"
export READELF="${HOST}-readelf"
export STRIP="${HOST}-strip"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
}
function recipe_update {
echo "skipping update"
return 1
}
function recipe_build {
./contrib/download_prerequisites
cp config.sub gmp/config.sub
cp config.sub isl/config.sub
cp config.sub mpfr/config.sub
cp -f config.sub mpc/config.sub
pushd libstdc++-v3
autoconf2.64
popd
mkdir build
cd build
../configure --host=${HOST} --target=${HOST} --prefix=/ --enable-static --disable-shared --disable-dlopen --disable-nls --enable-languages=c --without-headers
make all-gcc all-target-libgcc
return 1
}
function recipe_test {
echo "skipping test"
return 1
}
function recipe_clean {
cd build
make clean
return 1
}
function recipe_stage {
dest="$(realpath $1)"
cd build
make DESTDIR="$dest" install-gcc install-target-libgcc
return 1
}

View File

@ -0,0 +1,50 @@
GIT=https://github.com/redox-os/binutils-gdb.git
HOST=x86_64-elf-redox
export AR="${HOST}-ar"
export AS="${HOST}-as"
export CC="${HOST}-gcc"
export CXX="${HOST}-g++"
export LD="${HOST}-ld"
export NM="${HOST}-nm"
export OBJCOPY="${HOST}-objcopy"
export OBJDUMP="${HOST}-objdump"
export RANLIB="${HOST}-ranlib"
export READELF="${HOST}-readelf"
export STRIP="${HOST}-strip"
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
}
function recipe_update {
echo "skipping update"
return 1
}
function recipe_build {
mkdir build
cd build
../configure --host=${HOST} --target=${HOST} --prefix=/ --with-sysroot=/usr/x86_64-elf-redox --disable-gdb --disable-nls --disable-werror
make
return 1
}
function recipe_test {
echo "skipping test"
return 1
}
function recipe_clean {
cd build
make clean
return 1
}
function recipe_stage {
dest="$(realpath $1)"
cd build
make DESTDIR="$dest" install
return 1
}

59
recipes/newlib/recipe.sh Normal file
View File

@ -0,0 +1,59 @@
GIT=https://github.com/redox-os/newlib.git
BRANCH=redox
CC=
HOST=x86_64-elf-redox
function recipe_version {
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
return 1
}
function recipe_update {
echo "skipping update"
return 1
}
function recipe_build {
pushd newlib/libc/sys
aclocal-1.11 -I ../..
autoconf
automake-1.11 --cygnus Makefile
popd
pushd newlib/libc/sys/redox
aclocal-1.11 -I ../../..
autoconf
automake-1.11 --cygnus Makefile
popd
mkdir build
cd build
../configure --target="${HOST}" --prefix=/
make
return 1
}
function recipe_test {
echo "skipping test"
return 1
}
function recipe_clean {
cd build
make clean
return 1
}
function recipe_stage {
dest="$(realpath $1)"
cd build
make DESTDIR="$dest" install
cd "$dest"
mv x86_64-elf-redox/* ./
rmdir x86_64-elf-redox
return 1
}

View File

@ -24,10 +24,4 @@ then
cargo install -f xargo
fi
echo "Building pkgutils"
pushd pkgutils
# TODO Change pkgutils to not hard code TARGET
TARGET=x86_64-unknown-redox cargo build --release
popd
echo "cook.sh is ready to use"