summaryrefslogtreecommitdiff
path: root/Toolchain/BuildIt.sh
AgeCommit message (Collapse)Author
2023-05-15Toolchain+Ports: Update GCC to 13.1.0Daniel Bertalan
This is a mostly straight-forward rebase of our patches on top of 13.1.0. The spec files needed a change, as GCC no longer supports STABS debug information, but we were building GCC with support for it. Highlights of this release include static `operator()`, The Equality Operator You Are Looking For and extended `constexpr` support.
2023-05-15Toolchain: Use xz-compressed GCC and Binutils archivesDaniel Bertalan
This reduces the downloaded archives' size from 143+46 MB to 81+25 MB.
2023-05-07Toolchain: Replace inline nproc with get_number_of_processing_units()Kenneth Myhra
2023-04-25Toolchain: Exit Build*.sh scripts if executed as rootKenneth Myhra
2023-04-11Toolchain: Move GDB build to a separate scriptDaniel Bertalan
Target GDB is only used for debugging the kernel, which is not relevant to most people. Starting with 924758c6f8bcf, GDB would always be built as part of the toolchain if the user didn't have it installed. This is unnecessary. This commit adds a separate script for building GDB, which the user needs to explicitly invoke. A message is added to Meta/debug-kernel.sh which alerts the user to this fact.
2023-04-09Meta+Toolchain: Redirect GDB error output to stdout before greppingTim Schumacher
2023-04-03Toolchain+Meta: Support kernel debugging with host AArch64 GDBDaniel Bertalan
Previously, we would unconditionally build GDB from source for the AArch64 toolchain. This commit makes it possible to use the system's `gdb` binary if it supports the architecture, or `aarch64-elf-gdb` if such a package is installed. An `aarch64-elf-gdb` package will be available through Homebrew once this PR is merged: https://github.com/Homebrew/homebrew-core/pull/127323
2023-04-02Toolchain: Allow many patches for gdb and add clang workaroundAndrew Kaster
This ports https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a from upstream binutils, which enables building with the newest host clang versions.
2023-04-02Toolchain: Update gdb to version 13.1Andrew Kaster
2023-03-27Toolchain: Update binutils to version 2.40Cameron Youell
2023-03-13Toolchain: Use '|' as sed delimiter in Build{Clang,It}.sh, not '@'Linus Groh
The latter is problematic as it may be contained in the username (e.g. email address-like) and thus the $SRC_ROOT path. This would cause an invalid sed command to be created, breaking both of these scripts.
2023-01-09Toolchain: Do not use `install -D` in BuildIt.shNico Weber
`-D` doesn't exist on macOS. Just call `mkdir -p` instead.
2023-01-09Toolchain: Add macOS definitions of MD5SUM and NPROC in BuildIt.shNico Weber
2022-12-30Toolchain: Fix aarch64 toolchain GDB buildkleines Filmröllchen
We just need to pass -disable-werror, otherwise Clang will complain a lot.
2022-11-12Toolchain: Fix missing makeinfo on macOS VenturaSteffen Rusitschka
macOS ventura no longer comes with makeinfo. binutils has already been fixed - see https://github.com/SerenityOS/serenity/pull/15932 This patch does the same for GDB.
2022-11-05Toolchain: Disable makeinfo for binutilsChristopher Wales
This is necessary to build on MacOS. As discussed in #15530, Serenity no longer appears to build on MacOS Ventura. This attempts to fix that by enforcing it at the command level.
2022-10-11Toolchain: Force makeinfo to be a no-opTim Schumacher
Neither are we changing any of our documentation files, nor do we need any of the documentation that is likely being built. With macOS potentially removing makeinfo from the default Xcode lineup, SerenityOS not being able to install it at all currently due to a lack of perl, and it otherwise just being a dependency that has to be installed to make the build system happy, lets just stub it out.
2022-10-03Meta: Make x86-64 target the defaultLiav A
This is a preparation to check if our users find noticeable bugs in the x86-64 target, before we can decide if we want to remove the i686 target for good.
2022-10-01Toolchain: Only reextract GCC-related tarballs if patches changeTim Schumacher
This brings the behaviour in line with Clang, which already does this since a few revisions.
2022-10-01Toolchain: Move the binutils patch into its own folderTim Schumacher
This makes binutils compatible with `./package.sh dev`, so that we can regenerate patches more easily, and neatly stack (temporary) patches on top.
2022-09-16Everywhere: Fully remove the separate LibM directoryTim Schumacher
2022-09-05Everywhere: Fully remove the separate LibDl directoryTim Schumacher
2022-08-24Toolchain: Update GDB to version 12.1Brian Gianforcaro
2022-08-24Toolchain: Update binutils to version 2.39Brian Gianforcaro
2022-08-24Toolchain: Update gcc to version 12.2.0Brian Gianforcaro
2022-07-19Everywhere: Fully remove the separate LibPthread directoryTim Schumacher
2022-05-20Toolchain: Fix shellcheck warningDaniel Bertalan
2022-05-19Toolchain+Ports: Split the GCC patchesDaniel Bertalan
This shouldn't cause any breaking changes, so a toolchain rebuild is not required. As per Hendiadyoin's request, math errno is disabled by default, which should enable some extra compiler optimizations in LibGL and LibSoftGPU code that uses math functions heavily. Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
2022-05-12Toolchain: Upgrade to GCC 12.1.0Daniel Bertalan
This release brings support for various C++23 constructs like `if consteval` and multidimensional subscript operators. Vectorization is now enabled for O2 too, and `-ftrivial-auto-var-init` has been added which can help us find and prevent security issues coming from uninitialized variables. Toolchain/Patches/gcc.patch is now significanly smaller as some unused, autoconf-generated code has been removed.
2022-04-01Toolchain: Fix the gdb build for aarch64 target on macOS hostJames Mintram
2022-03-24Toolchain: Update gdb to 11.2Daniel Bertalan
2022-03-04Kernel: Add support for SA_SIGINFOAli Mohammad Pur
We currently don't really populate most of the fields, but that can wait :^)
2022-02-11Toolchain: Update binutils to version 2.38Daniel Bertalan
This version comes with general fixes and, more importantly, introduces support for the packed RELR relocation format.
2022-01-24Toolchain: Add support for building the userland with the mold linkerDaniel Bertalan
This commit adds support for building the SerenityOS userland with the new [mold linker]. This is not enabled by default yet; to link using mold, run the `Toolchain/BuildMold.sh` script to build the latest release of mold, and set the `ENABLE_MOLD_LINKER` CMake variable to ON. This option relies on toolchain support that has been added just recently, so you might need to rebuild your toolchain for mold to work. [mold linker]: https://github.com/rui314/mold
2022-01-24Toolchain: Backport support for the mold linkerDaniel Bertalan
The `-fuse-ld=mold` flag was only added in the not-yet-released GCC 12. Cherry-picked from the following upstream commit: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ad964f7eaef9c03ce68a01cfdd7fde9d56524868
2022-01-24Toolchain+Ports: Use the GNU hash format by defaultDaniel Bertalan
This hash format offers faster symbol lookup than the System V hash. We've been using it in all our shared libraries for a long time, but did not have it enabled by default in our toolchain, so ports couldn't make use of it.
2022-01-24Kernel+Toolchain: Use `.init_array` section for global constructorsDaniel Bertalan
Before this change, our dynamic linker's global constructor handler relied on the GNU linker implicitly including the content of `.ctors` section inside `.init_array`. The mold linker does not do this, so global constructors would fail to be called in the mold-built userland. There is no point in sticking to `.ctors`, as most other systems already use the superior `.init_array` scheme. This commit changes the kernel linker script to not discard this new section, and enables it by default in our toolchain.
2022-01-10Toolchain: Don't use GNU objcopy in the LLVM toolchainDaniel Bertalan
Our build of LLVM's objcopy now supports the single missing feature (--update-section) that previously forced us to use the one from GNU Binutils. This means that there is no reason anymore to build Binutils alongside LLVM's tools.
2021-12-29Build: Remove gzip -k usage in PCI/USB ID files and crypt for OpenBSDtuftedocelot
OpenBSD gzip does not have the -k flag to keep the original after extraction. Work around this by copying the original gzip to the dest and then extracting. A bit of a hack, but only needs to be done for the first-time or rebuilds OpenBSD provides crypt in libc, not libcrypt. Adjust if/else to check for either and proceed accordingly Remove outdated OpenBSD checks when building the toolchain
2021-10-05Everywhere: Change from http to https where feasibleBen Wiederhake
I used "git grep -FIn http://" to find all occurrences, and looked at each one. If an occurrence was really just a link, and if a https version exists, and if our Browser can access it at least as well as the http version, then I changed the occurrence to https. I'm happy to report that I didn't run into a single site where Browser can't deal with the https version.
2021-09-07Toolchain: Build aarch64-gdb for cross-debugging on x86Idan Horowitz
2021-08-14Toolchain: Make Kernel/API/ headers available during toolchain buildAndreas Kling
2021-08-08Toolchain: Add LLVM patch and script for building itDaniel Bertalan
This contains all the bits and pieces necessary to build a Clang binary that will correctly compile SerenityOS. I had some trouble with getting LLVM building with a single command, so for now, I decided to build each LLVM component in a separate command invocation. In the future, we can also make the main llvm build step architecture-independent, but that would come with extra work to make library and include paths work. The binutils build invocation and related boilerplate is duplicated because we only use `objdump` from GNU binutils in the Clang toolchain, so most features can be disabled.
2021-07-28Toolchain: Update GCC to version 11.2.0Gunnar Beutner
2021-07-28Toolchain: Update binutils to version 2.37Gunnar Beutner
2021-07-06Kernel+Toolchain: Remove the kernel-specific toolchainGunnar Beutner
This is no longer necessary now that the kernel doesn't use libsupc++ anymore.
2021-05-30Toolchain: Remove dependency check for texinfoGunnar Beutner
Turns out we don't need that after all.
2021-05-30Toolchain: Check whether required tools and libraries are availableGunnar Beutner
Rather than having the toolchain build fail half-way through we should check whether the user has installed all the required tools and libraries early on.
2021-05-27Toolchain: Use set -o pipefail to the toolchain build scriptGunnar Beutner
Previously the buildstep function would obscure error codes because the return value of the function was the exit code for the sed command which caused us to continue execution even though one of the build steps had failed. With set -o pipefail the return value of the buildstep function is the real command's exit code.
2021-05-21Toolchain: Replace the -march=native flag with -mtune=nativeIdan Horowitz
This ensures inter-machine compatibility by not emitting any processor specific instructions. This fixes the issue raised by the non AVX-512 supporting GitHub actions runners.