[Assorted-commits] SF.net SVN: assorted:[1376] shell-tools/trunk/src/gcc-config.bash
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-05-07 05:35:48
|
Revision: 1376 http://assorted.svn.sourceforge.net/assorted/?rev=1376&view=rev Author: yangzhang Date: 2009-05-07 05:35:47 +0000 (Thu, 07 May 2009) Log Message: ----------- - fixed patterns Modified Paths: -------------- shell-tools/trunk/src/gcc-config.bash Modified: shell-tools/trunk/src/gcc-config.bash =================================================================== --- shell-tools/trunk/src/gcc-config.bash 2009-05-07 05:34:05 UTC (rev 1375) +++ shell-tools/trunk/src/gcc-config.bash 2009-05-07 05:35:47 UTC (rev 1376) @@ -2,12 +2,14 @@ # Specify an argument to just print the value of that argument, e.g. "march". # Specify no argument to print the whole cc1 line. -# Specify CXXFLAGS (eg empty string) to control flags. +# Specify CFLAGS (eg empty string) to control flags. +set -o errexit -o nounset + echo | -gcc -c ${CXXFLAGS--march=native} -v -o /dev/null -x c - 2>&1 | -fgrep -- cc1 | +gcc -c ${CFLAGS--march=native} -v -o /dev/null -x c - 2>&1 | +fgrep -- '/cc1 ' | # Don't just search for 'cc1'; tmp filename may have that. if (( $# > 0 )) -then sed 's/.* -'"$1"'=\([^ ]*\) .*/\1/' +then sed 's/.* -'"$1"'=\([^ ]\+\).*/\1/' else cat fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |