tags:

views:

43

answers:

0

When running gcc on the command line in OS X, every now and then, I'll get warnings and/or errors. But I'm always compiling for multiple architectures (with the -arch option), and since gcc spawns several processes for each architecture, errors will constantly get garbled. For example, just running gcc (options) -### will result in

Using built-in specs.
Target: powerpc-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --enable-werror-always --program-prefix=powerpc-apple-darwin9- --host=i686-apple-darwin9 --target=powerpc-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5493)
Using built-in specs.
 "/uTarget: powerpc-apple-darwin9
sr/Configured with: /var/tmp/gcc/gcc-5493~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --enable-werror-always --program-prefix=powerpc-apple-darwin9- --host=i686-apple-darwin9 --target=powerpc-apple-darwin9
liThread model: posix
bexgcc version 4.0.1 (Apple Inc. build 5493)

In this copy-pasted block from the console, you can see that output is messed up. Look at the lines:

 "/uTarget:
liThread model: posix
bexgcc version 4.0.1 (Apple Inc. build 5493)

It continues throughout the output. It looks like many different programs are writing to the terminal at the same time. The same mixture for outputs happens with errors, warnings and the like. It makes the entire output useless and unreadable. Is there anything I can pass to Apple's gcc to print it's output sanely?