Commit Graph

55 Commits

Author SHA1 Message Date
Brian Gianforcaro
14264ca022 Ports: Update gcc to version 12.2.0 2022-08-24 22:24:34 +00:00
Daniel Bertalan
d0edf2627c Toolchain+Ports: Split the GCC patches
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-19 20:17:10 +04:30
Daniel Bertalan
0aee2abda7 Ports/gcc: Update to version 12.1.0 2022-05-12 13:12:37 +02:00
Daniel Bertalan
2c0c1dca04 Ports/gcc: Install dependencies as ports
This lets us remove a couple manual config.sub patches.
2022-05-12 13:12:37 +02:00
Daniel Bertalan
ad649c48da Toolchain: Backport support for the mold linker
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-24 10:41:47 +00:00
Daniel Bertalan
bd3ed700f2 Toolchain+Ports: Use the GNU hash format by default
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-24 10:41:47 +00:00
Daniel Bertalan
5576e9c4c5 Kernel+Toolchain: Use .init_array section for global constructors
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-24 10:41:47 +00:00
Daniel Bertalan
84c6d6649e Toolchain: Fix building the aarch64 toolchain
The `aarch64/t-aarch64` makefile fragment needs to be included for the
aarch64-specific parts of GCC to be built. Before 738e52da5, this was
done implicitly, but now it is not. This caused the following error when
building the toolchain: "aarch64-builtins.o: No such file or directory".
2022-01-04 17:40:09 +00:00
Daniel Bertalan
2c1a6ce9a5 Ports: Update gcc patch to match the toolchain 2021-12-16 21:27:03 +02:00
Tim Schumacher
c07f91474d Ports: Make array-like settings actual arrays
We may need entries with spaces in makeopts, installopts, and
configopts, and at that point we should also convert depends and
auth_opts to avoid confusion.
2021-10-05 02:13:08 +02:00
Gunnar Beutner
79db56eb82 Ports: Make sure re-installing the gcc port doesn't fail
Re-installing the gcc port would previously fail because we failed to
overwrite the symlink.
2021-08-13 21:29:48 +02:00
Jean-Baptiste Boric
072961090f Ports: Add cc symlink to gcc port 2021-08-12 18:56:30 +02:00
Gunnar Beutner
a29c18f969 Toolchain+Ports: Let -nostdlib make us not link against libgcc_s
For now this is not a mandatory toolchain rebuild.
2021-08-08 16:41:51 +02:00
Gunnar Beutner
5df8c274bb Toolchain+Ports: Fix building ports on x86_64
Fixes #8377.
2021-07-28 21:28:31 +02:00
Gunnar Beutner
a11070ab15 Ports: Update GCC to version 11.2.0 2021-07-28 21:28:31 +02:00
Gunnar Beutner
12bfc7b3fc Toolchain+Ports: Ignore -arch on macOS M1 hosts
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-24 14:04:13 +02:00
modmuss50
1b4138e687 Ports: Fix building gcc on arm64 macs 2021-07-08 16:07:14 +02:00
Gunnar Beutner
148679d1b5 Ports: Update gcc patch to match the toolchain 2021-07-06 19:08:22 +02:00
yegor
6f0092edb8 Ports: fix gcc for mac users
BSD sed differs from GNU sed with the `-i` option.
This commit changes the sed line in package.sh to be
portable across macOS and Linux.
2021-06-05 10:56:04 +02:00
Gunnar Beutner
b223233b15 Toolchain+Ports: Skip link tests for libstdc++v3
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-09 15:35:01 +02:00
Gunnar Beutner
224755e6ef Ports: Update the gcc patch to match the toolchain 2021-05-07 15:35:50 +02:00
Gunnar Beutner
77087780a2 Ports: Remove duplicate configopts var 2021-04-29 10:33:44 +02:00
Gunnar Beutner
669676b635 Ports: Build fix for gcc when building the port with gcc 11.1.0 2021-04-29 10:33:44 +02:00
Gunnar Beutner
d2a5d76b54 Ports: Use SHA256 for the gcc port
This updates the way we verify signatures for the gcc
port because we were previously downloading the keychain
from the mirror which defeats the point of doing signature
checks.
2021-04-29 10:33:44 +02:00
Gunnar Beutner
8cd62b5780 Toolchain+Ports: Update GCC to version 11.1.0 2021-04-29 10:33:44 +02:00
Gunnar Beutner
75d41657d5 Toolchain+Ports: Enable threads for gcc
This enables POSIX threads for GCC and makes the -pthread
argument available.
2021-04-20 21:08:17 +02:00
Panagiotis Vasilopoulos
492f7132d2 Ports: Improve consistency and quality of ports
- Replaced /Root with
- Improved documentation.
- Removed a few typos.
- Replaced  with
- Added brackets in some cases.

