/usr/share/gccxml-0.9/MIPSpro/find_flags is in gccxml 0.9.0+cvs20120420-4.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/bin/sh
#=============================================================================
#
# Program: GCC-XML
# Module: $RCSfile: find_flags,v $
# Language: C++
# Date: $Date: 2009-09-22 13:16:01 $
# Version: $Revision: 1.6 $
#
# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
# See Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the above copyright notices for more information.
#
#=============================================================================
# Find the MIPSPro executable name.
if test "x$1" = "x" ; then
if test "x${CXX}" = "x" ; then
CXX=CC
fi
else
CXX="$1"
shift
CXXFLAGS="$@"
fi
SELFDIR=`cd "\`dirname \"$0\"\`";pwd`
# This test input file checks for some builtin definitions in the
# compiler that are not displayed by the -v option. Its list was
# obtained by running "strings /usr/lib32/cmplrs/fecc" and testing for
# definitions with a giant version of the string below.
DEFS_FILE="${SELFDIR}/mipspro_defs.cxx"
# Find the macro definition options.
MACROS=`
${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 |
sed -n '/_COMPILER_VERSION/{s| '"${DEFS_FILE}"'.*$||
s/ -/\\
-/g;p;}' |
sed -n '/^-D.*$/{s/-D\([^=]*\)=\([^ ]\{1,\} .*\)/-D\1='\''\2'\''/;p;}' |
sed -n 'H;${g;s/\n/ /g;p;}'`
# Find the internally defined macros.
LANGSTD=`
${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 |
sed -n '/^D/ {s/^D/-D/;s/ /=/;p;}' |
sed -n 'H;${g;s/\n/ /g;p;}'`
# Find the include path options.
INCLUDES=`
${CXX} ${CXXFLAGS} -E -v "${DEFS_FILE}" 2>&1 |
sed -n '/_COMPILER_VERSION/{s| '"${DEFS_FILE}"'.*$||
s/ -/\\
-/g;p;}' |
sed -n '/^-I.*$/{p;}' |
sed -n 'H;${g;s/\n/ /g;p;}'`
# The support headers are located where this script is.
SELFPATH=`echo $0 | sed -n '/\//{s/\/find_flags//;p;}'`
if test "x$SELFPATH" = "x" ; then SELFPATH="." ; fi
SELFPATH=`cd "$SELFPATH" ; pwd`
INCLUDES="-iwrapper\"$SELFPATH/7.3\" $INCLUDES"
# Format and print out the options.
OPTIONS="$MACROS $LANGSTD $INCLUDES"
echo $OPTIONS
|