mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 15:26:31 +00:00
Branches: main, 10.04
In mgnuc, use a temporary file to hold gcc error messages before filtering with
mfiltercc, instead trying to do it directly in a pipeline.
The major problem is that the exit status of mgnuc would be that of the second
command in the pipeline (mfiltercc), and not the important command (gcc).
Fixing it without using temporary files requires horrible shell code.
scripts/mgnuc.in:
As above. Filtering is disabled if mktemp is not detected at configure
time.
Note: the deleted shell command was incorrect as fd 3 was not
redirected back to standard output, hence if gcc wrote anything to its
standard output (it doesn't) then it would have been lost.