Most of the changes were reviewed and applied manually.
2021-04-20 18:20:00 +02:00
Gunnar Beutner
407b066ba4 Ports: Update the gcc port with the patches from the toolchain 2021-04-18 10:55:25 +02:00
Gunnar Beutner
1aa34d9d6a Ports: Update the gcc port to 10.3.0 2021-04-16 17:57:22 +02:00
Brendan Coles
62ced35346 Ports: Use ftpmirror.gnu.org mirror server for GNU ports 2021-04-15 09:30:42 +02:00
Linus Groh
4c497228a9 Ports: Use SERENITY_ARCH in --target/--host
Recent ports already do this, let's update the others as well. One step
closer to multi-arch support for ports! :^)
2021-03-13 13:13:03 +01:00
Linus Groh
f318ab6bed Ports: Replace hardcoded Build/ paths with SERENITY_BUILD_DIR
Fixes #5710.
2021-03-11 21:01:29 +01:00
Itamar
7df61e2c9b Toolchain: Use -ftls-model=initial-exec by default
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-19 15:21:24 +01:00
Linus Groh
7cc7f7ac54 Ports: Clean up some package.sh scripts
- Remove superfluous function overrides and use makeopts instead
- Remove superfluous installopts
- Use run rather than cd'ing manually
- Ensure empty line between functions
2021-01-23 08:28:25 +01:00
Jonathan Turner
0bf5669ba3
Meta: Get building on NixOS (#5005) 2021-01-22 17:44:05 +01:00
Itamar
6990d62977 Ports: Tweak configuration flags of gcc port to support shared binaries 2020-12-24 21:46:35 +01:00
Itamar
2ba5a325d5 Toolchain+Ports: Fix gcc patch file
Previously, some hunks of the t-slibgcc patch failed to apply
2020-12-14 23:05:53 +01:00
Itamar
758fc8c063 Toolchain: Fix usage of libgcc_s & build PIE executables by default
We can now build the porst with the shared libraries toolchain.
2020-12-14 23:05:53 +01:00
Itamar
c917fcbac4 Ports: Update gcc patch to support shared libs 2020-12-14 23:05:53 +01:00
Andreas Kling
c538e22516 Ports: Bump GCC port to 10.2.0
Since we've already updated the toolchain, might as well update the
port as well. :^)
2020-11-03 18:08:13 +01:00
Shannon Booth
2ffbdf5680 Toolchain/Ports: Update to gcc 10.1.0 2020-05-16 09:51:31 +02:00
Sergey Bugaev
450a2a0f9c Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
2020-05-14 20:15:18 +02:00
Shannon Booth
c47ef61ed8 Toolchain/Ports: Update gcc to 9.3.0
Ever closer to C++20! Also fix up some of those pesky "'s
2020-03-23 08:22:41 +01:00
Emanuel Sprung
f46d80ac4f Ports: Added checksums / signature files and other fixes
* Use ${version} instead of explicit version numbers in urls/filenames
* Move -L option to port script, as this is always good
* Fix some various other stuff
2020-02-06 14:06:23 +01:00
elodotwe
587b80bf0f Ports: Add missing ' after timestamp in GCC patch (#1004)
Looks like this got missed, maybe a messy `git add --patch` job? It
caused packaging of the gcc port to fail.
2020-01-03 02:09:53 +01:00
Andrew Kaster
2979491512 Toolchain: Use crtbeginS and crtendS for shared objects
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.
2020-01-01 23:05:17 +01:00
Andreas Kling
8fd7f3d9fa Ports: Update GCC patch to match our toolchain 2019-12-30 00:36:37 +01:00
Sergey Bugaev
c96c33624d Ports: Build gcc with -j $(nproc)
GCC is a huge project that takes a lot of time to build; let's at least
make this a little less painful by using all the available CPU cores.
2019-12-23 14:55:17 +01:00
Sergey Bugaev
fdbdbcd775 Ports: Update gcc to 9.2.0
To keep the self-hosting build working (note that it's
still broken even with this change).

This reuses the patch from commit c73aa662bb.
2019-12-23 14:55:17 +01:00
Sergey Bugaev
ccfc9d8923 Ports: Do not download sources if they're already present
When running ./package.sh to rebuild an already installed port, we would not
want to spend time re-downlodaing the same tarball again. Ideally, this should
use some sort of hash checking to ensure the file is not truncated or something,
but this is good enough for now.
2019-12-23 14:55:17 +01:00