summaryrefslogtreecommitdiff
path: root/Toolchain/BuildIt.sh
AgeCommit message (Collapse)Author
2020-07-13Toolchain: Allow building using CMake on macOSStefano Cristiano
2020-06-18Toolchain: Use curl instead of wget (#2574)Γ‰rico Nogueira Rolim
- For Linux: curl is already listed as a dependency; - For macOS: curl is pre-installed; - For OpenBSD and FreeBSD: curl is a dependecy of git.
2020-06-05Toolchain: Support building the toolchain with Ninja (#2504)Paul Redmond
This change allows users to use CMAKE_GENERATOR=Ninja ./BuildIt.sh BuildIt.sh assumes the default cmake generator is Make. However, the user may specify CMAKE_GENERATOR=Ninja, for example, to set the default generator. Therefore, instead of calling make to build the LibC target we should call cmake --build to use the correct generated files.
2020-05-20Revert "AK: Don't demangle in serenity :("Andreas Kling
This reverts commit 4361a502255e409f04c9325ef73f3cd10f9cafdb.
2020-05-20Revert "LibC: Implement Itanium C++ ABI for static variable guards"Andreas Kling
This reverts commit cdbbe14062ea49f9a9d9b0e5627aba9efd07659a.
2020-05-20Revert "Toolchain: Don't pre-build LibC and LibM, nor pre-install their headers"Andreas Kling
This reverts commit 4e051c6c15f25b58ee67127a9e4bd5e7a8684fea.
2020-05-20Toolchain: Don't pre-build LibC and LibM, nor pre-install their headersAndrew Kaster
We can do away with that shenanigans now that libstdc++ is gone. Also, simplify the toolchain dependency hash calculation to only depend on the toolchain build script(s) and the Patches files we use to modify the toolchain itself.
2020-05-20LibC: Implement Itanium C++ ABI for static variable guardsAndrew Kaster
This is __cxa_guard_acquire, __cxa_guard_release, and __cxa_guard_abort. We put these symbols in a 'fake' libstdc++ to trick gcc into thinking it has libstdc++. These symbols are necessary for C++ programs and not C programs, so, seems file. There's no way to tell gcc that, for example, the standard lib it should use is libc++ or libc. So, this is what we have for now. When threaded code enters a block that is trying to call the constructor for a block-scope static, the compiler will emit calls to these methods to handle the "call_once" nature of block-scope statics. The compiler creates a 64-bit guard variable, which it checks the first byte of to determine if the variable should be intialized or not. If the compiler-generated code reads that byte as a 0, it will call __cxa_guard_acquire to try and be the thread to call the constructor for the static variable. If the first byte is 1, it will assume that the variable's constructor was called, and go on to access it. __cxa_guard_acquire uses one of the 7 implementation defined bytes of the guard variable as an atomic 8 bit variable. To control a state machine that lets each entering thread know if they gained 'initialization rights', someone is working on the varaible, someone is working on the varaible and there's at least one thread waiting for it to be intialized, or if the variable was initialized and it's time to access it. We only store a 1 to the byte the compiler looks at in __cxa_guard_release, and use a futex to handle waiting.
2020-05-20AK: Don't demangle in serenity :(Andrew Kaster
In order to remove libstdc++ completely, we need to give up on their implementation of abi::__cxa_demangle. The demangler logic will actually have to be quite complex, and included in both the kernel and userspace. A definite fixme for the future, to parse the mangled names into real deal names.
2020-05-16Toolchain/Ports: Update to gcc 10.1.0Shannon Booth
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-11Travis: Fix Cache spamBen Wiederhake
Back in 36ba0a35eecec73c3347c43aeb18f3ea4849117d I thought that Travis would automagically delete theoldest files. Apparently it does not. Note that no dummy changes are needed, because BuildIt.sh lists itself as a dependency for the Toolchain. Hooray for something that works!
2020-04-27Toolchain: Don't create repository for patches if not necessaryDevashish
The toolchain builds just fine without the git repository (tested on windows and linux). We can skip setting up the repo and apply the patches directly when we aren't working on the toolchain itself. A flag `--dev` has been added for cases when git repo is needed. Without the flag, regular patch is applied. This significantly improves build times for first time builds.
2020-03-23Toolchain/Ports: Update gcc to 9.3.0Shannon Booth
Ever closer to C++20! Also fix up some of those pesky "'s
2020-03-21Build: Add FreeBSD support (#1492)BenJilks
2020-03-08Travis: Cache toolchainBen Wiederhake
This should give a significant boost to Travis speeds, because most of the compile time is spent building the toolchain over and over again. However, the toolchain (or libc or libm) changes only rarely, so most rebuilds can skip this step. The hashing has been put into a separate file to keep it as decoupled as possible from BuiltIt.sh.
2020-02-21Toolchain: Build demangling into LibC except during toolchain buildAndreas Kling
2020-01-02Build: add support for building on OpenBSDjoshua stein
This requires gcc8 from ports to build the Toolchain.
2019-12-28Toolchain: Fix building binutils on macOS with --enable-sharedStefano Cristiano
2019-12-27Toolchain: Allow building shared objectsAndreas Kling
Here goes a small first step towards dynamic linking.
2019-12-27Toolchain: Statically link serenity cross-compiler on macOS to keep the ↡Stefano Cristiano
cross-toolchain self contained
2019-12-20Build: get rid of UseIt.shjoshua stein
The build system uses relative paths to the toolchain binaries, so modifying $PATH is no longer necessary, and nothing needs $SERENITY_ROOT anymore.
2019-12-20Toolchain: Use "make install" to install our LibC and LibMAndreas Kling
2019-12-19Toolchain: Redirect git command output to /dev/nullAndreas Kling
Travis is currently failing and whining about the log being too long. It appears to be filling up with output from the git hackery.
2019-12-19Toolchain: Fix outdated MD5 sum of binutils tarballAndreas Kling
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-11-11Toolchain: Fix indentation in BuildIt.sh (#761)Nicolas Van Bossuyt
2019-11-03POSIX compliance: (most) shell scripts converted to generic shellGeorge Pickering
Ports/.port_include.sh, Toolchain/BuildIt.sh, Toolchain/UseIt.sh have been left largely untouched due to use of Bash-exclusive functions and variables such as $BASH_SOURCE, pushd and popd.
2019-09-26Toolchain/BuildIt.sh: Use curl instead of wgetLarkin Nickle
We already use curl for ports, so let's be consistent.
2019-07-22Toolchain: Oops, we can't rely on "install.sh" to build LibC/LibM.Andreas Kling
When we used "make install" in the past, the "install" target would pull in the library targets as dependencies, and everything got built that way. Now that we use "install.sh" instead, we have to build things manually.
2019-07-21Toolchain: Use "install.sh" to install LibC and LibM.Andreas Kling
2019-07-04Libraries: Create top level directory for libraries.Andreas Kling
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
2019-05-15BuildIt: Allow specifying MAKEJOBS rather than forcing to nprocsRobin Burchell
2019-05-15BuildIt: use set -e to fail immediately on errorRobin Burchell
This saves time if something goes wrong very early in the build process.
2019-05-08Toolchain: Make sure everything ends up in the right place in Root/Andreas Kling
2019-04-29Toolchain: Build GCC with --with-newlibAndreas Kling
2019-04-29Toolchain: The toolchain script is now working πŸŽ‰VAN BOSSUYT Nicolas
2019-04-29Toolchain: Useit.sh finish and added an install target for the libc's ↡VAN BOSSUYT Nicolas
Makefile and a bit of ground work for a gcc port
2019-04-29Toolchain: GCC and binutils are now configure correctlyVAN BOSSUYT Nicolas
2019-04-29Toolchain: Added build script (wip)VAN BOSSUYT Nicolas