forked from wolfi-dev/os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgcc-10.yaml
151 lines (132 loc) · 4.58 KB
/
gcc-10.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
package:
name: gcc-10
version: 10.5.0
epoch: 0
description: "the GNU compiler collection - version 10"
copyright:
- license: GPL-3.0-or-later
options:
no-provides: true
dependencies:
runtime:
- binutils
- libstdc++-10-dev
- posix-cc-wrappers
environment:
contents:
packages:
- bison
- build-base
- busybox
- ca-certificates-bundle
- flex-dev
- gawk
- gcc-11-default
- gmp-dev
- isl-dev
- make
- mpc-dev
- mpfr-dev
- texinfo
- wolfi-baselayout
- zip
- zlib-dev
pipeline:
- uses: fetch
with:
uri: https://ftp.gnu.org/gnu/gcc/gcc-${{package.version}}/gcc-${{package.version}}.tar.xz
expected-sha256: 25109543fdf46f397c347b5d8b7a2c7e5694a5a51cce4b9c6e1ea8a71ca307c1
- working-directory: /home/build/build
pipeline:
- name: 'Configure GCC'
runs: |
# We use generic CFLAGS, because GCC 6 is older than the CFLAGS we normally use.
CFLAGS="-O2 -Wall -pipe -Wno-error=format-security"
CXXFLAGS="-O2 -Wall -pipe -Wno-error=format-security"
CPPFLAGS="-O2 -Wall -pipe -Wno-error=format-security"
export CFLAGS CXXFLAGS CPPFLAGS
../configure \
--prefix=/usr \
--program-suffix="-10" \
--disable-nls \
--disable-werror \
--with-glibc-version=2.35 \
--enable-initfini-array \
--disable-nls \
--disable-multilib \
--disable-libatomic \
--disable-libsanitizer \
--enable-host-shared \
--enable-shared \
--enable-threads \
--enable-tls \
--enable-default-pie \
--enable-default-ssp \
--with-system-zlib \
--enable-languages=c,c++ \
--enable-bootstrap \
--enable-gnu-indirect-function \
--enable-gnu-unique-object \
--enable-version-specific-runtime-libs \
--with-linker-hash-style=gnu \
--disable-libcc1
make -j$(nproc)
make -j$(nproc) install DESTDIR="${{targets.destdir}}"
# We don't want to keep the .la files.
- runs: |
find ${{targets.destdir}} -name '*.la' -print -exec rm \{} \;
# Remove libffi
- runs: |
rm -f "${{targets.destdir}}"/usr/lib/libffi* "${{targets.destdir}}"/usr/share/man/man3/ffi*
find "${{targets.destdir}}" -name 'ffi*.h' | xargs rm -f
- name: 'Clean up documentation'
runs: |
rm -rf ${{targets.destdir}}/usr/share/info
- uses: strip
subpackages:
- name: 'gcc-10-doc'
pipeline:
- uses: split/manpages
- name: 'libstdc++-10'
pipeline:
- runs: |
gcclibdir=/usr/lib/gcc/${{host.triplet.gnu}}/${{package.version}}
mkdir -p "${{targets.subpkgdir}}"/$gcclibdir
mv "${{targets.destdir}}"/$gcclibdir/*++.so.* "${{targets.subpkgdir}}"/$gcclibdir
options:
no-provides: true
- name: 'libstdc++-10-dev'
pipeline:
- runs: |
gcclibdir=/usr/lib/gcc/${{host.triplet.gnu}}/${{package.version}}
mkdir -p "${{targets.subpkgdir}}"/$gcclibdir
mkdir -p "${{targets.subpkgdir}}"/$gcclibdir/include
mkdir -p "${{targets.subpkgdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx
mv "${{targets.destdir}}"/$gcclibdir/*++.a "${{targets.subpkgdir}}"/$gcclibdir/
mv "${{targets.destdir}}"/$gcclibdir/libstdc++.so* "${{targets.subpkgdir}}"/$gcclibdir/
mv "${{targets.destdir}}"/$gcclibdir/include/*++* "${{targets.subpkgdir}}"/$gcclibdir/include/
mv "${{targets.destdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx/* \
"${{targets.subpkgdir}}"/usr/share/gcc-${{package.version}}/python/libstdcxx/
- name: 'gcc-10-default'
description: 'Use GCC 10 as system gcc'
dependencies:
provides:
- gcc=${{package.version}}
runtime:
- gcc-10
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
for i in c++ g++ gcc gcc-ar gcc-nm gcc-ranlib; do
ln -sf "${{host.triplet.gnu}}-"$i"-10" "${{targets.subpkgdir}}"/usr/bin/"${{host.triplet.gnu}}-"$i
done
for i in c++ g++ cpp gcc gcc-ar gcc-nm gcc-ranlib gcov gcov-dump gcov-tool lto-dump; do
ln -sf $i"-10" "${{targets.subpkgdir}}"/usr/bin/$i
done
mkdir -p "${{targets.subpkgdir}}"/usr/lib
ln -sf libgcc_s.so.1 "${{targets.subpkgdir}}"/usr/lib/libgcc_s.so
update:
enabled: false
manual: true
release-monitor:
identifier: 6502