summaryrefslogtreecommitdiff
path: root/Toolchain
AgeCommit message (Collapse)Author
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-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-05-05Toolchain: Make BuildFuseExt2.sh shellcheck compliantBrian Gianforcaro
BuildFuseExt2.sh was saying it should be run under /bin/sh but it is using bash extensions like pushd/popd, ${BASH_SOURCE[0]}, etc. So just run it under bash to avoid any potential issues.
2021-05-05Toolchain: Make BuildPython.sh shellcheck compliantBrian Gianforcaro
Shellcheck is unable to source non-literal includes, so inform shellcheck to just ignore this include.
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-30Toolchain: Upgrade to QEMU 6.0 releaseBrian Gianforcaro
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-28Toolchain: Update QEMU to 6.0.0-rc5Brian Gianforcaro
Changes since rc4: 0cef06d187: Update version for v6.0.0-rc5 release 5351fb7cb2: hw/block/nvme: fix invalid msix exclusive uninit ffa090bc56: target/s390x: fix s390_probe_access to check PAGE_WRITE_ORG bc38e31b4e: net: check the existence of peer before trying to pad
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-27Toolchain/Dockerfile: Add rsync and unzipJelle Raaijmakers
Both utilies are used in the .port_include.sh file.
2021-04-26Toolchain: Update QEMU to 6.0-rc4Brian Gianforcaro
2021-04-25Toolchain: Update cmake platform definitionGunnar Beutner
This fixes building cmake and other ports which use cmake to detect whether we have -ldl.
2021-04-22Toolchain/Dockerfile: Update to Ubuntu 21.04, add gitJelle Raaijmakers
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-20Everywhere: Replace SERENITY_ROOT with SERENITY_SOURCE_DIRPanagiotis Vasilopoulos
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
2021-04-18Toolchain: Cache the output of uname -sGunnar Beutner
2021-04-18Toolchain: Build fix for macOSGunnar Beutner
Unfortunately their sed behaves a tiny bit different to how GNU sed does.
2021-04-18Toolchain: Colorize the toolchain build script's outputGunnar Beutner
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-17Toolchain: Updated QEMU from 5.2.0 to 6.0.0-rc3Panagiotis Vasilopoulos
2021-04-17Toolchain: Fix cmake definition for CMAKE_DL_LIBSGunnar Beutner
We don't have libdl (yet) so update the CMAKE_DL_LIBRARY definition to match.
2021-04-16Ports: Make sure ports are installed into /usr/localGunnar Beutner
2021-04-16Toolchain+Ports: Move the CMake toolchain file into a subdirectoryGunnar Beutner
2021-04-16Toolchain: Add platform definition for CMakeGunnar Beutner
This also ensures that pkg-config finds packages in /usr/local and changes the install prefix to /usr/local.
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 to the latest gcc release 10.3.0Brian Gianforcaro
10.3.0 is a bugfix release, with 178 bugs fixed. See: https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=10.3
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-04-12Toolchain: Install system headers before building GCCGunnar Beutner
GCC determines whether the system's <limits.h> header is usable and installs a different version of its own <limits.h> header depending on whether the system header file exists. If the system header is missing GCC's <limits.h> header does not include the system header via #include_next. For this to work we need to install LibC's headers before attempting to build GCC. Also, re-running BuildIt.sh "hides" this problem because at that point the sysroot directory also already has a <limits.h> header file from the previous build.
2021-03-13Toolchain: Always strip compiler, not just on CIBen Wiederhake
2021-03-11Toolchain: Update build paths in CMakeToolchain.txtLinus Groh
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-03-09Meta: Add a build helper scriptTom
This script automatically manages the toolchain and cmake/ninja folders making it easier to manage the different target architectures.
2021-02-24Toolchain: Upgrade BuildQemu.sh to the latest 5.2.0 releaseBrian Gianforcaro
2021-02-21Toolchain: Always remove the previous artifacts when buildingAnotherTest
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-02-14Toolchain: Explicitly enable LTO, fix build on OpenBSDjoshua stein
2021-02-14Build: Sprinkle some portability, fix on OpenBSDjoshua stein
realpath(1) is specific to coreutils and its behavior can be had with readlink -f Create the Toolchain Build directory if it doesn't exist before calling readlink, since realpath(3) on at least OpenBSD will error on a non-existent path
2021-01-22Meta: Get building on NixOS (#5005)Jonathan Turner
2021-01-18Ports: Add Python 3.9Linus Groh
The current version of our Python port (3.6.0) is over four years old by now and has (or had, I haven't actually tried it in a while) some limitations - time for an upgrade! The latest Python release is 3.9.1, so I used that version. It's a from-scratch port, no patches are taken from the previous port to ensure the smallest possible amount of code is patched. The BuildPython.sh script is useful so I kept it, with some tweaks. I added a short document explaining each patch to ease judging their underlying problem and necessity in the future. Compared to the old Python port, this one does support both the time module as well as threading (at least _thread) just fine. Importing modules written in C (everything in /usr/local/lib/python3.9/lib-dynload) currently asserts in Serenity's dynamic loader, which is unfortunate but probably solvable. Possibly related to #4642. I didn't try building Python statically, which might be one possibility to circumvent this issue. I also renamed the directory to just "python3", which is analogous to the Python 3.x package most Linux distributions provide. That implicitly means that we likely will not support multiple versions of the Python port at any given time, but again, neither do many other systems by default. Recent versions are usually backwards compatible anyway though, so having the latest shouldn't be a problem. On the other hand bumping the version should now be be as simple as updating the variables in version.sh, given that no new patches are required. These core modules to currently not build - I chose to ignore that for now rather than adding more patches to make them work somehow, which means they're fully unavailable. This should probably be fixed in Serenity itself. _ctypes, _decimal, _socket, mmap, resource, termios These optional modules requiring 3rd-party dependencies do currently not build (even with depends="ncurses openssl zlib"). Especially the absence of a readline port makes the REPL a bit painful to use. :^) _bz2, _curses, _curses_panel, _dbm, _gdbm, _hashlib, _lzma, _sqlite3, _ssl, _tkinter, _uuid, nis, ossaudiodev, readline, spwd, zlib I did some work on LibC and LibM beforehand to add at least stubs of missing required functions, it still encounters an ASSERT_NOT_REACHED() / TODO() every now and then, notably frexp() (implementations of that can be found online easily if you want to get that working right now). But then again that's our fault and not this port's. :^)
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling
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.
2021-01-03Toolchain+LibTTF: Remove some blank line at the end of CMake files.Emanuele Torre
2021-01-01Meta: Enable RTTI for Userspace programsAndrew Kaster
RTTI is still disabled for the Kernel, and for the Dynamic Loader. This allows for much less awkward navigation of class heirarchies in LibCore, LibGUI, LibWeb, and LibJS (eventually). Measured RootFS size increase was < 1%, and libgui.so binary size was ~3.3%. The small binary size increase here seems worth it :^)
2020-12-30Toolchain: Fix incorrect use of ENV{SERENITY_ARCH} in CMakeToolchain.txtLinus Groh
This was setting CMAKE_C_COMPILER and CMAKE_CXX_COMPILER to "ENV{SERENITY_ARCH}-pc-serenity-...", causing some ports to not build properly.
2020-12-29Build: Support non-i686 toolchainsmeme
* Add SERENITY_ARCH option to CMake for selecting the target toolchain * Port all build scripts but continue to use i686 * Update GitHub Actions cache to include BuildIt.sh