diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3b68188..7acd13ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,7 +15,7 @@ jobs: - run: apt-get update - run: apt-get install apt-transport-https ca-certificates -y - run: update-ca-certificates - - run: apt install -y gcc make autoconf g++ texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext meson + - run: apt install -y gcc make autoconf g++ gnat texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext meson - run: bash download.sh - run: bash bootstrap.sh - run: bash compile.sh @@ -23,7 +23,7 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v2 - - run: apt install -y gcc make autoconf g++ texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext + - run: apt install -y gcc make autoconf g++ gnat texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext - run: bash download.sh - run: CPU=x86_64 bash bootstrap.sh - run: CPU=x86_64 bash compile.sh @@ -31,6 +31,6 @@ jobs: runs-on: self-hosted steps: - uses: actions/checkout@v2 - - run: apt install -y gcc make autoconf g++ texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext + - run: apt install -y gcc make autoconf g++ gnat texinfo libmpfr-dev libgmp-dev wget bzip2 git xz-utils sudo libmpc-dev zlib1g-dev bison flex gawk autopoint libtool fakeroot mount parted gettext - run: bash download.sh - run: USER32="true" CPU=x86_64 bash bootstrap-kernel.sh diff --git a/bootstrap-funcs.sh b/bootstrap-funcs.sh index 35aa6191..d39086d9 100644 --- a/bootstrap-funcs.sh +++ b/bootstrap-funcs.sh @@ -52,13 +52,18 @@ compile_gcc() { --disable-libquadmath \ --disable-libssp \ --disable-libvtv \ - --disable-libstdcxx \ - --enable-languages=c && + --enable-languages=c,c++,ada && make -j$PROCS all-gcc && make -j$PROCS install-gcc && make -j$PROCS configure-target-libgcc && make -j$PROCS all-target-libgcc && make -j$PROCS install-target-libgcc && + make -j$PROCS configure-target-libada && + make -j$PROCS all-target-libada && + make -j$PROCS install-target-libada && + make -j$PROCS configure-target-libstdc++-v3 && + make -j$PROCS all-target-libstdc++-v3 && + make -j$PROCS install-target-libstdc++-v3 && mv config.status config.status.removed && rm -f config.cache *config.cache */*/config.cache && cd .. @@ -165,9 +170,8 @@ compile_full_gcc() { --with-sysroot="$SYSTEM" \ --with-local-prefix="$SYS_ROOT" \ --with-native-system-header-dir="$SYS_ROOT"/include \ - --disable-static \ --disable-nls \ - --enable-languages=c,c++ \ + --enable-languages=c,c++,ada \ --enable-threads=posix \ --disable-multilib \ --with-system-zlib \ diff --git a/compile.sh b/compile.sh index 89c92375..d76df248 100755 --- a/compile.sh +++ b/compile.sh @@ -542,7 +542,7 @@ install_gcc() { --disable-bootstrap \ --with-local-prefix="$SYS_ROOT" \ --disable-nls \ - --enable-languages=c,c++ \ + --enable-languages=c,c++,ada \ --disable-libstdcxx-pch \ --with-system-zlib \ --with-native-system-header-dir="$SYS_ROOT/include" \ diff --git a/download-funcs.sh b/download-funcs.sh index 509654f3..4ca5f282 100644 --- a/download-funcs.sh +++ b/download-funcs.sh @@ -180,6 +180,17 @@ download_glibc() { cd .. } +download_gcc () { + download $GCC_PKG $GCC_URL && + if [ -d "$GCC_SRC" ]; then + return 0 + fi + unpack xf $GCC_PKG $GCC_SRC && + pushd $GCC_SRC && + apply_patch $SCRIPT_DIR/patches/gcc/ada-hurd-amd64.diff 1 && + popd +} + download_sed() { download $SED_PKG $SED_URL && if [ -d "$SED_SRC" ]; then diff --git a/patches/gcc/ada-hurd-amd64.diff b/patches/gcc/ada-hurd-amd64.diff new file mode 100644 index 00000000..721ee01c --- /dev/null +++ b/patches/gcc/ada-hurd-amd64.diff @@ -0,0 +1,40 @@ +--- a/src/gcc/ada/Makefile.rtl ++++ b/src/gcc/ada/Makefile.rtl +@@ -1674,6 +1674,37 @@ ifeq ($(strip $(filter-out x86_64 kfreeb + LIBRARY_VERSION := $(LIB_VERSION) + endif + ++# x86_64-pc-gnu i.e. GNU Hurd ++ifeq ($(strip $(filter-out x86_64 pc gnu,$(target_cpu) $(target_os))),) ++ ++ SELECTED_PAIRS=x86_64-gnuhurd ++ ++ LIBGNAT_TARGET_PAIRS = \ ++ a-intnam.ads