diff --git a/Dockerfile b/Dockerfile index 63a82d9..550dece 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,4 +31,4 @@ FROM rust:buster as toolchain RUN set -eux COPY --from=builder /root/prefix /root/prefix ENV PATH=/root/prefix/bin:$PATH \ - LD_LIBRARY_PATH=/root/prefix/lib:$LD_LIBRARY_PATH + LD_LIBRARY_PATH=/root/prefix/riscv64-hermit/lib:/root/prefix/lib:$LD_LIBRARY_PATH diff --git a/binutils b/binutils index 56df29c..22052af 160000 --- a/binutils +++ b/binutils @@ -1 +1 @@ -Subproject commit 56df29c0af4d8e5a3299c4fc5b4f6ce254a7c276 +Subproject commit 22052af64751089707780d3b5eb1a186fbf4b0a9 diff --git a/newlib b/newlib index 57d1f40..986404a 160000 --- a/newlib +++ b/newlib @@ -1 +1 @@ -Subproject commit 57d1f4051d264a375ec7b4eaefb889749f084905 +Subproject commit 986404a837fd85ac48aea819db4c0b6183f175e7 diff --git a/toolchain.sh b/toolchain.sh index ba6332b..ea9645d 100755 --- a/toolchain.sh +++ b/toolchain.sh @@ -50,10 +50,11 @@ export CFLAGS="-w" export CXXFLAGS="-w" # -O3 to enable optimizations -# -fPIE to enable position-independent code +# -fPIC to enable position-independent code # -fpermissive to downgrade the implicit declaration errors to warnings (occurs when compiling newlib with GCC 14) -export CFLAGS_FOR_TARGET="-O3 -fPIE -fpermissive" -export CXXFLAGS_FOR_TARGET="-O3 -fPIE -fpermissive" +# -ggdb to enable debugging information +export CFLAGS_FOR_TARGET="-ggdb -O3 -fPIC -fpermissive" +export CXXFLAGS_FOR_TARGET="-ggdb -O3 -fPIC -fpermissive" case "$TARGET" in x86_64-*) @@ -81,11 +82,7 @@ pushd "$BUILDDIR/binutils" --with-sysroot \ --disable-werror \ --disable-multilib \ - --disable-shared \ --disable-nls \ - --disable-gdb \ - --disable-libdecnumber \ - --disable-readline \ --disable-sim \ --enable-tls \ --enable-lto \ @@ -112,7 +109,6 @@ pushd "$BUILDDIR/gcc-1" --with-isl \ --enable-languages=c,c++,lto \ --disable-nls \ - --disable-shared \ --disable-libssp \ --disable-libgomp \ --enable-threads=posix \ @@ -133,11 +129,11 @@ echo mkdir -p "$BUILDDIR/hermit" pushd "$HERE/hermit" -cargo run --package=xtask build --arch "$ARCH" --release --no-default-features --features pci,smp,acpi,newlib,tcp,dhcpv4 --target-dir "$BUILDDIR/hermit" +HERMIT_LOG_LEVEL_FILTER=Debug cargo run --package=xtask build --arch "$ARCH" --no-default-features --features pci,smp,acpi,newlib,tcp,dhcpv4 --target-dir "$BUILDDIR/hermit" popd mkdir -p "$PREFIX/$TARGET/lib" -cp "$BUILDDIR/hermit/$ARCH/release/libhermit.a" "$PREFIX/$TARGET/lib/libhermit.a" +cp "$BUILDDIR/hermit/$ARCH/debug/libhermit.a" "$PREFIX/$TARGET/lib/libhermit.a" echo echo "*****************************" @@ -151,7 +147,6 @@ pushd "$BUILDDIR/newlib" "$HERE/newlib/configure" \ --target="$TARGET" \ --prefix="$PREFIX" \ - --disable-shared \ --disable-multilib \ --enable-lto \ --enable-newlib-io-c99-formats \ @@ -199,7 +194,6 @@ pushd "$BUILDDIR/gcc-2" --without-libatomic \ --enable-languages=c,c++,lto \ --disable-nls \ - --disable-shared \ --enable-libssp \ --enable-threads=posix \ --enable-libgomp \