[Assorted-commits] SF.net SVN: assorted:[1320] shell-tools/trunk
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-03-21 23:23:44
|
Revision: 1320 http://assorted.svn.sourceforge.net/assorted/?rev=1320&view=rev Author: yangzhang Date: 2009-03-21 23:23:39 +0000 (Sat, 21 Mar 2009) Log Message: ----------- added gcc-config Modified Paths: -------------- shell-tools/trunk/README Added Paths: ----------- shell-tools/trunk/src/gcc-config.bash Modified: shell-tools/trunk/README =================================================================== --- shell-tools/trunk/README 2009-03-20 22:30:59 UTC (rev 1319) +++ shell-tools/trunk/README 2009-03-21 23:23:39 UTC (rev 1320) @@ -57,6 +57,8 @@ `filter-urls` Given a list of URLs, filter out live URLs or Python vice-versa. +`gcc-config` Inspect gcc's default/automatic settings. bash, gcc + `gen-dates` Generate lists of dates. Python `gen-list` Generate lists based on a template string. bash Added: shell-tools/trunk/src/gcc-config.bash =================================================================== --- shell-tools/trunk/src/gcc-config.bash (rev 0) +++ shell-tools/trunk/src/gcc-config.bash 2009-03-21 23:23:39 UTC (rev 1320) @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# 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. + +echo | +gcc -c ${CXXFLAGS--march=native} -v -o /dev/null -x c - 2>&1 | +fgrep -- cc1 | +if (( $# > 0 )) +then sed 's/.* -'"$1"'=\([^ ]*\) .*/\1/' +else cat +fi Property changes on: shell-tools/trunk/src/gcc-config.bash ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |