aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/package/gcc/package.az
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-18 22:21:36 +0900
committerOphestra <cat@gensokyo.uk>2026-05-18 22:29:53 +0900
commiteb2b53307a195cfdb46187771f137eef93b8c4ba (patch)
treea0581bee80cbabb1fee6f67002f457253dc0da74 /internal/rosa/package/gcc/package.az
parent682b3a2ce53252b2bd0c0da86c89c392f74f68e0 (diff)
internal/rosa/package: migrate gcc
The azalea implementation used an adaptation of this as testdata. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/package/gcc/package.az')
-rw-r--r--internal/rosa/package/gcc/package.az87
1 files changed, 87 insertions, 0 deletions
diff --git a/internal/rosa/package/gcc/package.az b/internal/rosa/package/gcc/package.az
new file mode 100644
index 00000000..ce59641f
--- /dev/null
+++ b/internal/rosa/package/gcc/package.az
@@ -0,0 +1,87 @@
+package binutils {
+ description = "a collection of binary tools";
+ website = "https://www.gnu.org/software/binutils";
+ anitya = 7981;
+
+ version* = "2.46.0";
+ source = remoteTar {
+ url = "https://ftpmirror.gnu.org/gnu/binutils/binutils-"+version+".tar.bz2";
+ checksum = "4kK1_EXQipxSqqyvwD4LbiMLFKCUApjq6PeG4XJP4dzxYGqDeqXfh8zLuTyOuOVR";
+ compress = bzip2;
+ };
+
+ exec = make {};
+
+ inputs = [ bash ];
+}
+
+package gcc {
+ description = "The GNU Compiler Collection";
+ website = "https://www.gnu.org/software/gcc";
+ anitya = 6502;
+
+ version* = "16.1.0";
+ source = remoteTar {
+ url = "https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/"+
+ "gcc-"+version+"/gcc-"+version+".tar.gz";
+ checksum = "4ASoWbxaA2FW7PAB0zzHDPC5XnNhyaAyjtDPpGzceSLeYnEIXsNYZR3PA_Zu5P0K";
+ compress = gzip;
+ };
+ patches = [
+ "musl-off64_t-loff_t.patch",
+ "musl-legacy-lfs.patch",
+ ];
+
+ // GCC spends most of its time in its many configure scripts, however
+ // it also saturates the CPU for a consequential amount of time.
+ exclusive = true;
+
+ early = `
+ln -s system/lib /
+ln -s system/lib /work/
+`;
+
+ exec = make {
+ configure = {
+ "disable-multilib";
+ "enable-default-pie";
+ "disable-nls";
+ "with-gnu-as";
+ "with-gnu-ld";
+ "with-system-zlib";
+ "enable-languages": "c,c++,go";
+ "with-native-system-header-dir": "/system/include";
+
+ "with-multilib-list": arch {
+ amd64, arm64 = "''";
+ };
+ };
+
+ make = [
+ "BOOT_CFLAGS='-O2 -g'",
+ "bootstrap",
+ ];
+
+ // This toolchain is hacked to pieces, it is not expected to ever work
+ // well in its current state. That does not matter as long as the
+ // toolchain it produces passes its own test suite.
+ skipCheck = true;
+ };
+
+ inputs = [
+ binutils,
+
+ mpc,
+ zlib,
+ libucontext,
+ kernel-headers,
+ ];
+
+ runtime = [
+ binutils,
+
+ mpc,
+ zlib,
+ libucontext,
+ ];
+}