Actions
Bug #673
open
AB
buildgcc: -f / --fetch option doesn't work (with busybox getopt?)
Bug #673:
buildgcc: -f / --fetch option doesn't work (with busybox getopt?)
Start date:
11/07/2026
Due date:
% Done:
0%
Estimated time:
Description
bash /src/util/crossgcc/buildgcc --fetch
getopt: unrecognized option: -
getopt: unrecognized option: f
getopt: unrecognized option: e
Usage: /src/util/crossgcc/buildgcc [-V] [-c] [-p <platform>] [-d <target directory>] [-D <dest dir>] [-C] [-G] [-S]
/src/util/crossgcc/buildgcc [-V|--version]
/src/util/crossgcc/buildgcc [-h|--help]
Options:
[-W|--print-version Print machine readable version
[-V|--version] print version number and exit
[-h|--help] print this help and exit
[-c|--clean] remove temporary files before build
[-t|--savetemps] don't remove temporary files after build
[-y|--ccache] Use ccache when building cross compiler
[-n|--nocolor] don't print color codes in output
[-u|--urls] print the urls for all packages
[-j|--jobs <num>] run <num> jobs in parallel in make
[-s]--supported <tool> print supported version of a tool
[-d|--directory <target dir>] target directory to install cross compiler to
(defaults to /src/util/crossgcc/xgcc)
[-D|--destdir <dest dir>] destination directory to install cross compiler to
(for RPM builds, default unset)
[-f|--fetch] Download tarballs, but don't build anything
[-P|--package <package>] Build a specific package: GCC, CLANG, IASL
(defaults to GCC)
GCC specific options:
[-b|--bootstrap] bootstrap the host compiler before building
the cross compiler
[-p|--platform <platform>] target platform to build cross compiler for
(defaults to i386-elf)
[-l|--languages <languages>] comma separated list of target languages
(defaults to c)
Platforms for GCC:
x86_64 i386-elf i386-mingw32 riscv-elf arm aarch64
powerpc64le-linux-gnu nds32le-elf
The code appears to still be there in main.
coreboot/util/crossgcc/buildgcc
618: printf " [-f|--fetch] Download tarballs, but don't build anything\n"
1016: -f|--fetch) shift; FETCH_ONLY=1;;
This might be because my build system is Alpine which appears to be using busybox getopt.
AB Updated by Adam Baxter 2 days ago
- Subject changed from buildgcc: -f / --fetch option doesn't work to buildgcc: -f / --fetch option doesn't work (with busybox getopt?)
AB Updated by Adam Baxter 2 days ago
- Description updated (diff)
AB Updated by Adam Baxter 2 days ago
Confirming that apk add util-linux-misc is enough to fix this - I think -f is missing in the fallback non-GNU getopt...opts.
Actions