This repository has been archived by the owner on Mar 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
gcc.yaml
93 lines (90 loc) · 2.59 KB
/
gcc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package:
name: gcc
version: 12.2.0
epoch: 5
description: "the GNU compiler collection (cross compilation)"
target-architecture:
- all
copyright:
- paths:
- "*"
attestation: TODO
license: GPL-3.0-or-later
dependencies:
runtime:
- binutils
environment:
contents:
repositories:
- https://packages.wolfi.dev/bootstrap/stage2
keyring:
- https://packages.wolfi.dev/bootstrap/stage2/wolfi-signing.rsa.pub
packages:
- wolfi-baselayout
- busybox
- build-base
- ca-certificates-bundle
- texinfo
- gawk
- bison
- flex
- gmp
- mpfr
- mpc
- isl
- zlib
- make
pipeline:
- uses: fetch
with:
uri: https://ftp.gnu.org/gnu/gcc/gcc-${{package.version}}/gcc-${{package.version}}.tar.gz
expected-sha256: ac6b317eb4d25444d87cf29c0d141dedc1323a1833ec9995211b13e1a851261c
- name: 'Set up build directory'
runs: |
mkdir build
- name: 'Configure GCC'
runs: |
cd build
../configure \
--build=${{host.triplet.gnu}} \
--host=${{host.triplet.gnu}} \
--target=${{host.triplet.gnu}} \
--prefix=/usr \
--disable-nls \
--disable-werror \
--with-glibc-version=2.35 \
--enable-initfini-array \
--disable-nls \
--disable-multilib \
--disable-libcc1 \
--disable-decimal-float \
--disable-threads \
--disable-libatomic \
--disable-libgomp \
--disable-libquadmath \
--disable-libssp \
--disable-libvtv \
--enable-languages=c,c++
- runs: |
make -C build -j$(nproc)
- runs: |
make -C build -j$(nproc) install DESTDIR="${{targets.destdir}}"
- runs: |
chmod 755 ${{targets.destdir}}/usr/lib64/libgcc_s.*
- runs: |
ln -s gcc ${{targets.destdir}}/usr/bin/cc
- name: 'Clean up documentation'
runs: |
rm -rf ${{targets.destdir}}/usr/share/info
- uses: strip
subpackages:
- name: 'libstdc++'
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/lib64
mkdir -p "${{targets.subpkgdir}}"/usr/include
mkdir -p "${{targets.subpkgdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx
mv "${{targets.destdir}}"/usr/lib64/*++* "${{targets.subpkgdir}}"/usr/lib64/
mv "${{targets.destdir}}"/usr/include/*++* "${{targets.subpkgdir}}"/usr/include/
mv "${{targets.destdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx/* \
"${{targets.subpkgdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx/