mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-10 08:14:09 -09:00
toolchain/toolchain-wrapper: make gcc --help -v work correctly
make "gcc --help -v" display all the options, some packages depend on this https://bugs.busybox.net/show_bug.cgi?id=15231 Signed-off-by: Sagi Mor <sagimor6@gmail.com> [Arnout: move the handling to the beginning and directly call execv] Signed-off-by: Arnout Vandecappelle <arnout@mind.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
1fbd26f831
commit
9954315fc5
@@ -310,6 +310,17 @@ int main(int argc, char **argv)
|
|||||||
perror(__FILE__ ": overflow");
|
perror(__FILE__ ": overflow");
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* skip all processing --help is specified */
|
||||||
|
for (i = 1; i < argc; i++) {
|
||||||
|
if (!strcmp(argv[i], "--help")) {
|
||||||
|
argv[0] = path;
|
||||||
|
if (execv(path, argv))
|
||||||
|
perror(path);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef BR_CCACHE
|
#ifdef BR_CCACHE
|
||||||
ret = snprintf(ccache_path, sizeof(ccache_path), "%s/bin/ccache", absbasedir);
|
ret = snprintf(ccache_path, sizeof(ccache_path), "%s/bin/ccache", absbasedir);
|
||||||
if (ret >= sizeof(ccache_path)) {
|
if (ret >= sizeof(ccache_path)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user