powerpc-none-eabi-toolchain
The package builds a toolchain from source using official GNU project Git repositories with pinned commits; the non-whitelisted hosts are legitimate project forges, and SKIP'd checksums are acceptable for Git sources, making this a standard AUR build with low risk.
Triggered rules
llm_review
The static rules flagged this MEDIUM, but an AI model (qwen/qwen3-235b-a22b-2507) reviewed the full PKGBUILD and judged it LOW (confidence 95%): The package builds a toolchain from source using official GNU project Git repositories with pinned commits; the non-whitelisted hosts are legitimate project forges, and SKIP'd checksums are acceptable for Git sources, making this a standard AUR build with low risk.
1 higher static finding superseded - not the current verdict (shown for transparency)
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:20
source=(git+https://sourceware.org/git/binutils-gdb.git#commit=${_binutils_commit}
PKGBUILD
1 offending line(s) highlighted# Maintainer: Caleb Whitmer <caleb.s.whitmer+aur@gmail.com>
_arch=powerpc
_target=$_arch-none-eabi
pkgname=$_target-toolchain
pkgver=20230502
pkgrel=2
pkgdesc="A complete gcc/binutils/newlib toolchain for $_target"
depends=('zlib' 'bash' 'libmpc' 'libisl')
url="http://www.gnu.org"
arch=('x86_64')
depends=(libelf)
makedepends=(git)
license=('GPL' 'BSD')
options=('!strip')
_binutils_commit=594dcc92e8d1f6bb30e3dfa4eb343febcda66f1a
_gcc_commit=ffc6b225c955a3d8478de1beba5ad08a7396648c
_newlib_commit=ab49db3a8c08e2240e53d8f12d6a14fd285def4e
source=(git+https://sourceware.org/git/binutils-gdb.git#commit=${_binutils_commit}
git+https://gcc.gnu.org/git/gcc.git#commit=${_gcc_commit}
git+https://sourceware.org/git/newlib-cygwin.git#commit=${_newlib_commit}
)
sha256sums=('SKIP'
'SKIP'
'SKIP')
CFLAGS=${CFLAGS/-Werror=format-security/}
CXXFLAGS=${CXXFLAGS/-Werror=format-security/}
CFLAGS=${CFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS/}
CXXFLAGS=${CXXFLAGS/-Wp,-D_GLIBCXX_ASSERTIONS/}
CFLAGS=${CFLAGS/-D_GLIBCXX_ASSERTIONS/}
CXXFLAGS=${CXXFLAGS/-D_GLIBCXX_ASSERTIONS/}
prepare() {
cd "${srcdir}"/binutils-gdb
# Fix Python 3.13+ compatibility by using stable GIL APIs instead of deprecated internal variables
if [ -f gdb/python/py-gdb-readline.c ]; then
sed -i 's/PyEval_RestoreThread (_PyOS_ReadlineTState);/PyGILState_STATE gil_state = PyGILState_Ensure ();/' gdb/python/py-gdb-readline.c
sed -i 's/PyEval_SaveThread ();/PyGILState_Release (gil_state);/' gdb/python/py-gdb-readline.c
fi
# Force Autoconf's C++11 macros to always report success
find "$srcdir" -name configure -exec sed -i 's/ax_cv_cxx_compile_cxx11=no/ax_cv_cxx_compile_cxx11=yes/g' {} +
find "$srcdir" -name configure -exec sed -i 's/as_fn_error $? "C++11 is required"/echo "Bypassing C++11 check"/g' {} +
# Cleanly sequence gnulib and local configs at the top of every simulator file
# This satisfies gnulib's ordering rule and prevents macro collisions
find sim/ppc -name "*.c" -exec sed -i '1s/^/#include "..\/..\/gnulib\/config.h"\n#undef PACKAGE_NAME\n#undef PACKAGE_STRING\n#undef PACKAGE_TARNAME\n#undef PACKAGE_VERSION\n#include "config.h"\n/' {} +
# Neutralize WERROR variables inside the legacy PPC simulator's Makefile template
if [ -f sim/ppc/Makefile.in ]; then
sed -i 's/WERROR_CFLAGS =.*/WERROR_CFLAGS = -Wno-error/g' sim/ppc/Makefile.in
fi
for i in gcc fixincludes libcody libcpp libgcc libstdc++-v3; do ln -snfv ../gcc/$i; done
for i in newlib libgloss; do ln -snfv ../newlib-cygwin/$i; done
# Revert any messy edits from previous runs
git checkout -- include/safe-ctype.h 2>/dev/null || true
(cd ../gcc && git checkout -- include/safe-ctype.h 2>/dev/null) || true
# Append undefs to the END of safe-ctype.h to protect C++ compilation units
for file in include/safe-ctype.h ../gcc/include/safe-ctype.h; do
if [ -f "$file" ]; then
cat << 'EOF' >> "$file"
#ifdef __cplusplus
# undef isalpha
# undef isdigit
# undef islower
# undef isspace
# undef isupper
# undef isxdigit
# undef isalnum
# undef isprint
# undef isgraph
# undef iscntrl
# undef isascii
# undef tolower
# undef toupper
#endif
EOF
fi
done
mkdir -p "${srcdir}/obj"
}
build()
{
cd "${srcdir}"/obj
local DEF_CFLAGS="$CFLAGS -std=gnu17 -D_GNU_SOURCE -Wno-error -Wno-incompatible-pointer-types -Wno-int-conversion -Wno-implicit-function-declaration -Wno-discarded-qualifiers -Wno-old-style-definition -Wno-return-mismatch"
local DEF_CXXFLAGS="$CXXFLAGS -std=gnu++17 -D_GNU_SOURCE -Wno-error -Wno-template-id-cdtor -fno-char8_t"
export MAKEFLAGS="-j$(nproc)"
"${srcdir}"/binutils-gdb/configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--target=${_target} \
--disable-werror \
--enable-languages=c,c++ \
--disable-libstdcxx-pch \
--with-newlib \
--with-libgloss \
--with-system-zlib \
--disable-nls \
--enable-plugins \
--enable-deterministic-archives \
--enable-relro \
--enable-__cxa_atexit \
--enable-linker-build-id \
--enable-plugin \
--enable-checking=release \
--enable-host-shared \
--disable-libssp \
--disable-libunwind-exceptions \
--disable-source-highlight \
--with-system-readline \
CC="gcc" \
CXX="g++" \
CFLAGS="$DEF_CFLAGS" \
CXXFLAGS="$DEF_CXXFLAGS" \
SIM_CFLAGS="-include config.h" \
WARN_CFLAGS="-include config.h"
make
}
package()
{
cd "${srcdir}/obj"
make install DESTDIR="${pkgdir}" -j1
rm -rf "${pkgdir}"/usr/share
rm -rf "${pkgdir}"/usr/include
rm -rf "${pkgdir}"/usr/lib/libcc1.*
rm -rf "${pkgdir}"/usr/lib/bfd-plugins
find "${pkgdir}" -name '*.py' -delete
# local variable is scoped to the function, for general tidiness.
local regex='ELF ().*(executable|shared object).*'
# read null-terminated filenames from stdin, and use a while loop to operate on each one
# for each run of the loop, the filename is stored in the intuitive variable "filename". :)
while read -r -d '' filename; do
# test if the output of `file` matches the regular expression defined earlier
if [[ $(file -b "$filename") =~ $regex ]]; then
# awesome, it matches! So, do the standard strip routine since this isn't an $_target executable
strip --strip-unneeded "$filename"
fi
# this find command uses process substitution to pass the output of find into the `while read` loop
done < <(find "$pkgdir" -type f -print0)
find "${pkgdir}/usr/lib/gcc/${_target}" "${pkgdir}/usr/${_target}/lib" -type f -name '*.o' -o -name '*.a' -exec "${pkgdir}"/usr/bin/${_target}-strip -g {} +
}
Scan history
| Scanned at (UTC) | Severity | Rules |
|---|---|---|
| 2026-09-17 00:27:14 | Low | 2 |
| 2026-09-16 00:03:17 | Low | 2 |
| 2026-09-15 00:25:31 | Low | 2 |
| 2026-09-14 00:27:57 | Low | 2 |
| 2026-09-13 00:19:54 | Low | 2 |
| 2026-09-12 00:25:17 | Low | 2 |
| 2026-09-11 00:19:22 | Low | 2 |
| 2026-09-10 00:22:44 | Low | 2 |
| 2026-09-09 00:04:09 | Low | 2 |
| 2026-09-08 00:18:08 | Low | 2 |
| 2026-09-07 00:30:15 | Low | 2 |
| 2026-09-06 00:17:06 | Low | 2 |
| 2026-09-05 00:16:27 | Low | 2 |
| 2026-09-04 00:03:13 | Low | 2 |
| 2026-09-03 00:15:47 | Low | 2 |
| 2026-09-02 00:02:31 | Low | 2 |
| 2026-09-01 00:11:19 | Low | 2 |
| 2026-08-31 00:19:57 | Low | 2 |
| 2026-08-30 00:04:14 | Low | 2 |
| 2026-08-29 00:29:17 | Low | 2 |