summaryrefslogtreecommitdiff
path: root/Toolchain/BuildIt.sh
AgeCommit message (Collapse)Author
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.
2021-05-21Toolchain: Enable native host optimizations when building toolchainBrian Gianforcaro
-march=native specializes the binaries for the CPU features available on the CPU the binary is being compiled on. This matches the needs of the Toolchain, as it's always built and used on that machine only. This should be safe for the github actions VMs as well, as they all run on a standard VM SKU in "the cloud". I saw small but notable improvements in end-2-end build times in my local testing. Each compilation unit is on average around a second faster on my Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz.
2021-05-05Toolchain: Fix expansion bugs and make BuildIt.sh shellcheck compliantBrian Gianforcaro
BuildIt.sh had a bunch of SC2086 errors, where we were not quoting variables in variable expansions. The logic being: Quoting variables prevents word splitting and glob expansion, and prevents the script from breaking when input contains spaces, line feeds, glob characters and such. Reference: https://github.com/koalaman/shellcheck/wiki/SC2086 As bcoles noticed in #6772, shellcheck actually found a real bug here, where the user's build directory included spaces. Close: #6772
2021-04-29Toolchain+Ports: Update GCC to version 11.1.0Gunnar Beutner
2021-04-27Build: Use variables when concatenating Toolchain paths.Brian Gianforcaro
Make this stuff a bit easier to maintain by using the root level variables to build up the Toolchain paths. Also leave a note for future editors of BuildIt.sh to give them warning about the other changes they'll need to make.
2021-04-20Toolchain: Build GCC with optimizationsGunnar Beutner
2021-04-20Toolchain+Ports: Enable threads for gccGunnar Beutner
This enables POSIX threads for GCC and makes the -pthread argument available.
2021-04-19Toolchain: Don't produce debug symbolsxackus
Previously debug symbols were produced and then stripped.
2021-04-18Toolchain/BuildIt.sh: let's have colours on macOS too :^)Emanuele Torre
MacOS's sed doesn't support "\x1b" expansion unlike GNU sed, but we can still use bash's $'\x1b' to expand it.
2021-04-18Toolchain: Add missing buildstep callsGunnar Beutner