summaryrefslogtreecommitdiff
path: root/Toolchain/Patches
AgeCommit message (Collapse)Author
2021-09-17Toolchain: Remove breaking mbstate_t define from clangTim Schumacher
2021-09-07Meta: Make `serenity.sh rebuild-toolchain aarch64 clang` workNico Weber
2021-09-07Toolchain: Build aarch64-gdb for cross-debugging on x86Idan Horowitz
2021-08-28Toolchain: Enough to make `rebuild-toolchain aarch64` workNico Weber
The gcc patch might not be completely correct, but at least the toolchain completes building.
2021-08-28Toolchain: Regenerate binutils.patch and gcc.patchNico Weber
I locally modified Meta/serenity.sh to pass `--dev` to BuildIt.sh in build_toolchain(). Then I ran `Meta/serenity.sh rebuild-toolchain`, cd'd into Toolchain/Tarballs/binutils-2.37, `git add`ed unadded files in `git status`, and then ran `git diff > ../../Patches/binutils.patch`. Then I did the same for Toolchain/Tarballs/gcc-11.2.0 (and was careful not to `git add` serenity-kernel.h, since that's created by Toolchain/BuildIt.sh). No behavior change. This just rewrites the patch like git writes it.
2021-08-08Toolchain+Ports: Let -nostdlib make us not link against libgcc_sGunnar Beutner
For now this is not a mandatory toolchain rebuild.
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+Ports: Fix building ports on x86_64Gunnar Beutner
Fixes #8377.
2021-07-28Toolchain: Update GCC to version 11.2.0Gunnar Beutner
2021-07-28Toolchain: Update binutils to version 2.37Gunnar Beutner
2021-07-24Toolchain+Ports: Ignore -arch on macOS M1 hostsGunnar Beutner
CMake specifies -arch arm64 for our toolchain. Unfortunately that's an option GCC only understands when built for macOS. This causes the build to fail. I haven't been able to get CMake to not specify that option so this adds a dummy option to GCC.
2021-07-08Toolchain: Fix building toolchain on arm64 macsmodmuss50
This patch is based off: https://github.com/osx-cross/homebrew-avr/pull/248 and https://github.com/riscv/riscv-gnu-toolchain/issues/800
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-06-07Toolchain+Ports: Fix building binutils on FreeBSDGunnar Beutner
This imports the upstream patch from https://sourceware.org/bugzilla/show_bug.cgi?id=27382 Fixes #7407.
2021-05-09Toolchain+Ports: Skip link tests for libstdc++v3Gunnar Beutner
This makes stdlib.h and stdio.h functions available in the std namespace for C++. libstdc++v3's link tests can fail if you don't have an up-to-date build directory, for example: 1. Have libc with missing _Exit symbol because you haven't done a build since that was added. 2. Run toolchain rebuild. libstdc++v3's configure script will realize that it can do link tests in general but will fail later on when it tries to link a program that tests for _Exit. Even though this is a toolchain patch this does not necessarily require rebuilding the toolchain right away. This is only required once we start using any of these new members in the std namespace, e.g. for ports.
2021-05-07Toolchain: Make -nodefaultlibs not link against libgcc_sGunnar Beutner
This fixes the -nodefaultlibs flag for gcc which previously linked against libgcc_s anyway. Even though this is a toolchain patch we don't need to rebuild the toolchain right away.
2021-05-03Toolchain: Enable building all code with -fPICGunnar Beutner
Ordinarily this would force the compiler to not inline certain symbols and call them via the PLT instead. To counteract this I've also added -fno-semantic-interposition which disables ELF symbol interposition. Our dynamic loader doesn't support this anyway and we might even consider not implementing this at all. Even though this is a toolchain change this doesn't require rebuilding the toolchain unless you're planning to build for the x86_64 arch.
2021-04-29Toolchain: Update the binutils patch file to match the portGunnar Beutner
Previously the toolchain's binutils would not have been able to build binaries on 32-bit host systems (not that this would be much of an issue nowadays) because one of the #ifdefs was in the wrong place. I moved the #ifdef in the port's patch and this now updates the toolchain's patch file to match the port's patch.
2021-04-29Toolchain+Ports: Update GCC to version 11.1.0Gunnar Beutner
2021-04-20Toolchain+Ports: Enable threads for gccGunnar Beutner
This enables POSIX threads for GCC and makes the -pthread argument available.
2021-04-18Toolchain: Enable -fexceptions and build a separate libstdc++ for the kernelGunnar Beutner
This enables building usermode programs with exception handling. It also builds a libstdc++ without exception support for the kernel. This is necessary because the libstdc++ that gets built is different when exceptions are enabled. Using the same library binary would require extensive stubs for exception-related functionality in the kernel.
2021-04-16Toolchain+LibC: Don't link LibC against crt0Gunnar Beutner
Instead GCC should be used to automatically link against crt0 and crt0_shared depending on the type of object file that is being built. Unfortunately this requires a rebuild of the toolchain as well as everything that has been built with the old GCC.
2021-04-14Toolchain: Update binutils to version to latest 2.36.1 releaseBrian Gianforcaro
This updates binutils to the latest release. It looks like some lines where shuffled around, so I had to fixup out patch to apply cleanly again.
2021-03-11Toolchain: Remove unnecessary file from commitBen Wiederhake
This file is never read by gcc, and the filename looks like it was never meant to be added.
2021-02-19Toolchain: Use -ftls-model=initial-exec by defaultItamar
Our TLS implementation relies on the TLS model being "initial-exec". We previously enforced this by adding the '-ftls-model=initial-exec' flag in the root CmakeLists file, but that did not affect ports - So now we put that flag in the gcc spec files. Closes #5366
2021-01-04Toolchain: Disable exceptions by defaultItamar
We now configure gcc to always use the -fno-exceptions flag. This does not affect our code since we do not use exceptions, and also fixes the gcc port.
2020-12-24Toolchain+LibC: Fix usage of crt filesItamar
We now configure the gcc spec files to use a different crt files for static & PIE binaries. This relieves us from the need to explicitly specify the desired crt0 file in cmake scripts.
2020-12-14Toolchain+Ports: Fix gcc patch fileItamar
Previously, some hunks of the t-slibgcc patch failed to apply
2020-12-14Toolchain: Fix usage of libgcc_s & build PIE executables by defaultItamar
We can now build the porst with the shared libraries toolchain.
2020-12-14Build: Build libgcc_s.soItamar
This is the shared version of libgcc
2020-12-14Toolchain: Configure the path to the dynamic linkerItamar
2020-05-16Toolchain/Ports: Update to gcc 10.1.0Shannon Booth
2020-04-05Toolchain: Fix trailing white space warnings when gcc.patch is appliedBrian Gianforcaro
Noticed the warnings about trailing white space in the patch fly by as I was running Toolchain/BuildIt.sh on a new machine.
2020-01-01Toolchain: Use crtbeginS and crtendS for shared objectsAndrew Kaster
Turns out the reason GCC wasn't as smart about startup code for shared objects as we hoped is because nobody told it to be :D Change the STARTFILE_SPEC and ENDFILE_SPEC in gcc/config/serenity.h to skip crt0.o and to link the S variants of crtbegin and crtend for shared objects. Because we're using the crtbegin and crtend from libgcc, also tell libgcc in libgcc/config.host to compile crtbeginS and crtendS from crtstuff.c.
2019-12-27Toolchain: Allow building shared objectsAndreas Kling
Here goes a small first step towards dynamic linking.
2019-12-19Update toolchain to binutils-2.33.1 gcc-9.2.0Philip Herron
Toolchain build makes git repo out of toolchain to allow patching Fix Makefiles to use new libstdc++ Parameterize BuildIt with default TARGET of i686 but arm is experimental
2019-04-29Toolchain: Added build script (wip)VAN BOSSUYT Nicolas