mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 05:06:39 +00:00
toolchain/wrapper: also dump args it was called with
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Reviewed-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Tested-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
2d2d296e0f
commit
7ba47d1cca
@ -240,7 +240,24 @@ int main(int argc, char **argv)
|
|||||||
char *env_debug;
|
char *env_debug;
|
||||||
char *paranoid_wrapper;
|
char *paranoid_wrapper;
|
||||||
int paranoid;
|
int paranoid;
|
||||||
int ret, i, count = 0, debug, found_shared = 0;
|
int ret, i, count = 0, debug = 0, found_shared = 0;
|
||||||
|
|
||||||
|
/* Debug the wrapper to see arguments it was called with.
|
||||||
|
* If environment variable BR2_DEBUG_WRAPPER is:
|
||||||
|
* unset, empty, or 0: do not trace
|
||||||
|
* set to 1 : trace all arguments on a single line
|
||||||
|
* set to 2 : trace one argument per line
|
||||||
|
*/
|
||||||
|
if ((env_debug = getenv("BR2_DEBUG_WRAPPER"))) {
|
||||||
|
debug = atoi(env_debug);
|
||||||
|
}
|
||||||
|
if (debug > 0) {
|
||||||
|
fprintf(stderr, "Toolchain wrapper was called with:");
|
||||||
|
for (i = 0; i < argc; i++)
|
||||||
|
fprintf(stderr, "%s'%s'",
|
||||||
|
(debug == 2) ? "\n " : " ", argv[i]);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Calculate the relative paths */
|
/* Calculate the relative paths */
|
||||||
basename = strrchr(progpath, '/');
|
basename = strrchr(progpath, '/');
|
||||||
@ -483,14 +500,7 @@ int main(int argc, char **argv)
|
|||||||
exec_args++;
|
exec_args++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Debug the wrapper to see actual arguments passed to
|
/* Debug the wrapper to see final arguments passed to the real compiler. */
|
||||||
* the compiler:
|
|
||||||
* unset, empty, or 0: do not trace
|
|
||||||
* set to 1 : trace all arguments on a single line
|
|
||||||
* set to 2 : trace one argument per line
|
|
||||||
*/
|
|
||||||
if ((env_debug = getenv("BR2_DEBUG_WRAPPER"))) {
|
|
||||||
debug = atoi(env_debug);
|
|
||||||
if (debug > 0) {
|
if (debug > 0) {
|
||||||
fprintf(stderr, "Toolchain wrapper executing:");
|
fprintf(stderr, "Toolchain wrapper executing:");
|
||||||
#ifdef BR_CCACHE_HASH
|
#ifdef BR_CCACHE_HASH
|
||||||
@ -506,7 +516,6 @@ int main(int argc, char **argv)
|
|||||||
(debug == 2) ? "\n " : " ", exec_args[i]);
|
(debug == 2) ? "\n " : " ", exec_args[i]);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef BR_CCACHE_HASH
|
#ifdef BR_CCACHE_HASH
|
||||||
/* Allow compilercheck to be overridden through the environment */
|
/* Allow compilercheck to be overridden through the environment */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user