xtensa-esp32-elf-gcc-bootstrap
maintainer baltazar
· 1 votes
· scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged
The package builds GCC for a specific target from official and project-owned sources; the non-whitelisted GitHub codeload URL is used for a source overlay but is checksum-verified and part of the legitimate build process, posing minimal risk.
Triggered rules
LOW
AI review downgraded a static finding
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-07-25) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package builds GCC for a specific target from official and project-owned sources; the non-whitelisted GitHub codeload URL is used for a source overlay but is checksum-verified and part of the legitimate build process, posing minimal risk.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:19
https://libisl.sourceforge.io/isl-$_islver.tar.bz2
PKGBUILD
1 offending line(s) highlighted
1
# Maintainer: Baltazár Radics <baltazar.radics@gmail.com>
2
3
_target=xtensa-esp32-elf
4
pkgname=$_target-gcc-bootstrap
5
pkgver=12.2.0
6
_islver=0.25
7
_overlay_commit=a5ab689
8
pkgrel=1
9
pkgdesc='The GNU Compiler Collection - cross compiler bootstrap package for xtensa esp32 (bare-metal) target'
10
arch=(x86_64)
11
url='https://gcc.gnu.org/'
12
license=(GPL LGPL FDL)
13
depends=($_target-binutils zlib libmpc)
14
makedepends=(gmp mpfr)
15
provides=($_target-gcc)
16
conflicts=($_target-gcc)
17
options=(!emptydirs !strip)
18
source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
19
https://libisl.sourceforge.io/isl-$_islver.tar.bz2
20
xtensa-overlays-$_overlay_commit.tar.gz::https://codeload.github.com/espressif/xtensa-overlays/tar.gz/$_overlay_commit)
21
sha256sums=('e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff'
22
'SKIP'
23
'4305c54d4eebc4bf3ce365af85f04984ef5aa97a52e01128445e26da5b1f467a'
24
'0087aac5e7015d43ff904ef984278df1f99c6757709088c52632b27dc482268f')
25
validpgpkeys=(33C235A34C46AA3FFB293709A328C3A2C3C45C06 # Jakub Jelinek <jakub@redhat.com>
26
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62 # Jakub Jelinek <jakub@redhat.com>
27
13975A70E63C361C73AE69EF6EEB81F8981C74C7) # Richard Guenther <richard.guenther@gmail.com>
28
29
_basedir=gcc-$pkgver
30
31
prepare() {
32
cd $_basedir
33
34
# link isl for in-tree builds
35
ln -sf ../isl-$_islver isl
36
37
echo $pkgver > gcc/BASE-VER
38
39
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
40
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
41
cp -r ../xtensa-overlays-$_overlay_commit/xtensa_esp32/gcc/* .
42
43
mkdir "$srcdir"/build-gcc
44
}
45
46
build() {
47
cd "$srcdir"/build-gcc
48
export CFLAGS="${CFLAGS/-Werror=format-security/}"
49
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
50
export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions -mlongcalls'
51
export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions -mlongcalls'
52
53
# espressif's crosstool-ng:
54
# CC_FOR_BUILD='x86_64-build_pc-linux-gnu-gcc'
55
# CFLAGS='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
56
# CFLAGS_FOR_BUILD='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
57
# CXXFLAGS='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
58
# CXXFLAGS_FOR_BUILD='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
59
# LDFLAGS='-L./.build/xtensa-esp32-elf/buildtools/lib -lstdc++ -lm'
60
# CFLAGS_FOR_TARGET=' -mlongcalls'
61
# CXXFLAGS_FOR_TARGET=' -mlongcalls'
62
# LDFLAGS_FOR_TARGET=' -static'
63
# '/usr/bin/bash'
64
# './.build/xtensa-esp32-elf/src/gcc/configure'
65
# '--build=x86_64-build_pc-linux-gnu'
66
# '--host=x86_64-build_pc-linux-gnu'
67
# '--target=xtensa-esp32-elf'
68
# '--prefix=./.build/xtensa-esp32-elf/buildtools'
69
# '--with-local-prefix=./builds/xtensa-esp32-elf/xtensa-esp32-elf'
70
# '--without-headers'
71
# '--with-newlib'
72
# '--enable-threads=no'
73
# '--disable-shared'
74
# '--with-pkgversion=crosstool-NG esp-2020r3-5-gc65c037'
75
# '--disable-__cxa_atexit'
76
# '--disable-libgomp'
77
# '--disable-libmudflap'
78
# '--disable-libmpx'
79
# '--disable-libssp'
80
# '--disable-libquadmath'
81
# '--disable-libquadmath-support'
82
# '--with-gmp=./.build/xtensa-esp32-elf/buildtools'
83
# '--with-mpfr=./.build/xtensa-esp32-elf/buildtools'
84
# '--with-mpc=./.build/xtensa-esp32-elf/buildtools'
85
# '--with-isl=./.build/xtensa-esp32-elf/buildtools'
86
# '--enable-lto'
87
# '--enable-target-optspace'
88
# '--without-long-double-128'
89
# '--disable-nls'
90
# '--enable-multiarch'
91
# '--enable-languages=c'
92
# '--enable-threads=posix'
93
94
"$srcdir"/$_basedir/configure \
95
--libexecdir=/usr/lib \
96
--prefix=/usr \
97
--target=$_target \
98
--with-gmp \
99
--with-gnu-as \
100
--with-gnu-ld \
101
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \
102
--with-isl \
103
--with-libelf \
104
--with-mpc \
105
--with-mpfr \
106
--with-native-system-header-dir=/include \
107
--with-newlib \
108
--with-python-dir=share/gcc-$_target \
109
--with-sysroot=/usr/$_target \
110
--with-system-zlib \
111
--without-headers \
112
--without-libffi \
113
--disable-__cxa_atexit \
114
--disable-decimal-float \
115
--disable-libgomp \
116
--disable-libmpx \
117
--disable-libmudflap \
118
--disable-libquadmath \
119
--disable-libquadmath-support \
120
--disable-libssp \
121
--disable-libstdcxx-pch \
122
--disable-libstdcxx-verbose \
123
--disable-nls \
124
--disable-shared \
125
--disable-threads \
126
--disable-tls \
127
--enable-gnu-indirect-function \
128
--enable-languages=c \
129
--enable-lto \
130
--enable-target-optspace
131
make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0'
132
}
133
134
package() {
135
cd "$srcdir"/build-gcc
136
make DESTDIR="$pkgdir" install -j1
137
138
# strip host binaries
139
find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/$pkgver -type f -and \( -executable \) -exec strip '{}' \;
140
141
# Remove files that conflict with host gcc package
142
rm -r "$pkgdir"/usr/share/man/man7
143
rm -r "$pkgdir"/usr/share/info
144
rm "$pkgdir"/usr/lib/libcc1.*
145
}
146
147
# vim: ts=2 sw=0 noet
148
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-08-03 00:08:14 | LOW | 2 |
| 2026-08-02 00:16:08 | LOW | 2 |
| 2026-08-01 00:11:18 | LOW | 2 |
| 2026-07-31 00:14:10 | LOW | 2 |
| 2026-07-30 00:17:23 | LOW | 2 |
| 2026-07-29 00:25:53 | LOW | 2 |
| 2026-07-28 00:07:28 | LOW | 2 |
| 2026-07-27 00:24:32 | LOW | 2 |
| 2026-07-26 00:07:32 | LOW | 2 |
| 2026-07-25 00:13:44 | LOW | 2 |
| 2026-07-24 00:02:28 | LOW | 2 |
| 2026-07-23 00:14:47 | LOW | 2 |
| 2026-07-22 00:29:32 | LOW | 2 |
| 2026-07-21 00:24:15 | LOW | 2 |
| 2026-07-20 00:19:49 | LOW | 2 |
| 2026-07-19 00:17:08 | LOW | 2 |
| 2026-07-18 00:14:48 | LOW | 2 |
| 2026-07-17 00:06:16 | LOW | 2 |
| 2026-07-16 00:05:41 | LOW | 2 |
| 2026-07-15 00:09:25 | LOW | 2 |