xtensa-esp32-elf-gcc

maintainer orphaned · 2 votes · scanned 2026-08-03 00:08:14.047287
LOW
View on AUR ↗
Why flagged The package builds a cross-compiler from official GCC and SourceForge sources, with an additional patch from GitHub; the non-whitelisted host is GitHub's codeload service, which hosts verifiable source code, not executables, and the build process is transparent and standard for AUR.

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 a cross-compiler from official GCC and SourceForge sources, with an additional patch from GitHub; the non-whitelisted host is GitHub's codeload service, which hosts verifiable source code, not executables, and the build process is transparent and standard for AUR.

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:18 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
4pkgname=$_target-gcc
5pkgver=12.2.0
6_islver=0.25
7_overlay_commit=a5ab689
8pkgrel=1
9pkgdesc='The GNU Compiler Collection - cross compiler for xtensa esp32 (bare-metal) target'
10arch=(x86_64)
11url='https://gcc.gnu.org/'
12license=(GPL LGPL FDL)
13depends=($_target-binutils zlib libmpc)
14makedepends=(gmp mpfr $_target-newlib)
15optdepends=("$_target-newlib: Standard C library optimized for embedded systems")
16options=(!emptydirs !strip)
17source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
18 https://libisl.sourceforge.io/isl-$_islver.tar.bz2
19 xtensa-overlays-$_overlay_commit.tar.gz::https://codeload.github.com/espressif/xtensa-overlays/tar.gz/$_overlay_commit)
20sha256sums=('e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff'
21 'SKIP'
22 '4305c54d4eebc4bf3ce365af85f04984ef5aa97a52e01128445e26da5b1f467a'
23 '0087aac5e7015d43ff904ef984278df1f99c6757709088c52632b27dc482268f')
24validpgpkeys=(33C235A34C46AA3FFB293709A328C3A2C3C45C06 # Jakub Jelinek <jakub@redhat.com>
25 D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62 # Jakub Jelinek <jakub@redhat.com>
26 13975A70E63C361C73AE69EF6EEB81F8981C74C7) # Richard Guenther <richard.guenther@gmail.com>
27
28_basedir=gcc-$pkgver
29
30prepare() {
31 cd $_basedir
32
33 # link isl for in-tree builds
34 ln -sf ../isl-$_islver isl
35
36 echo $pkgver > gcc/BASE-VER
37
38 # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
39 sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
40 cp -r ../xtensa-overlays-$_overlay_commit/xtensa_esp32/gcc/* .
41
42 mkdir "$srcdir"/build-{gcc,gcc-nano}
43}
44
45_build_gcc() {
46 # espressif's crosstool-ng:
47 # CC_FOR_BUILD='x86_64-build_pc-linux-gnu-gcc'
48 # CFLAGS='-O2 -g -pipe -I./.build/xtensa-esp32-elf/buildtools/include '
49 # CFLAGS_FOR_BUILD='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
50 # CXXFLAGS='-O2 -g -pipe -I./.build/xtensa-esp32-elf/buildtools/include '
51 # CXXFLAGS_FOR_BUILD='-O2 -g -I./.build/xtensa-esp32-elf/buildtools/include '
52 # LDFLAGS='-L./.build/xtensa-esp32-elf/buildtools/lib -lstdc++ -lm'
53 # CFLAGS_FOR_TARGET=' -mlongcalls'
54 # CXXFLAGS_FOR_TARGET=' -mlongcalls'
55 # LDFLAGS_FOR_TARGET=' -static'
56 # '/usr/bin/bash'
57 # './.build/xtensa-esp32-elf/src/gcc/configure'
58 # '--build=x86_64-build_pc-linux-gnu'
59 # '--host=x86_64-build_pc-linux-gnu'
60 # '--target=xtensa-esp32-elf'
61 # '--prefix=./builds/xtensa-esp32-elf'
62 # '--with-local-prefix=./builds/xtensa-esp32-elf/xtensa-esp32-elf'
63 # '--with-headers=./builds/xtensa-esp32-elf/xtensa-esp32-elf/include'
64 # '--with-newlib'
65 # '--enable-threads=no'
66 # '--disable-shared'
67 # '--with-pkgversion=crosstool-NG esp-2020r3-5-gc65c037'
68 # '--disable-__cxa_atexit'
69 # '--enable-cxx-flags=-ffunction-sections'
70 # '--disable-libgomp'
71 # '--disable-libmudflap'
72 # '--disable-libmpx'
73 # '--disable-libssp'
74 # '--disable-libquadmath'
75 # '--disable-libquadmath-support'
76 # '--with-gmp=./.build/xtensa-esp32-elf/buildtools'
77 # '--with-mpfr=./.build/xtensa-esp32-elf/buildtools'
78 # '--with-mpc=./.build/xtensa-esp32-elf/buildtools'
79 # '--with-isl=./.build/xtensa-esp32-elf/buildtools'
80 # '--enable-lto'
81 # '--enable-target-optspace'
82 # '--without-long-double-128'
83 # '--disable-nls'
84 # '--enable-multiarch'
85 # '--enable-languages=c,c++'
86 # '--disable-libstdcxx-verbose'
87 # '--enable-threads=posix'
88 # '--enable-gcov-custom-rtio'
89 # '--enable-libstdcxx-time=yes'
90
91 "$srcdir"/$_basedir/configure \
92 --libexecdir=/usr/lib \
93 --prefix=/usr \
94 --target=$_target \
95 --with-gmp \
96 --with-gnu-as \
97 --with-gnu-ld \
98 --with-headers=/usr/$_target/include \
99 --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \
100 --with-isl \
101 --with-libelf \
102 --with-mpc \
103 --with-mpfr \
104 --with-native-system-header-dir=/include \
105 --with-newlib \
106 --with-python-dir=share/gcc-$_target \
107 --with-sysroot=/usr/$_target \
108 --with-system-zlib \
109 --without-libffi \
110 --disable-__cxa_atexit \
111 --disable-decimal-float \
112 --disable-libgomp \
113 --disable-libmpx \
114 --disable-libmudflap \
115 --disable-libquadmath \
116 --disable-libquadmath-support \
117 --disable-libssp \
118 --disable-libstdcxx-pch \
119 --disable-libstdcxx-verbose \
120 --disable-nls \
121 --disable-shared \
122 --disable-threads \
123 --disable-tls \
124 --enable-gnu-indirect-function \
125 --enable-languages=c,c++ \
126 --enable-lto \
127 --enable-target-optspace
128 make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0'
129}
130
131build() {
132 export CFLAGS="${CFLAGS/-Werror=format-security/}"
133 export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
134
135 cd "$srcdir"/build-gcc
136 export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -mlongcalls'
137 export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -mlongcalls'
138 _build_gcc
139
140 # Build libstdc++ without exceptions support (the 'nano' variant)
141 cd "$srcdir"/build-gcc-nano
142 export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions -mlongcalls'
143 export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions -mlongcalls'
144 _build_gcc
145}
146
147package() {
148 cd "$srcdir"/build-gcc
149 make DESTDIR="$pkgdir" install -j1
150
151 cd "$srcdir"/build-gcc-nano
152 make DESTDIR="$pkgdir.nano" install -j1
153 # we need only libstdc nano files
154 multilibs=( $("$pkgdir"/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) )
155 for multilib in "${multilibs[@]}"; do
156 dir="${multilib%%;*}"
157 from_dir="$pkgdir".nano/usr/$_target/lib/"$dir"
158 to_dir="$pkgdir"/usr/$_target/lib/"$dir"
159 cp -f "$from_dir"/libstdc++.a "$to_dir"/libstdc++_nano.a
160 cp -f "$from_dir"/libsupc++.a "$to_dir"/libsupc++_nano.a
161 done
162
163 # strip target binaries
164 find "$pkgdir"/usr/lib/gcc/$_target/$pkgver "$pkgdir"/usr/$_target/lib -type f -and \( -name \*.a -or -name \*.o \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \;
165
166 # strip host binaries
167 find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/$pkgver -type f -and \( -executable \) -exec strip '{}' \;
168
169 # Remove files that conflict with host gcc package
170 rm -r "$pkgdir"/usr/share/man/man7
171 rm -r "$pkgdir"/usr/share/info
172 rm "$pkgdir"/usr/lib/libcc1.*
173}
174
175# vim: ts=2 sw=0 noet
176

Scan history

Scanned at (UTC)SeverityRules
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

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion