summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_common.sh
diff options
context:
space:
mode:
authorJon Ringle <jringle@gridpoint.com>2017-05-24 22:39:40 -0400
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-06-02 15:12:58 +0200
commit13e4aa7bcd43e741a6cc13ec8d6719e67154cb7d (patch)
treed4c2da2692594c978da9697064c2412c62f7bc56 /scripts/lib/ptxd_make_world_common.sh
parent42789c129b9b3600b77e719267dc2e6bb5d5c2f1 (diff)
downloadptxdist-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 'scripts/lib/ptxd_make_world_common.sh')
-rw-r--r--scripts/lib/ptxd_make_world_common.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_world_common.sh b/scripts/lib/ptxd_make_world_common.sh
index befd1df1e..b366dc80c 100644
--- a/scripts/lib/ptxd_make_world_common.sh
+++ b/scripts/lib/ptxd_make_world_common.sh
@@ -381,5 +381,7 @@ ptxd_make_world_init() {
"NO") pkg_make_par=-j1 ;;
*) ptxd_bailout "<PKG>_MAKE_PAR: please set to YES or NO" ;;
esac
+
+ exec 2>&${PTXDIST_FD_LOGERR}
}
export -f ptxd_make_world_init