m68k-elf-toolchain

MEDIUM
maintainer Solskogen 1 votes scanned 2026-11-01 16:01:05.312492
View on AUR
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:20 source=("git+https://sourceware.org/git/binutils-gdb.git#commit=${_binutils_commit}"
Medium Recently orphaned & re-adopted orphaned_readopted

This package was orphaned and re-adopted within the last 30 days — a window where ownership transfers can introduce malicious changes.

PKGBUILD

1 offending line(s) highlighted
1# Maintainer: Christer Solskogen <christer.solskogen@gmail.com>
2
3_target=m68k-elf
4pkgname=$_target-toolchain
5pkgver=20261027
6pkgrel=1
7pkgdesc="A complete gcc/binutils/newlib toolchain for $_target"
8depends=('bash' 'zlib' 'zstd' 'gmp' 'mpfr' 'libmpc' 'libisl'
9 'libelf' 'expat' 'ncurses' 'readline' 'python' 'xz' 'xxhash')
10url="https://www.gnu.org"
11conflicts=("$_target-gcc" "$_target-binutils" "$_target-newlib" "$_target-gdb")
12arch=('x86_64')
13makedepends=('git')
14license=('GPL' 'BSD')
15options=('!strip' '!debug' '!lto' 'staticlibs')
16_binutils_commit=cd679f551a3961ba3ac17a8f9e48d86323207b7c
17_gcc_commit=b567707db43a9990e4319c0c38f4b0c752d45ac7
18_newlib_commit=8ba4275b83ec27529f67e0d477611fa6d8d6e6bd
19
20source=("git+https://sourceware.org/git/binutils-gdb.git#commit=${_binutils_commit}"
21 "git+https://gcc.gnu.org/git/gcc.git#commit=${_gcc_commit}"
22 "git+https://sourceware.org/git/newlib-cygwin.git#commit=${_newlib_commit}"
23)
24sha256sums=('SKIP'
25 'SKIP'
26 'SKIP')
27
28prepare() {
29 local repository entry
30 local -a entries
31
32 # GCC diagnoses the undeclared memcpy/memset calls in this startup code.
33 if ! grep -q '^#include <string.h>' "${srcdir}/newlib-cygwin/libgloss/m68k/cf-crt1.c"; then
34 sed -i '/^#include <stdlib.h>/a #include <string.h>' \
35 "${srcdir}/newlib-cygwin/libgloss/m68k/cf-crt1.c"
36 fi
37 # Match the semihosting symbol exported by cf-hosted.S/fido-hosted.S.
38 sed -i 's/extern int __io_hosted (/extern int __hosted (/' \
39 "${srcdir}/newlib-cygwin/libgloss/m68k/io.h"
40
41 rm -rf "${srcdir:?}/combined"
42 mkdir -p "${srcdir}/combined" "${srcdir}/obj-combined"
43
44 # Real directories allow merging; files are symlinks to the source trees.
45 # Later trees override earlier ones: GCC > binutils > newlib.
46 for repository in newlib-cygwin binutils-gdb gcc; do
47 entries=()
48 for entry in "${srcdir}/${repository}/"* \
49 "${srcdir}/${repository}/".[!.]* \
50 "${srcdir}/${repository}/"..?*; do
51 [[ -e $entry || -L $entry ]] || continue
52 [[ ${entry##*/} == .git ]] && continue
53 entries+=("$entry")
54 done
55 cp -rs --remove-destination "${entries[@]}" "${srcdir}/combined/" || return
56 done
57}
58
59build()
60{
61 cd "${srcdir}"/obj-combined || return
62 CFLAGS=${CFLAGS//-Werror=format-security/}
63 CXXFLAGS=${CXXFLAGS//-Werror=format-security/}
64 # Host architecture and hardening flags must not reach bare-metal libraries.
65 export CFLAGS_FOR_TARGET='-O2 -g'
66 export CXXFLAGS_FOR_TARGET='-O2 -g'
67
68 "${srcdir}"/combined/configure --prefix=/usr --libexecdir=/usr/lib --target=${_target} --enable-languages=c,c++ --disable-libstdcxx-pch \
69 --with-newlib --with-system-zlib --disable-nls --enable-plugins --enable-deterministic-archives --enable-relro --enable-__cxa_atexit \
70 --enable-linker-build-id --enable-checking=release --disable-libcc1 --disable-libssp --disable-libunwind-exceptions --disable-source-highlight --disable-werror \
71 --with-python=/usr/bin/python --without-debuginfod --without-guile --without-babeltrace --without-intel-pt --disable-gprofng
72
73 make
74}
75
76package()
77{
78 cd "${srcdir}/obj-combined" || return
79 make install DESTDIR="${pkgdir}" -j1
80 rm -rf "${pkgdir:?}"/usr/share
81 rm -rf "${pkgdir:?}"/usr/include
82 rm -rf "${pkgdir:?}"/usr/lib/libcc1.*
83 rm -rf "${pkgdir:?}"/usr/lib/bfd-plugins
84 find "${pkgdir}" -name '*.py' -delete
85
86
87 # Only the native x86-64 tools may be stripped with the host strip.
88 local filename description
89 while IFS= read -r -d '' filename; do
90 description=$(LC_ALL=C readelf -h "$filename" 2>/dev/null) || continue
91 if [[ $description == *'Machine:'*'Advanced Micro Devices X86-64'* &&
92 ( $description == *'Type:'*'EXEC ('* || $description == *'Type:'*'DYN ('* ) ]]; then
93 strip --strip-unneeded "$filename" || return
94 fi
95 done < <(find "$pkgdir" -type f -print0)
96
97 # Group both suffixes so -type and -exec apply to objects and archives.
98 find "${pkgdir}/usr/lib/gcc/${_target}" "${pkgdir}/usr/${_target}/lib" \
99 -type f \( -name '*.o' -o -name '*.a' \) \
100 -exec "${pkgdir}/usr/bin/${_target}-strip" -g {} +
101}
102

Changes since previous scan

--- PKGBUILD @ 2026-06-19 19:07
+++ PKGBUILD @ 2026-11-01 16:01
@@ -1,78 +1,102 @@
-# Maintainer: Christer Solskogen <christer.solskogen@gmail.com
+# Maintainer: Christer Solskogen <christer.solskogen@gmail.com>
_target=m68k-elf
pkgname=$_target-toolchain
-pkgver=20230502
+pkgver=20261027
pkgrel=1
pkgdesc="A complete gcc/binutils/newlib toolchain for $_target"
-depends=('zlib' 'bash' 'libmpc' 'libisl')
-url="http://www.gnu.org"
-conflicts=($_target-gcc $_target-binutils $_target-newlib $_target-gdb)
+depends=('bash' 'zlib' 'zstd' 'gmp' 'mpfr' 'libmpc' 'libisl'
+ 'libelf' 'expat' 'ncurses' 'readline' 'python' 'xz' 'xxhash')
+url="https://www.gnu.org"
+conflicts=("$_target-gcc" "$_target-binutils" "$_target-newlib" "$_target-gdb")
arch=('x86_64')
-depends=(libelf)
-makedepends=(git)
+makedepends=('git')
license=('GPL' 'BSD')
-options=('!strip')
-_binutils_commit=594dcc92e8d1f6bb30e3dfa4eb343febcda66f1a
-_gcc_commit=ffc6b225c955a3d8478de1beba5ad08a7396648c
-_newlib_commit=ab49db3a8c08e2240e53d8f12d6a14fd285def4e
+options=('!strip' '!debug' '!lto' 'staticlibs')
+_binutils_commit=cd679f551a3961ba3ac17a8f9e48d86323207b7c
+_gcc_commit=b567707db43a9990e4319c0c38f4b0c752d45ac7
+_newlib_commit=8ba4275b83ec27529f67e0d477611fa6d8d6e6bd
-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}
+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/}
+prepare() {
+ local repository entry
+ local -a entries
-prepare() {
- cd "${srcdir}"/binutils-gdb
-
- #for i in bfd binutils gas gold ld libctf libsframe opcodes; do ln -snfv ../binutils-gdb/$i; done
- 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
+ # GCC diagnoses the undeclared memcpy/memset calls in this startup code.
+ if ! grep -q '^#include <string.h>' "${srcdir}/newlib-cygwin/libgloss/m68k/cf-crt1.c"; then
+ sed -i '/^#include <stdlib.h>/a #include <string.h>' \
+ "${srcdir}/newlib-cygwin/libgloss/m68k/cf-crt1.c"
+ fi
+ # Match the semihosting symbol exported by cf-hosted.S/fido-hosted.S.
+ sed -i 's/extern int __io_hosted (/extern int __hosted (/' \
+ "${srcdir}/newlib-cygwin/libgloss/m68k/io.h"
- mkdir -p "${srcdir}/obj"
+ rm -rf "${srcdir:?}/combined"
+ mkdir -p "${srcdir}/combined" "${srcdir}/obj-combined"
+
+ # Real directories allow merging; files are symlinks to the source trees.
+ # Later trees override earlier ones: GCC > binutils > newlib.
+ for repository in newlib-cygwin binutils-gdb gcc; do
+ entries=()
+ for entry in "${srcdir}/${repository}/"* \
+ "${srcdir}/${repository}/".[!.]* \
+ "${srcdir}/${repository}/"..?*; do
+ [[ -e $entry || -L $entry ]] || continue
+ [[ ${entry##*/} == .git ]] && continue
+ entries+=("$entry")
+ done
+ cp -rs --remove-destination "${entries[@]}" "${srcdir}/combined/" || return
+ done
}
build()
{
- cd "${srcdir}"/obj
- "${srcdir}"/binutils-gdb/configure --prefix=/usr --libexecdir=/usr/lib --target=${_target} --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
+ cd "${srcdir}"/obj-combined || return
+ CFLAGS=${CFLAGS//-Werror=format-security/}
+ CXXFLAGS=${CXXFLAGS//-Werror=format-security/}
+ # Host architecture and hardening flags must not reach bare-metal libraries.
+ export CFLAGS_FOR_TARGET='-O2 -g'
+ export CXXFLAGS_FOR_TARGET='-O2 -g'
+
+ "${srcdir}"/combined/configure --prefix=/usr --libexecdir=/usr/lib --target=${_target} --enable-languages=c,c++ --disable-libstdcxx-pch \
+ --with-newlib --with-system-zlib --disable-nls --enable-plugins --enable-deterministic-archives --enable-relro --enable-__cxa_atexit \
+ --enable-linker-build-id --enable-checking=release --disable-libcc1 --disable-libssp --disable-libunwind-exceptions --disable-source-highlight --disable-werror \
+ --with-python=/usr/bin/python --without-debuginfod --without-guile --without-babeltrace --without-intel-pt --disable-gprofng
make
}
package()
{
- cd "${srcdir}/obj"
+ cd "${srcdir}/obj-combined" || return
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
+ 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
+ # Only the native x86-64 tools may be stripped with the host strip.
+ local filename description
+ while IFS= read -r -d '' filename; do
+ description=$(LC_ALL=C readelf -h "$filename" 2>/dev/null) || continue
+ if [[ $description == *'Machine:'*'Advanced Micro Devices X86-64'* &&
+ ( $description == *'Type:'*'EXEC ('* || $description == *'Type:'*'DYN ('* ) ]]; then
+ strip --strip-unneeded "$filename" || return
+ fi
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 {} +
-
+ # Group both suffixes so -type and -exec apply to objects and archives.
+ 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)SeverityRules
2026-11-01 16:01:05 Medium 2
2026-06-19 19:07:35 Clean 2
2026-06-18 16:11:54 Medium 1

Report a package

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

0 / 4000
Your suggestion