Skip to content

Instantly share code, notes, and snippets.

Building GCC with a freestanding libstdc++

Works with GCC 12, older versions have bugs in the configure script which prevent building libstdc++ directly. It might be possible to work around that by building GCC and then cross-compiling libstdc++ separately...?

Environment variables

export TARGET=mipsel-elf

export PREFIX=/opt/rbdev-gcc12-cxx

see screenshot
@amachronic
amachronic / reggen.sh
Created June 27, 2021 21:37
x1000 reggen script
#!/bin/bash
r="$HOME/projects/rockbox"
s="$r/utils/reggen-ng"
d="$r/firmware/target/mips/ingenic_x1000/x1000"
xml="/tmp/regs.xml"
"$s"/reggen-ng.py < "$s"/x1000.reggen > "$xml"
[ $? -eq 0 ] || exit 1
rm -rf "$d"
"$r"/utils/regtools/headergen_v2 -o "$d" -g jz "$xml"
@amachronic
amachronic / regex.txt
Created May 21, 2021 11:51
rockbox input handling using a "regex"
specification
- press UP and DOWN = scroll up or down
- short press of PLAY = play
- hold PLAY and press UP or DOWN = skip tracks
implementation
STATE1