gcc12-libs
MEDIUM
maintainer severach
4 votes
base
gcc12
scanned 2026-09-23 07:39:45.760256
Why flagged
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
Triggered rules
Medium
source=() URL on a non-standard host
source_untrusted_domain
One or more source=() URLs point to a host outside the trusted allowlist (github.com, gitlab.com, codeberg.org, pypi.org, …).
-
PKGBUILD:29
"https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz"
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com
2
# Contributor: Karl Ludwig Brennan <karlludwigbrennan@outlook.com>
3
# Contributer: Sven-Hendrik Haase <svenstaro@archlinux.org>
4
# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
5
# Contributor: Frederik Schwan <freswa at archlinux dot org>
6
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
7
# Contributor: Allan McRae <allan@archlinux.org>
8
# Contributor: Daniel Kozak <kozzi11@gmail.com>
9
10
# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
11
# NOTE: libtool requires rebuilt with each new gcc version
12
13
set -u
14
pkgbase='gcc12'
15
pkgname=("${pkgbase}" "${pkgbase}-libs" "${pkgbase}-fortran")
16
pkgver=12.5.0
17
_majorver="${pkgver%%.*}"
18
#_commit='c17d40bb3778bca5e81595f033df9222b66658eb'
19
pkgrel=2
20
pkgdesc="The GNU Compiler Collection (${_majorver}.x.x)"
21
arch=('x86_64')
22
url='https://gcc.gnu.org'
23
license=('GPL3' 'LGPL' 'FDL' 'custom')
24
makedepends=('binutils' 'doxygen' 'gcc-ada' 'gcc-d' 'libisl' 'libmpc' 'python' 'zstd')
25
checkdepends=('dejagnu' 'expect' 'inetutils' 'python-pytest' 'tcl')
26
options=('!emptydirs' '!strip' '!buildflags')
27
options+=('!lto')
28
source=(
29
"https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz"
30
'c89'
31
'c99'
32
'78_all-libsanitizer-Fix-build-with-glibc-2.42.patch'
33
'79_all-sanitizer_common-Remove-reference-to-obsolete-termio.patch'
34
'0000-kernel-7.1-remove-linux-scc.patch'
35
)
36
validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org
37
86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com
38
13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com
39
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>
40
sha256sums=('71cd373d0f04615e66c5b5b14d49c1a4c1a08efa7b30625cd240b11bab4062b3'
41
'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
42
'2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
43
'17d0dbcdd1772e88853d41575c79e448ddeb8a46ec07b7b15e82c23d75541f8b'
44
'b4459b314d33e4b6af1c77c6121dffee262c3ecf5436fc20c67fcab0446e059e'
45
'0d89650effbd0572ece8c23761e7f736a172d57609633b60e861e8b79679e429')
46
47
if [ -n "${_snapshot:-}" ]; then
48
_basedir="gcc-${_snapshot}"
49
elif [ -n "${_commit:-}" ]; then
50
_basedir='gcc'
51
source[0]="git+https://sourceware.org/git/gcc.git#commit=${_commit}"
52
mdsums[0]='SKIP'
53
sha256sums[0]='SKIP'
54
makedepends+=('git')
55
pkgver() {
56
local -
57
set -u
58
cd "${_basedir}"
59
echo "$(cat gcc/BASE-VER)+$(git describe --long --tags --abbrev=7 | sed 's/[^-]*-[^-]*-//;s/[^-]*-/r&/;s/-/+/g;s/_/./')"
60
}
61
else
62
_basedir="gcc-${pkgver}"
63
fi
64
65
_fn_setlibdir() {
66
_libdir="usr/lib/gcc/${CHOST}/${pkgver%%+*}"
67
}
68
69
prepare() {
70
local -
71
set -u
72
cd "${_basedir}"
73
74
# Do not run fixincludes
75
sed -e 's@\./fixinc\.sh@-c true@' -i 'gcc/Makefile.in'
76
77
# Arch Linux installs x86_64 libraries /lib
78
sed -e '/m64=/s/lib64/lib/' -i 'gcc/config/i386/t-linux64'
79
80
# Apply patches
81
local _pt
82
for _pt in "${source[@]%%::*}"; do
83
_pt="${_pt##*/}"
84
case "${_pt}" in
85
*.patch)
86
set +u; msg2 "*** Applying patch ${_pt}"; set -u
87
patch --no-backup-if-mismatch -Np1 -i "${srcdir}/${_pt}"
88
;;
89
esac
90
done
91
92
rm -rf 'gcc-build'
93
mkdir 'gcc-build'
94
}
95
96
build() {
97
local -
98
set -u
99
cd "${_basedir}/gcc-build"
100
101
if [ ! -s 'Makefile' ]; then
102
# The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.
103
local _conf=(
104
--disable-libssp
105
--disable-libstdcxx-pch
106
--disable-multilib
107
--disable-werror
108
--enable-bootstrap
109
--enable-__cxa_atexit
110
--enable-cet='auto'
111
--enable-checking='release'
112
--enable-clocale='gnu'
113
--enable-default-pie
114
--enable-default-ssp
115
--enable-gnu-indirect-function
116
--enable-gnu-unique-object
117
--enable-languages='c,c++,fortran'
118
--enable-libstdcxx-backtrace
119
--enable-linker-build-id
120
--enable-link-serialization='1'
121
--enable-lto
122
--enable-plugin
123
--enable-shared
124
--enable-threads='posix'
125
--enable-version-specific-runtime-libs
126
--infodir='/usr/share/info'
127
--libdir='/usr/lib'
128
--libexecdir='/usr/lib'
129
--mandir='/usr/share/man'
130
--program-suffix="-${_majorver}"
131
--with-bugurl="https://aur.archlinux.org/packages/${pkgname}/"
132
--with-build-config='bootstrap-lto'
133
--with-linker-hash-style='gnu'
134
--with-system-zlib
135
--prefix='/usr'
136
)
137
138
if ! :; then
139
# Credits @allanmcrae
140
# https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD
141
# TODO: properly deal with the build issues resulting from this
142
CFLAGS=${CFLAGS/-Werror=format-security/}
143
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
144
fi
145
146
../configure "${_conf[@]}"
147
fi
148
149
if ! :; then
150
# see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling
151
make -O STAGE1_CFLAGS="-O2" \
152
BOOT_CFLAGS="$CFLAGS" \
153
BOOT_LDFLAGS="$LDFLAGS" \
154
LDFLAGS_FOR_TARGET="$LDFLAGS" \
155
bootstrap
156
fi
157
158
# Work-around `msgfmt: /build/gcc11/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libicuuc.so.72)`
159
# The trick is borrowed from https://aur.archlinux.org/packages/gcc49
160
#LD_PRELOAD='/usr/lib/libstdc++.so' \
161
nice -n1 make -s
162
163
set +u; msg 'Compile complete'; set -u
164
165
# make documentation
166
make -s -j1 -C "${CHOST}/libstdc++-v3/doc" 'doc-man-doxygen'
167
}
168
169
check_disabled() {
170
local -
171
set -u
172
cd "${_basedir}/gcc-build"
173
174
# do not abort on error as some are "expected"
175
make -O -k check || true
176
../contrib/test_summary
177
}
178
179
package_gcc12-libs() {
180
local -
181
set -u
182
pkgdesc="Runtime libraries shipped by GCC (${_majorver}.x.x)"
183
depends=('glibc>=2.27')
184
options=('!emptydirs' '!strip')
185
186
cd "${_basedir}/gcc-build"
187
make -j1 -s -C "${CHOST}/libgcc" DESTDIR="${pkgdir}" 'install-shared'
188
local _libdir; _fn_setlibdir
189
mv "${pkgdir}/${_libdir}/../lib"/* "${pkgdir}/${_libdir}"
190
rmdir "${pkgdir}/${_libdir}/../lib"
191
rm -f "${pkgdir}/${_libdir}/libgcc_eh.a"
192
193
local _lib _libs=(
194
libasan
195
libatomic
196
libgfortran
197
libgomp
198
libitm
199
liblsan
200
libquadmath
201
libstdc++
202
libtsan
203
libubsan
204
)
205
for _lib in "${_libs[@]}"; do
206
ln -s "/usr/lib/${_lib}.so" "${pkgdir}/${_libdir}/${_lib}.so"
207
done
208
209
make -j1 -s -C "${CHOST}/libstdc++-v3/po" DESTDIR="${pkgdir}" install
210
211
rm -rf "${pkgdir}/${_libdir}/include/d/"
212
rm -f "${pkgdir}/usr/lib/libgphobos.spec"
213
214
# Install Runtime Library Exception
215
install -Dpm644 '../COPYING.RUNTIME' \
216
"${pkgdir}/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION"
217
218
# remove conflicting files
219
rm -rf "${pkgdir}/usr/share/locale"
220
}
221
222
package_gcc12() {
223
local -
224
set -u
225
pkgdesc="The GNU Compiler Collection - C and C++ frontends (${_majorver}.x.x)"
226
depends=("${pkgbase}-libs=${pkgver}-${pkgrel}" 'binutils>=2.28' 'libmpc' 'zstd')
227
depends+=('libisl.so')
228
options=('!emptydirs' 'staticlibs')
229
230
cd "${_basedir}/gcc-build"
231
232
make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-driver' 'install-cpp' 'install-gcc-ar' \
233
'c++.install-common' 'install-headers' 'install-plugin' 'install-lto-wrapper'
234
235
local _libdir; _fn_setlibdir
236
install -m755 -t "${pkgdir}/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1,gcov{,-tool}}
237
238
make -j1 -s -C "${CHOST}/libgcc" DESTDIR="${pkgdir}" install
239
rm -f "${pkgdir}"/usr/lib/libgcc_s.so*
240
rm -f "${pkgdir}"/usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so*
241
242
make -j1 -s -C "${CHOST}/libstdc++-v3/src" DESTDIR="${pkgdir}" install
243
make -j1 -s -C "${CHOST}/libstdc++-v3/include" DESTDIR="${pkgdir}" install
244
make -j1 -s -C "${CHOST}/libstdc++-v3/libsupc++" DESTDIR="${pkgdir}" install
245
make -j1 -s -C "${CHOST}/libstdc++-v3/python" DESTDIR="${pkgdir}" install
246
rm -f "${pkgdir}/${_libdir}/"libstdc++.so*
247
248
make -j1 -s DESTDIR="${pkgdir}" 'install-fixincludes'
249
make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-mkheaders'
250
251
make -j1 -s -C 'lto-plugin' DESTDIR="${pkgdir}" install
252
install -dm755 "${pkgdir}/${_libdir}/bfd-plugins/"
253
ln -s "/${_libdir}/liblto_plugin.so" \
254
"${pkgdir}/${_libdir}/bfd-plugins/"
255
256
make -j1 -s -C "${CHOST}/libgomp" DESTDIR="${pkgdir}" install-nodist_{libsubinclude,toolexeclib}HEADERS
257
make -j1 -s -C "${CHOST}/libitm" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'
258
make -j1 -s -C "${CHOST}/libquadmath" DESTDIR="${pkgdir}" 'install-nodist_libsubincludeHEADERS'
259
make -j1 -s -C "${CHOST}/libsanitizer" DESTDIR="${pkgdir}" install-nodist_{saninclude,toolexeclib}HEADERS
260
make -j1 -s -C "${CHOST}/libsanitizer/asan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'
261
make -j1 -s -C "${CHOST}/libsanitizer/tsan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'
262
make -j1 -s -C "${CHOST}/libsanitizer/lsan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'
263
264
make -j1 -s -C 'libcpp' DESTDIR="${pkgdir}" install
265
make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-po'
266
267
# many packages expect this symlink
268
ln -s "gcc-${_majorver}" "${pkgdir}/usr/bin/cc-${_majorver}"
269
270
# create cc-rs compatible symlinks
271
# https://github.com/rust-lang/cc-rs/blob/1.0.73/src/lib.rs#L2578-L2581
272
local _binary
273
for _binary in {c++,g++,gcc,gcc-ar,gcc-nm,gcc-ranlib}; do
274
ln -s "/usr/bin/${_binary}-${_majorver}" "${pkgdir}/usr/bin/x86_64-linux-gnu-${_binary}-${_majorver}"
275
done
276
277
# POSIX conformance launcher scripts for c89 and c99
278
install -Dm755 "${srcdir}/c89" "${pkgdir}/usr/bin/c89-${_majorver}"
279
install -Dm755 "${srcdir}/c99" "${pkgdir}/usr/bin/c99-${_majorver}"
280
281
# byte-compile python libraries
282
python -m 'compileall' "${pkgdir}/usr/share/gcc-${pkgver%%+*}/"
283
python -O -m 'compileall' "${pkgdir}/usr/share/gcc-${pkgver%%+*}/"
284
285
# Install Runtime Library Exception
286
install -d "${pkgdir}/usr/share/licenses/${pkgname}/"
287
ln -s "/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION" \
288
"${pkgdir}/usr/share/licenses/${pkgname}/"
289
290
# Remove conflicting files
291
rm -rf "${pkgdir}/usr/share/locale"
292
}
293
294
package_gcc12-fortran() {
295
local -
296
set -u
297
pkgdesc="Fortran front-end for GCC (${_majorver}.x.x)"
298
depends=("${pkgbase}=${pkgver}-${pkgrel}")
299
depends+=('libisl.so')
300
301
cd "${_basedir}/gcc-build"
302
make -j1 -s -C "${CHOST}/libgfortran" DESTDIR="${pkgdir}" 'install-cafexeclibLTLIBRARIES' \
303
install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}
304
make -j1 -s -C "${CHOST}/libgomp" DESTDIR="${pkgdir}" 'install-nodist_fincludeHEADERS'
305
make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'fortran.install-common'
306
local _libdir; _fn_setlibdir
307
install -Dm755 'gcc/f951' "${pkgdir}/${_libdir}/f951"
308
309
ln -s "gfortran-${_majorver}" "${pkgdir}/usr/bin/f95-${_majorver}"
310
311
# Install Runtime Library Exception
312
install -d "${pkgdir}/usr/share/licenses/${pkgname}/"
313
ln -s "/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION" \
314
"${pkgdir}/usr/share/licenses/${pkgname}/"
315
}
316
set +u
317
Changes since previous scan
--- PKGBUILD @ 2026-06-19 19:07+++ PKGBUILD @ 2026-09-23 07:39@@ -1,4 +1,5 @@-# Maintainer: Karl Ludwig Brennan <karlludwigbrennan@outlook.com>+# Maintainer: Chris Severance aur.severach aATt spamgourmet dott com+# Contributor: Karl Ludwig Brennan <karlludwigbrennan@outlook.com> # Contributer: Sven-Hendrik Haase <svenstaro@archlinux.org> # Contributor: Giancarlo Razzolini <grazzolini@archlinux.org> # Contributor: Frederik Schwan <freswa at archlinux dot org>@@ -9,253 +10,308 @@ # toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc # NOTE: libtool requires rebuilt with each new gcc version -pkgname=(gcc12 gcc12-libs gcc12-fortran)+set -u+pkgbase='gcc12'+pkgname=("${pkgbase}" "${pkgbase}-libs" "${pkgbase}-fortran") pkgver=12.5.0-_majorver=${pkgver%%.*}-_commit=c17d40bb3778bca5e81595f033df9222b66658eb+_majorver="${pkgver%%.*}"+#_commit='c17d40bb3778bca5e81595f033df9222b66658eb' pkgrel=2-pkgdesc='The GNU Compiler Collection'-arch=(x86_64)-license=(GPL3 LGPL FDL custom)+pkgdesc="The GNU Compiler Collection (${_majorver}.x.x)"+arch=('x86_64') url='https://gcc.gnu.org'-makedepends=(- binutils- doxygen- gcc-ada- gcc-d- git- libisl- libmpc- python- zstd-)-checkdepends=(- dejagnu- expect- inetutils- python-pytest- tcl-)-options=(!emptydirs !lto)-_libdir=usr/lib/gcc/$CHOST/${pkgver%%+*}-source=(git+https://sourceware.org/git/gcc.git#commit=${_commit}- c89 c99- 78_all-libsanitizer-Fix-build-with-glibc-2.42.patch- 79_all-sanitizer_common-Remove-reference-to-obsolete-termio.patch+license=('GPL3' 'LGPL' 'FDL' 'custom')+makedepends=('binutils' 'doxygen' 'gcc-ada' 'gcc-d' 'libisl' 'libmpc' 'python' 'zstd')+checkdepends=('dejagnu' 'expect' 'inetutils' 'python-pytest' 'tcl')+options=('!emptydirs' '!strip' '!buildflags')+options+=('!lto')+source=(+ "https://sourceware.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.xz"+ 'c89'+ 'c99'+ '78_all-libsanitizer-Fix-build-with-glibc-2.42.patch'+ '79_all-sanitizer_common-Remove-reference-to-obsolete-termio.patch'+ '0000-kernel-7.1-remove-linux-scc.patch' ) validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9 # bpiotrowski@archlinux.org 86CFFCA918CF3AF47147588051E8B148A9999C34 # evangelos@foutrelis.com 13975A70E63C361C73AE69EF6EEB81F8981C74C7 # richard.guenther@gmail.com D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62) # Jakub Jelinek <jakub@redhat.com>-sha256sums=('SKIP'+sha256sums=('71cd373d0f04615e66c5b5b14d49c1a4c1a08efa7b30625cd240b11bab4062b3' 'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931' '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a' '17d0dbcdd1772e88853d41575c79e448ddeb8a46ec07b7b15e82c23d75541f8b'- 'b4459b314d33e4b6af1c77c6121dffee262c3ecf5436fc20c67fcab0446e059e')+ 'b4459b314d33e4b6af1c77c6121dffee262c3ecf5436fc20c67fcab0446e059e'+ '0d89650effbd0572ece8c23761e7f736a172d57609633b60e861e8b79679e429')++if [ -n "${_snapshot:-}" ]; then+ _basedir="gcc-${_snapshot}"+elif [ -n "${_commit:-}" ]; then+ _basedir='gcc'+ source[0]="git+https://sourceware.org/git/gcc.git#commit=${_commit}"+ mdsums[0]='SKIP'+ sha256sums[0]='SKIP'+ makedepends+=('git')+pkgver() {+ local -+ set -u+ cd "${_basedir}"+ echo "$(cat gcc/BASE-VER)+$(git describe --long --tags --abbrev=7 | sed 's/[^-]*-[^-]*-//;s/[^-]*-/r&/;s/-/+/g;s/_/./')"+}+else+ _basedir="gcc-${pkgver}"+fi++_fn_setlibdir() {+ _libdir="usr/lib/gcc/${CHOST}/${pkgver%%+*}"+} prepare() {- [[ ! -d gcc ]] && ln -s gcc-${pkgver/+/-} gcc- cd gcc+ local -+ set -u+ cd "${_basedir}" # Do not run fixincludes- sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in+ sed -e 's@\./fixinc\.sh@-c true@' -i 'gcc/Makefile.in' # Arch Linux installs x86_64 libraries /lib- sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64-- # patch for glibc 2.42- patch -p1 -i "$srcdir/78_all-libsanitizer-Fix-build-with-glibc-2.42.patch"- patch -p1 -i "$srcdir/79_all-sanitizer_common-Remove-reference-to-obsolete-termio.patch"-- mkdir -p "$srcdir/gcc-build"+ sed -e '/m64=/s/lib64/lib/' -i 'gcc/config/i386/t-linux64'++ # Apply patches+ local _pt+ for _pt in "${source[@]%%::*}"; do+ _pt="${_pt##*/}"+ case "${_pt}" in+ *.patch)+ set +u; msg2 "*** Applying patch ${_pt}"; set -u+ patch --no-backup-if-mismatch -Np1 -i "${srcdir}/${_pt}"+ ;;+ esac+ done++ rm -rf 'gcc-build'+ mkdir 'gcc-build' } build() {- local _confflags=(- --prefix=/usr- --libdir=/usr/lib- --libexecdir=/usr/lib- --mandir=/usr/share/man- --infodir=/usr/share/info- --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc12/-/issues- --with-build-config=bootstrap-lto- --with-linker-hash-style=gnu- --with-system-zlib+ local -+ set -u+ cd "${_basedir}/gcc-build"++ if [ ! -s 'Makefile' ]; then+ # The following options are one per line, mostly sorted so they are easy to diff compare to other gcc packages.+ local _conf=(+ --disable-libssp+ --disable-libstdcxx-pch+ --disable-multilib+ --disable-werror+ --enable-bootstrap --enable-__cxa_atexit- --enable-cet=auto- --enable-checking=release- --enable-clocale=gnu+ --enable-cet='auto'+ --enable-checking='release'+ --enable-clocale='gnu' --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object+ --enable-languages='c,c++,fortran' --enable-libstdcxx-backtrace- --enable-link-serialization=1 --enable-linker-build-id+ --enable-link-serialization='1' --enable-lto- --disable-multilib --enable-plugin --enable-shared- --enable-threads=posix- --disable-libssp- --disable-libstdcxx-pch- --disable-werror- --program-suffix=-12+ --enable-threads='posix' --enable-version-specific-runtime-libs- )-- cd gcc-build-+ --infodir='/usr/share/info'+ --libdir='/usr/lib'+ --libexecdir='/usr/lib'+ --mandir='/usr/share/man'+ --program-suffix="-${_majorver}"+ --with-bugurl="https://aur.archlinux.org/packages/${pkgname}/"+ --with-build-config='bootstrap-lto'+ --with-linker-hash-style='gnu'+ --with-system-zlib+ --prefix='/usr'+ )++if ! :; then # Credits @allanmcrae # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD # TODO: properly deal with the build issues resulting from this CFLAGS=${CFLAGS/-Werror=format-security/} CXXFLAGS=${CXXFLAGS/-Werror=format-security/}-- "$srcdir/gcc/configure" \- --enable-languages=c,c++,fortran \- --enable-bootstrap \- "${_confflags[@]:?_confflags unset}"-+fi++ ../configure "${_conf[@]}"+ fi++if ! :; then # see https://bugs.archlinux.org/task/71777 for rationale re *FLAGS handling make -O STAGE1_CFLAGS="-O2" \ BOOT_CFLAGS="$CFLAGS" \ BOOT_LDFLAGS="$LDFLAGS" \ LDFLAGS_FOR_TARGET="$LDFLAGS" \ bootstrap+fi++ # Work-around `msgfmt: /build/gcc11/src/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /usr/lib/libicuuc.so.72)`+ # The trick is borrowed from https://aur.archlinux.org/packages/gcc49+ #LD_PRELOAD='/usr/lib/libstdc++.so' \ + nice -n1 make -s++ set +u; msg 'Compile complete'; set -u # make documentation- make -O -C $CHOST/libstdc++-v3/doc doc-man-doxygen-}--check() {- cd gcc-build+ make -s -j1 -C "${CHOST}/libstdc++-v3/doc" 'doc-man-doxygen'+}++check_disabled() {+ local -+ set -u+ cd "${_basedir}/gcc-build" # do not abort on error as some are "expected" make -O -k check || true- "$srcdir/gcc/contrib/test_summary"+ ../contrib/test_summary } package_gcc12-libs() {- pkgdesc='Runtime libraries shipped by GCC (12.x.x)'+ local -+ set -u+ pkgdesc="Runtime libraries shipped by GCC (${_majorver}.x.x)" depends=('glibc>=2.27')- options=(!emptydirs !strip)-- cd gcc-build- make -C $CHOST/libgcc DESTDIR="$pkgdir" install-shared- mv "${pkgdir}/${_libdir}"/../lib/* "${pkgdir}/${_libdir}"- rmdir "${pkgdir}/${_libdir}"/../lib- rm -f "$pkgdir/$_libdir/libgcc_eh.a"-- for lib in libasan.so \- libatomic.so \- libgfortran.so \- libgomp.so \- libitm.so \- liblsan.so \- libquadmath.so \- libstdc++.so \- libtsan.so \- libubsan.so; do- ln -s /usr/lib/$lib "$pkgdir/$_libdir/$lib"+ options=('!emptydirs' '!strip')++ cd "${_basedir}/gcc-build"+ make -j1 -s -C "${CHOST}/libgcc" DESTDIR="${pkgdir}" 'install-shared'+ local _libdir; _fn_setlibdir+ mv "${pkgdir}/${_libdir}/../lib"/* "${pkgdir}/${_libdir}"+ rmdir "${pkgdir}/${_libdir}/../lib"+ rm -f "${pkgdir}/${_libdir}/libgcc_eh.a"++ local _lib _libs=(+ libasan+ libatomic+ libgfortran+ libgomp+ libitm+ liblsan+ libquadmath+ libstdc+++ libtsan+ libubsan+ )+ for _lib in "${_libs[@]}"; do+ ln -s "/usr/lib/${_lib}.so" "${pkgdir}/${_libdir}/${_lib}.so" done - make -C $CHOST/libstdc++-v3/po DESTDIR="$pkgdir" install-- rm -rf "$pkgdir"/$_libdir/include/d/- rm -f "$pkgdir"/usr/lib/libgphobos.spec+ make -j1 -s -C "${CHOST}/libstdc++-v3/po" DESTDIR="${pkgdir}" install++ rm -rf "${pkgdir}/${_libdir}/include/d/"+ rm -f "${pkgdir}/usr/lib/libgphobos.spec" # Install Runtime Library Exception- install -Dm644 "$srcdir/gcc/COPYING.RUNTIME" \- "$pkgdir/usr/share/licenses/gcc12-libs/RUNTIME.LIBRARY.EXCEPTION"+ install -Dpm644 '../COPYING.RUNTIME' \+ "${pkgdir}/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION" # remove conflicting files- rm -rf "${pkgdir}"/usr/share/locale+ rm -rf "${pkgdir}/usr/share/locale" } package_gcc12() {- pkgdesc="The GNU Compiler Collection - C and C++ frontends (12.x.x)"- depends=("gcc12-libs" 'binutils>=2.28' libmpc zstd libisl.so)- options=(!emptydirs staticlibs)-- cd gcc-build-- make -C gcc DESTDIR="$pkgdir" install-driver install-cpp install-gcc-ar \- c++.install-common install-headers install-plugin install-lto-wrapper-- install -m755 -t "$pkgdir/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1,gcov{,-tool}}-- make -C $CHOST/libgcc DESTDIR="$pkgdir" install- rm -f "$pkgdir"/usr/lib/libgcc_s.so*- rm -f "$pkgdir"/usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so*-- make -C $CHOST/libstdc++-v3/src DESTDIR="$pkgdir" install- make -C $CHOST/libstdc++-v3/include DESTDIR="$pkgdir" install- make -C $CHOST/libstdc++-v3/libsupc++ DESTDIR="$pkgdir" install- make -C $CHOST/libstdc++-v3/python DESTDIR="$pkgdir" install- rm -f "${pkgdir}/${_libdir}"/libstdc++.so*-- make DESTDIR="$pkgdir" install-fixincludes- make -C gcc DESTDIR="$pkgdir" install-mkheaders-- make -C lto-plugin DESTDIR="$pkgdir" install- install -dm755 "$pkgdir"/${_libdir}/bfd-plugins/- ln -s /${_libdir}/liblto_plugin.so \- "$pkgdir/${_libdir}/bfd-plugins/"-- make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_{libsubinclude,toolexeclib}HEADERS- make -C $CHOST/libitm DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS- make -C $CHOST/libquadmath DESTDIR="$pkgdir" install-nodist_libsubincludeHEADERS- make -C $CHOST/libsanitizer DESTDIR="$pkgdir" install-nodist_{saninclude,toolexeclib}HEADERS- make -C $CHOST/libsanitizer/asan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS- make -C $CHOST/libsanitizer/tsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS- make -C $CHOST/libsanitizer/lsan DESTDIR="$pkgdir" install-nodist_toolexeclibHEADERS-- make -C libcpp DESTDIR="$pkgdir" install- make -C gcc DESTDIR="$pkgdir" install-po+ local -+ set -u+ pkgdesc="The GNU Compiler Collection - C and C++ frontends (${_majorver}.x.x)"+ depends=("${pkgbase}-libs=${pkgver}-${pkgrel}" 'binutils>=2.28' 'libmpc' 'zstd')+ depends+=('libisl.so')+ options=('!emptydirs' 'staticlibs')++ cd "${_basedir}/gcc-build"++ make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-driver' 'install-cpp' 'install-gcc-ar' \+ 'c++.install-common' 'install-headers' 'install-plugin' 'install-lto-wrapper'++ local _libdir; _fn_setlibdir+ install -m755 -t "${pkgdir}/${_libdir}/" gcc/{cc1,cc1plus,collect2,lto1,gcov{,-tool}}++ make -j1 -s -C "${CHOST}/libgcc" DESTDIR="${pkgdir}" install+ rm -f "${pkgdir}"/usr/lib/libgcc_s.so*+ rm -f "${pkgdir}"/usr/lib/gcc/x86_64-pc-linux-gnu/lib/libgcc_s.so*++ make -j1 -s -C "${CHOST}/libstdc++-v3/src" DESTDIR="${pkgdir}" install+ make -j1 -s -C "${CHOST}/libstdc++-v3/include" DESTDIR="${pkgdir}" install+ make -j1 -s -C "${CHOST}/libstdc++-v3/libsupc++" DESTDIR="${pkgdir}" install+ make -j1 -s -C "${CHOST}/libstdc++-v3/python" DESTDIR="${pkgdir}" install+ rm -f "${pkgdir}/${_libdir}/"libstdc++.so*++ make -j1 -s DESTDIR="${pkgdir}" 'install-fixincludes'+ make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-mkheaders'++ make -j1 -s -C 'lto-plugin' DESTDIR="${pkgdir}" install+ install -dm755 "${pkgdir}/${_libdir}/bfd-plugins/"+ ln -s "/${_libdir}/liblto_plugin.so" \+ "${pkgdir}/${_libdir}/bfd-plugins/"++ make -j1 -s -C "${CHOST}/libgomp" DESTDIR="${pkgdir}" install-nodist_{libsubinclude,toolexeclib}HEADERS+ make -j1 -s -C "${CHOST}/libitm" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'+ make -j1 -s -C "${CHOST}/libquadmath" DESTDIR="${pkgdir}" 'install-nodist_libsubincludeHEADERS'+ make -j1 -s -C "${CHOST}/libsanitizer" DESTDIR="${pkgdir}" install-nodist_{saninclude,toolexeclib}HEADERS+ make -j1 -s -C "${CHOST}/libsanitizer/asan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'+ make -j1 -s -C "${CHOST}/libsanitizer/tsan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'+ make -j1 -s -C "${CHOST}/libsanitizer/lsan" DESTDIR="${pkgdir}" 'install-nodist_toolexeclibHEADERS'++ make -j1 -s -C 'libcpp' DESTDIR="${pkgdir}" install+ make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'install-po' # many packages expect this symlink- ln -s gcc "$pkgdir"/usr/bin/cc-12+ ln -s "gcc-${_majorver}" "${pkgdir}/usr/bin/cc-${_majorver}" # create cc-rs compatible symlinks # https://github.com/rust-lang/cc-rs/blob/1.0.73/src/lib.rs#L2578-L2581- for binary in {c++,g++,gcc,gcc-ar,gcc-nm,gcc-ranlib}; do- ln -s /usr/bin/${binary} "${pkgdir}"/usr/bin/x86_64-linux-gnu-${binary}-12+ local _binary+ for _binary in {c++,g++,gcc,gcc-ar,gcc-nm,gcc-ranlib}; do+ ln -s "/usr/bin/${_binary}-${_majorver}" "${pkgdir}/usr/bin/x86_64-linux-gnu-${_binary}-${_majorver}" done # POSIX conformance launcher scripts for c89 and c99- install -Dm755 "$srcdir/c89" "$pkgdir/usr/bin/c89-12"- install -Dm755 "$srcdir/c99" "$pkgdir/usr/bin/c99-12"+ install -Dm755 "${srcdir}/c89" "${pkgdir}/usr/bin/c89-${_majorver}"+ install -Dm755 "${srcdir}/c99" "${pkgdir}/usr/bin/c99-${_majorver}" # byte-compile python libraries- python -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"- python -O -m compileall "$pkgdir/usr/share/gcc-${pkgver%%+*}/"+ python -m 'compileall' "${pkgdir}/usr/share/gcc-${pkgver%%+*}/"+ python -O -m 'compileall' "${pkgdir}/usr/share/gcc-${pkgver%%+*}/" # Install Runtime Library Exception- install -d "$pkgdir/usr/share/licenses/$pkgname/"- ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \- "$pkgdir/usr/share/licenses/$pkgname/"-- # remove conflicting files- rm -rf "${pkgdir}"/usr/share/locale+ install -d "${pkgdir}/usr/share/licenses/${pkgname}/"+ ln -s "/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION" \+ "${pkgdir}/usr/share/licenses/${pkgname}/"++ # Remove conflicting files+ rm -rf "${pkgdir}/usr/share/locale" } package_gcc12-fortran() {- pkgdesc='Fortran front-end for GCC (12.x.x)'- depends=("gcc12" libisl.so)-- cd gcc-build- make -C $CHOST/libgfortran DESTDIR="$pkgdir" install-cafexeclibLTLIBRARIES \+ local -+ set -u+ pkgdesc="Fortran front-end for GCC (${_majorver}.x.x)"+ depends=("${pkgbase}=${pkgver}-${pkgrel}")+ depends+=('libisl.so')++ cd "${_basedir}/gcc-build"+ make -j1 -s -C "${CHOST}/libgfortran" DESTDIR="${pkgdir}" 'install-cafexeclibLTLIBRARIES' \ install-{toolexeclibDATA,nodist_fincludeHEADERS,gfor_cHEADERS}- make -C $CHOST/libgomp DESTDIR="$pkgdir" install-nodist_fincludeHEADERS- make -C gcc DESTDIR="$pkgdir" fortran.install-common- install -Dm755 gcc/f951 "$pkgdir/${_libdir}/f951"-- ln -s gfortran-12 "$pkgdir/usr/bin/f95-12"+ make -j1 -s -C "${CHOST}/libgomp" DESTDIR="${pkgdir}" 'install-nodist_fincludeHEADERS'+ make -j1 -s -C 'gcc' DESTDIR="${pkgdir}" 'fortran.install-common'+ local _libdir; _fn_setlibdir+ install -Dm755 'gcc/f951' "${pkgdir}/${_libdir}/f951"++ ln -s "gfortran-${_majorver}" "${pkgdir}/usr/bin/f95-${_majorver}" # Install Runtime Library Exception- install -d "$pkgdir/usr/share/licenses/$pkgname/"- ln -s /usr/share/licenses/gcc-libs/RUNTIME.LIBRARY.EXCEPTION \- "$pkgdir/usr/share/licenses/$pkgname/"-}-+ install -d "${pkgdir}/usr/share/licenses/${pkgname}/"+ ln -s "/usr/share/licenses/${pkgbase}-libs/RUNTIME.LIBRARY.EXCEPTION" \+ "${pkgdir}/usr/share/licenses/${pkgname}/"+}+set +u+Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-23 07:39:45 | Medium | 1 |
| 2026-06-19 19:07:35 | Clean | 2 |
| 2026-06-18 16:11:54 | Medium | 1 |