diff options
author | Jon Ringle <jringle@gridpoint.com> | 2017-05-24 22:39:40 -0400 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-06-02 15:12:58 +0200 |
commit | 13e4aa7bcd43e741a6cc13ec8d6719e67154cb7d (patch) | |
tree | d4c2da2692594c978da9697064c2412c62f7bc56 /bin | |
parent | 42789c129b9b3600b77e719267dc2e6bb5d5c2f1 (diff) | |
download | ptxdist-13e4aa7bcd43e741a6cc13ec8d6719e67154cb7d.tar.gz ptxdist-13e4aa7bcd43e741a6cc13ec8d6719e67154cb7d.tar.xz |
ptxd_make_world_compile.sh: conditionally redirect stderr>stdout
I discovered after updating to a new version of ptxdist that all of my
compile output including errors/warnings are now all going to stdout
instead of having the errors/warning going to stderr.
This is causing some problem when I use qtcreator as my IDE because
qtcreator will only filter stderr for errors/warnings to put into the
Issues tab, where one can simply click on the error/warning and be taken
right to the source line where the error/warning is found.
I found that this problem was introduced by commit
30b9267e35eea1c2edb4da0231a428bfa25b6766
This patch will conditionally redirect stderr>stdout on compile output
if ptxdist has output synchronization enabled.
This small program demonstrates the behavior with this patch applied:
$ cat local_src/testprog/testprog.c
int main(int argc, char *argv[])
{
printf("Hello World, I'm testprog!\n");
exit(EXIT_SUCCESS);
}
$ ptxdist compile testprog >/dev/null
testprog.c:4:2: error: #error An error here
#error An error here
^
make[1]: *** [testprog] Error 1
make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2
$ ptxdist compile --output-sync testprog >/dev/null
make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2
$ ptxdist compile --no-output-sync testprog >/dev/null
testprog.c:4:2: error: #error An error here
#error An error here
^
make[1]: *** [testprog] Error 1
make: *** [/home/jringle-admin/code/gpec/ec1k-rootfs/platform-EC1K/state/testprog.compile] Error 2
Signed-off-by: Jon Ringle <jringle@gridpoint.com>
[mol: bailout to PTXDIST_FD_STDERR and more cleanup]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ptxdist | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/ptxdist b/bin/ptxdist index 1e3c53a5c..2be232bd7 100755 --- a/bin/ptxdist +++ b/bin/ptxdist @@ -2383,6 +2383,7 @@ setup_config() { # PTXDIST_PARALLELMFLAGS_INTERN # PTXDIST_PARALLELMFLAGS_EXTERN # PTXDIST_OUTPUT_SYNC +# PTXDIST_FD_LOGERR # setup_parallel() { # default no parallel for now @@ -2415,10 +2416,12 @@ setup_parallel() { fi PTXDIST_OUTPUT_SYNC="${PTXDIST_OUTPUT_SYNC:-${PTXDIST_QUIET}}" + PTXDIST_FD_LOGERR=2 if [ "${PTXDIST_OUTPUT_SYNC}" == "1" ]; then if "${PTXCONF_SETUP_HOST_MAKE}" -h | grep -q -- --output-sync; then PTXDIST_OUTPUT_SYNC="--output-sync=" fi + PTXDIST_FD_LOGERR=1 fi if [[ "${PTXDIST_OUTPUT_SYNC}" =~ [01] ]]; then unset PTXDIST_OUTPUT_SYNC @@ -2429,7 +2432,7 @@ setup_parallel() { # PTXDIST_PARALLELMFLAGS_INTERN="${PTXDIST_PARALLELMFLAGS_INTERN:-${pmf_intern}}" PTXDIST_PARALLELMFLAGS_EXTERN="${PTXDIST_PARALLELMFLAGS_EXTERN:-${pmf_extern}}" - export PTXDIST_PARALLELMFLAGS_EXTERN PTXDIST_OUTPUT_SYNC + export PTXDIST_PARALLELMFLAGS_EXTERN PTXDIST_OUTPUT_SYNC PTXDIST_FD_LOGERR } |