gccxml_gem 0.9-x86-darwin-9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. data/Rakefile +75 -0
  2. data/bin/gccxml +0 -0
  3. data/bin/gccxml_cc1plus +0 -0
  4. data/gccxml.rb +44 -0
  5. data/share/doc/gccxml-0.9/Copyright.txt +55 -0
  6. data/share/doc/gccxml-0.9/gccxml.html +168 -0
  7. data/share/doc/gccxml-0.9/gccxml.txt +293 -0
  8. data/share/gccxml-0.9/GCC/2.95/algorithm +76 -0
  9. data/share/gccxml-0.9/GCC/2.95/bitset +17 -0
  10. data/share/gccxml-0.9/GCC/2.95/cctype +24 -0
  11. data/share/gccxml-0.9/GCC/2.95/clocale +14 -0
  12. data/share/gccxml-0.9/GCC/2.95/cmath +33 -0
  13. data/share/gccxml-0.9/GCC/2.95/complex +38 -0
  14. data/share/gccxml-0.9/GCC/2.95/csetjmp +13 -0
  15. data/share/gccxml-0.9/GCC/2.95/csignal +14 -0
  16. data/share/gccxml-0.9/GCC/2.95/cstdarg +12 -0
  17. data/share/gccxml-0.9/GCC/2.95/cstddef +13 -0
  18. data/share/gccxml-0.9/GCC/2.95/cstdio +55 -0
  19. data/share/gccxml-0.9/GCC/2.95/cstdlib +66 -0
  20. data/share/gccxml-0.9/GCC/2.95/cstring +34 -0
  21. data/share/gccxml-0.9/GCC/2.95/ctime +24 -0
  22. data/share/gccxml-0.9/GCC/2.95/cwchar +65 -0
  23. data/share/gccxml-0.9/GCC/2.95/cwctype +31 -0
  24. data/share/gccxml-0.9/GCC/2.95/deque +19 -0
  25. data/share/gccxml-0.9/GCC/2.95/exception +20 -0
  26. data/share/gccxml-0.9/GCC/2.95/fstream +23 -0
  27. data/share/gccxml-0.9/GCC/2.95/functional +64 -0
  28. data/share/gccxml-0.9/GCC/2.95/gccxml_bitset +1066 -0
  29. data/share/gccxml-0.9/GCC/2.95/iomanip +20 -0
  30. data/share/gccxml-0.9/GCC/2.95/iosfwd +20 -0
  31. data/share/gccxml-0.9/GCC/2.95/iostream +27 -0
  32. data/share/gccxml-0.9/GCC/2.95/iterator +39 -0
  33. data/share/gccxml-0.9/GCC/2.95/list +19 -0
  34. data/share/gccxml-0.9/GCC/2.95/map +20 -0
  35. data/share/gccxml-0.9/GCC/2.95/memory +21 -0
  36. data/share/gccxml-0.9/GCC/2.95/new +13 -0
  37. data/share/gccxml-0.9/GCC/2.95/numeric +15 -0
  38. data/share/gccxml-0.9/GCC/2.95/pthread.h +16 -0
  39. data/share/gccxml-0.9/GCC/2.95/queue +20 -0
  40. data/share/gccxml-0.9/GCC/2.95/set +20 -0
  41. data/share/gccxml-0.9/GCC/2.95/sstream +24 -0
  42. data/share/gccxml-0.9/GCC/2.95/stack +19 -0
  43. data/share/gccxml-0.9/GCC/2.95/std/bastring.cc +524 -0
  44. data/share/gccxml-0.9/GCC/2.95/std/complext.h +397 -0
  45. data/share/gccxml-0.9/GCC/2.95/std/dcomplex.h +92 -0
  46. data/share/gccxml-0.9/GCC/2.95/std/fcomplex.h +88 -0
  47. data/share/gccxml-0.9/GCC/2.95/std/gslice_array.h +170 -0
  48. data/share/gccxml-0.9/GCC/2.95/std/indirect_array.h +157 -0
  49. data/share/gccxml-0.9/GCC/2.95/std/ldcomplex.h +96 -0
  50. data/share/gccxml-0.9/GCC/2.95/std/mask_array.h +154 -0
  51. data/share/gccxml-0.9/GCC/2.95/std/slice_array.h +156 -0
  52. data/share/gccxml-0.9/GCC/2.95/std/std_valarray.h +728 -0
  53. data/share/gccxml-0.9/GCC/2.95/std/straits.h +162 -0
  54. data/share/gccxml-0.9/GCC/2.95/std/valarray_meta.h +1035 -0
  55. data/share/gccxml-0.9/GCC/2.95/stdexcept +17 -0
  56. data/share/gccxml-0.9/GCC/2.95/stl_alloc.h +1057 -0
  57. data/share/gccxml-0.9/GCC/2.95/stl_bvector.h +836 -0
  58. data/share/gccxml-0.9/GCC/2.95/stl_deque.h +1699 -0
  59. data/share/gccxml-0.9/GCC/2.95/stl_list.h +843 -0
  60. data/share/gccxml-0.9/GCC/2.95/stl_tree.h +1331 -0
  61. data/share/gccxml-0.9/GCC/2.95/stl_vector.h +828 -0
  62. data/share/gccxml-0.9/GCC/2.95/string +26 -0
  63. data/share/gccxml-0.9/GCC/2.95/strstream +23 -0
  64. data/share/gccxml-0.9/GCC/2.95/typeinfo +11 -0
  65. data/share/gccxml-0.9/GCC/2.95/utility +25 -0
  66. data/share/gccxml-0.9/GCC/2.95/valarray +52 -0
  67. data/share/gccxml-0.9/GCC/2.95/vector +19 -0
  68. data/share/gccxml-0.9/GCC/2.96/sstream +305 -0
  69. data/share/gccxml-0.9/GCC/3.0/pthread.h +16 -0
  70. data/share/gccxml-0.9/GCC/3.1/pthread.h +16 -0
  71. data/share/gccxml-0.9/GCC/3.2/bits/fstream.tcc +500 -0
  72. data/share/gccxml-0.9/GCC/3.2/bits/istream.tcc +1207 -0
  73. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.h +1810 -0
  74. data/share/gccxml-0.9/GCC/3.2/bits/locale_facets.tcc +2397 -0
  75. data/share/gccxml-0.9/GCC/3.2/bits/messages_members.h +108 -0
  76. data/share/gccxml-0.9/GCC/3.2/bits/ostream.tcc +713 -0
  77. data/share/gccxml-0.9/GCC/3.2/bits/sstream.tcc +241 -0
  78. data/share/gccxml-0.9/GCC/3.2/bits/stl_deque.h +1682 -0
  79. data/share/gccxml-0.9/GCC/3.2/bits/stl_list.h +989 -0
  80. data/share/gccxml-0.9/GCC/3.2/bits/stl_tree.h +1462 -0
  81. data/share/gccxml-0.9/GCC/3.2/bits/stl_vector.h +1085 -0
  82. data/share/gccxml-0.9/GCC/3.2/bits/valarray_meta.h +1063 -0
  83. data/share/gccxml-0.9/GCC/3.2/fstream +579 -0
  84. data/share/gccxml-0.9/GCC/3.2/pthread.h +16 -0
  85. data/share/gccxml-0.9/GCC/3.2/sstream +384 -0
  86. data/share/gccxml-0.9/GCC/3.3/bits/fstream.tcc +530 -0
  87. data/share/gccxml-0.9/GCC/3.3/bits/list.tcc +378 -0
  88. data/share/gccxml-0.9/GCC/3.3/bits/locale_facets.h +2050 -0
  89. data/share/gccxml-0.9/GCC/3.3/bits/messages_members.h +108 -0
  90. data/share/gccxml-0.9/GCC/3.3/bits/sstream.tcc +243 -0
  91. data/share/gccxml-0.9/GCC/3.3/bits/stl_deque.h +1603 -0
  92. data/share/gccxml-0.9/GCC/3.3/bits/stl_list.h +1167 -0
  93. data/share/gccxml-0.9/GCC/3.3/bits/stl_tree.h +1462 -0
  94. data/share/gccxml-0.9/GCC/3.3/bits/stl_vector.h +992 -0
  95. data/share/gccxml-0.9/GCC/3.3/bits/valarray_meta.h +1135 -0
  96. data/share/gccxml-0.9/GCC/3.3/fstream +842 -0
  97. data/share/gccxml-0.9/GCC/3.3/gccxml_builtins.h +22 -0
  98. data/share/gccxml-0.9/GCC/3.3/sstream +638 -0
  99. data/share/gccxml-0.9/GCC/3.4/gccxml_builtins.h +91 -0
  100. data/share/gccxml-0.9/GCC/4.0/gccxml_builtins.h +128 -0
  101. data/share/gccxml-0.9/GCC/4.1/bits/gthr-default.h +618 -0
  102. data/share/gccxml-0.9/GCC/4.1/gccxml_builtins.h +131 -0
  103. data/share/gccxml-0.9/GCC/4.2/gccxml_builtins.h +131 -0
  104. data/share/gccxml-0.9/GCC/find_flags +105 -0
  105. data/share/gccxml-0.9/Intel/find_flags +56 -0
  106. data/share/gccxml-0.9/Intel/pthread.h +16 -0
  107. data/share/gccxml-0.9/MIPSpro/7.3/exception +9 -0
  108. data/share/gccxml-0.9/MIPSpro/7.3/gccxml_mpro_internals.h +21 -0
  109. data/share/gccxml-0.9/MIPSpro/7.3/iomanip +161 -0
  110. data/share/gccxml-0.9/MIPSpro/7.3/ostream +9 -0
  111. data/share/gccxml-0.9/MIPSpro/7.3/stddef.h +9 -0
  112. data/share/gccxml-0.9/MIPSpro/7.3/stl_config.h +9 -0
  113. data/share/gccxml-0.9/MIPSpro/7.3/stl_locale.h +17 -0
  114. data/share/gccxml-0.9/MIPSpro/7.3/stl_monetary.h +14 -0
  115. data/share/gccxml-0.9/MIPSpro/7.3/stl_numeric_facets.h +13 -0
  116. data/share/gccxml-0.9/MIPSpro/7.3/stl_threads.h +11 -0
  117. data/share/gccxml-0.9/MIPSpro/7.3/string +18 -0
  118. data/share/gccxml-0.9/MIPSpro/find_flags +137 -0
  119. data/share/gccxml-0.9/Sun/5.8/adaptation.patch +168 -0
  120. data/share/gccxml-0.9/Sun/README +8 -0
  121. data/share/gccxml-0.9/Sun/adapt_headers.sh +24 -0
  122. data/share/gccxml-0.9/Sun/find_flags +69 -0
  123. data/share/gccxml-0.9/gccxml_config +2 -0
  124. data/share/gccxml-0.9/gccxml_find_flags +93 -0
  125. data/share/man/man1/gccxml.1 +246 -0
  126. metadata +204 -0
@@ -0,0 +1,8 @@
1
+ Sun CC support contributed by Pierre-Olivier Gaillard
2
+
3
+ This is a small README file regarding gccxml support for Solaris and Sun CC 5.8.
4
+
5
+ The Sun CC headers are not suitable for GCC and need to be adapted. The adapted files may not be redistributed freely. This forces you to perform the following operations:
6
+ ./adapt_headers.sh
7
+
8
+ This will produce corrected header files in the 5.8 directory.
@@ -0,0 +1,24 @@
1
+ #!/bin/sh
2
+
3
+ INCLUDES=/usr/include
4
+ CC_INCLUDES=`find_flags | perl -ne '($a) = m|-I([/a-zA-Z0-9_-]+/include/CC)|o ; print "$a\n" if $a'`
5
+
6
+ cd 5.8
7
+
8
+ cp $INCLUDES/math.h .
9
+ cp $CC_INCLUDES/typeinfo .
10
+ cp $CC_INCLUDES/Cstd/istream .
11
+ cp $CC_INCLUDES/Cstd/streambuf .
12
+ cp $CC_INCLUDES/Cstd/string .
13
+
14
+ mkdir -p rw
15
+ mkdir -p sys
16
+ mkdir -p iso
17
+
18
+ cp $CC_INCLUDES/Cstd/rw/iterator rw/iterator
19
+ cp $INCLUDES/iso/stdio_iso.h iso
20
+ cp $INCLUDES/iso/stdlib_iso.h iso
21
+
22
+ cp $INCLUDES/sys/regset.h sys
23
+
24
+ patch -p1 < adaptation.patch
@@ -0,0 +1,69 @@
1
+ #!/bin/sh
2
+ #=============================================================================
3
+ #
4
+ # Program: GCC-XML
5
+ # Module: $RCSfile: find_flags,v $
6
+ # Language: C++
7
+ # Date: $Date: 2007/11/28 19:52:06 $
8
+ # Version: $Revision: 1.1 $
9
+ #
10
+ # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
11
+ # See Copyright.txt for details.
12
+ #
13
+ # This software is distributed WITHOUT ANY WARRANTY; without even
14
+ # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
+ # PURPOSE. See the above copyright notices for more information.
16
+ #
17
+ #=============================================================================
18
+ # Find the CC executable name.
19
+ if test "x$1" = "x" ; then
20
+ if test "x${CXX}" = "x" ; then
21
+ CXX=CC
22
+ fi
23
+ else
24
+ CXX="$1"
25
+ shift
26
+ CXXFLAGS="$@"
27
+ fi
28
+
29
+ GCCXML_PID="$$"
30
+ cat > "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc" <<!
31
+ #include <>
32
+ !
33
+
34
+ # Find the macro definition options.
35
+ MACROS=`${CXX} /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc -E -xdumpmacros=defs 2>&1 |
36
+ awk '{ if ($1 ~ /#define/) printf("-D%s=%s %s %s ",$2,$3,$4,$5) }'
37
+ `
38
+ MACROS="-D__cplusplus=199711L -D__STDC__ -D_REENTRANT $MACROS"
39
+
40
+ # Find the include path options.
41
+ #todo test for truss
42
+ INCLUDES=`truss -f -t openat ${CXX} -E /tmp/gccxml_identify_compiler_args$GCCXML_PID.cc 2>&1 |
43
+ awk '{if ($3 ~ /\"[A-Za-z0-9_\/.-]+\",/ && $3 !~ /tmp/)
44
+ if (tempString!=substr($3,2,length($3)-3))
45
+ {
46
+ tempString=substr($3,2,length($3)-3);
47
+ printf("-I%s ",tempString)
48
+ }
49
+ }'`
50
+
51
+ #cleanup
52
+ rm -rf "/tmp/gccxml_identify_compiler_args$GCCXML_PID.cc"
53
+
54
+ # The support headers are located where this script is.
55
+ SELFPATH=`echo $0 | sed -n '/\//{s/\/find_flags//;p;}'`
56
+ if test "x$SELFPATH" = "x" ; then SELFPATH="." ; fi
57
+ SELFPATH=`cd "$SELFPATH" ; pwd`
58
+
59
+ # Find CC version
60
+ CC_VERSION=`${CXX} -V 2>&1 | awk '{print $4}'`
61
+
62
+ # Use hacked headers for CC 5.8
63
+ if [ $CC_VERSION = 5.8 ]; then
64
+ INCLUDES="-iwrapper\"$SELFPATH/5.8\" $INCLUDES"
65
+ fi
66
+
67
+ # Format and print out the options.
68
+ OPTIONS="$MACROS $INCLUDES $SPECIAL"
69
+ echo $OPTIONS
@@ -0,0 +1,2 @@
1
+ GCCXML_COMPILER="/usr/bin/c++"
2
+ GCCXML_CXXFLAGS=" "
@@ -0,0 +1,93 @@
1
+ #!/bin/sh
2
+ #=============================================================================
3
+ #
4
+ # Program: GCC-XML
5
+ # Module: $RCSfile: gccxml_find_flags,v $
6
+ # Language: C++
7
+ # Date: $Date: 2007/11/28 19:52:06 $
8
+ # Version: $Revision: 1.3 $
9
+ #
10
+ # Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
11
+ # See Copyright.txt for details.
12
+ #
13
+ # This software is distributed WITHOUT ANY WARRANTY; without even
14
+ # the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15
+ # PURPOSE. See the above copyright notices for more information.
16
+ #
17
+ #=============================================================================
18
+
19
+ # Find the compiler executable name.
20
+ if test "x$1" = "x" ; then
21
+ if test "x$GCCXML_COMPILER" = "x"; then
22
+ if test "x${CXX}" != "x" ; then
23
+ GCCXML_COMPILER="${CXX}"
24
+ else
25
+ echo "Need to specify compiler name or set GCCXML_COMPILER or CXX."
26
+ exit 1
27
+ fi
28
+ fi
29
+ if test "x$GCCXML_CXXFLAGS" = "x"; then
30
+ if test "x${CXXFLAGS}" != "x" ; then
31
+ GCCXML_CXXFLAGS="${CXXFLAGS}"
32
+ fi
33
+ fi
34
+ else
35
+ GCCXML_COMPILER="$1"
36
+ shift
37
+ GCCXML_CXXFLAGS="$@"
38
+ fi
39
+
40
+ # Use the compiler's preprocessor to identify the compiler.
41
+ GCCXML_PID="$$"
42
+ cat > "/tmp/gccxml_identify_compiler$GCCXML_PID.cc" <<!
43
+ #if defined(__GNUC__)
44
+ GCCXML_SUPPORT="GCC"
45
+ #elif defined(__sgi) && defined(_COMPILER_VERSION)
46
+ GCCXML_SUPPORT="MIPSpro"
47
+ #elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 700)
48
+ GCCXML_SUPPORT="Intel"
49
+ #elif defined(__SUNPRO_CC)
50
+ GCCXML_SUPPORT="Sun"
51
+ #else
52
+ GCCXML_SUPPORT=""
53
+ #endif
54
+ !
55
+
56
+ # Run the compiler's preprocessor on the above code to identify it.
57
+ # (workaround for CC whitespace:)
58
+ if (${GCCXML_COMPILER} ${GCCXML_CXXFLAGS} \
59
+ -E "/tmp/gccxml_identify_compiler$GCCXML_PID.cc" \
60
+ | sed -e 's/[ ^]//g' \
61
+ > "/tmp/gccxml_identify_compiler$GCCXML_PID.pp";
62
+ rm -f "/tmp/gccxml_identify_compiler$GCCXML_PID.cc"
63
+ ) ; then : ; else
64
+ echo "Error running \"${GCCXML_COMPILER} -E\""
65
+ exit 1
66
+ fi
67
+
68
+ # Source the result to get the settings found.
69
+ . "/tmp/gccxml_identify_compiler$GCCXML_PID.pp"
70
+ rm -f "/tmp/gccxml_identify_compiler$GCCXML_PID.pp"
71
+
72
+ # Check if a supported compiler was identified.
73
+ if test "x$GCCXML_SUPPORT" = "x" ; then
74
+ echo "Compiler \"${GCCXML_COMPILER}\" is not supported by GCC-XML."
75
+ exit 1
76
+ fi
77
+
78
+ # The support directories are located near this script.
79
+ SELFPATH=`cd "\`echo $0 | sed -n '/\//{s/\/[^\/]*$//;p;}'\`";pwd`
80
+
81
+ # Find the compiler-specific support directory.
82
+ if test -d "${SELFPATH}/${GCCXML_SUPPORT}" ; then
83
+ GCCXML_SUPPORT_DIR="${SELFPATH}/${GCCXML_SUPPORT}"
84
+ else
85
+ echo "Cannot find GCC_XML compiler support directory ${GCCXML_SUPPORT}."
86
+ exit 1
87
+ fi
88
+
89
+ # Run the compiler-specific flag finding script.
90
+ GCCXML_FLAGS=`"${GCCXML_SUPPORT_DIR}/find_flags" ${GCCXML_COMPILER} ${GCCXML_CXXFLAGS}`
91
+
92
+ # Display the output.
93
+ echo ${GCCXML_FLAGS}
@@ -0,0 +1,246 @@
1
+ .TH GCC-XML 1 "May 04, 2008" "GCC-XML 0.9.0"
2
+ .SH NAME
3
+ .TP
4
+ .B gccxml
5
+ - Create an XML representation of C++ declarations.
6
+ .SH SYNOPSIS
7
+ .PP
8
+ gccxml [options] <input-file> -fxml=<output-file>
9
+ .SH DESCRIPTION
10
+ .PP
11
+ GCC-XML parses a C++ source file as it is seen by the compiler when it is built. An easy-to-parse XML representation of the class, function, and namespace declarations is dumped to a specified file. Full C preprocessing transforms the file into a C++ translation unit as seen by the compiler. This means that GCC-XML should make use of the same standard library and other header files as the compiler. GCC-XML can be configured to simulate any of several popular compilers.
12
+ .SH OPTIONS
13
+ .PP
14
+ The following options are available for running GCC-XML:
15
+ .TP
16
+ .B --copyright
17
+ Print the GCC-XML copyright and exit.
18
+ .TP
19
+ .B --debug
20
+ Print extra debugging information.
21
+ This option causes GCC-XML to print the executable name and command-line arguments used to execute the patched GCC C++ parser. This is useful when attempting to simulate an unsupported compiler.
22
+ .TP
23
+ .B -fxml=<output-file>
24
+ Specify the XML output file.
25
+ This option is passed directly on to the patched GCC C++ parser. It enables the XML dump and specifies the output file name.
26
+ .TP
27
+ .B -fxml-start=<xxx>[,...]
28
+ Specify a list of starting declarations.
29
+ This option is passed directly on to the patched GCC C++ parser. It is meaningful only if -fxml= is also specified. This specifies a comma-separated list of named starting declarations. GCC-XML will dump only the subset of the declarations in the translation unit that is reachable through a sequence of source references from one of the specified starting declarations.
30
+ .TP
31
+ .B --gccxml-compiler <xxx>
32
+ Set GCCXML_COMPILER to "xxx".
33
+ .TP
34
+ .B --gccxml-cxxflags <xxx>
35
+ Set GCCXML_CXXFLAGS to "xxx".
36
+ .TP
37
+ .B --gccxml-executable <xxx>
38
+ Set GCCXML_EXECUTABLE to "xxx".
39
+ .TP
40
+ .B --gccxml-cpp <xxx>
41
+ Set GCCXML_CPP to "xxx".
42
+ .TP
43
+ .B --gccxml-config <xxx>
44
+ Set GCCXML_CONFIG to "xxx".
45
+ .TP
46
+ .B --gccxml-root <xxx>
47
+ Set GCCXML_ROOT to "xxx".
48
+ .TP
49
+ .B --gccxml-gcc-options <xxx>
50
+ Read GCC options from file "xxx".
51
+ This option specifies a file from which to read options to pass to the patched GCC C++ parser. This is useful for specifying a long list of include directories. Each line in the file becomes one option. Empty lines and lines beginning in '#' are ignored.
52
+ .TP
53
+ .B --help
54
+ Print full help and exit.
55
+ Full help displays most of the documentation provided by the UNIX man page. It is provided for use on non-UNIX platforms, but is also convenient if the man page is not installed.
56
+ .TP
57
+ .B --help-html
58
+ Print full help in HTML format.
59
+ This option is used by GCC-XML authors to help produce web pages.
60
+ .TP
61
+ .B --man
62
+ Print a UNIX man page and exit.
63
+ This option is used by GCC-XML authors to generate the UNIX man page.
64
+ .TP
65
+ .B --print
66
+ Print configuration settings and exit.
67
+ GCC-XML has many configuration options to help it simulate another compiler. Using this option will cause GCC-XML to configure itself as if it were going to parse the C++ source, but stop and print the configuration found. This is useful for checking the configuration.
68
+ .TP
69
+ .B --preprocess
70
+ Preprocess the input and exit.
71
+ GCC-XML simulates the proprocessor of another compiler. Using this option will cause GCC-XML to configure itself as if it were going to parse the C++ source, but stop after preprocessing. This is useful for debugging problems related to simulation of the other compiler.
72
+ .TP
73
+ .B -E
74
+ Alias for --preprocess.
75
+ .TP
76
+ .B --version
77
+ Show program name/version banner and exit.
78
+ .PP
79
+ Other flags, such as -I and -D, are passed on to the patched GCC C++ parser executable.
80
+ .SH SETTINGS
81
+ .PP
82
+ GCC-XML is designed to simulate a compiler's parser while reading C++ source code. Some configuration settings are needed to determine how to simulate a particular compiler of the user's choice. The following settings can be used to configure GCC-XML:
83
+ .TP
84
+ .B GCCXML_COMPILER
85
+ The C++ compiler to be simulated.
86
+ GCC-XML will attempt to automatically determine how to simulate the compiler specified by this setting. The compiler is specified by its executable name (such as "g++"). For Visual Studio, the compiler is specified by "msvc6", "msvc7", "msvc71", or "msvc8" (if "cl" is given, GCC-XML attempts to guess which VS to use).
87
+ .TP
88
+ .B GCCXML_CXXFLAGS
89
+ The flags for the C++ compiler to be simulated.
90
+ The behavior of most compilers can be adjusted by specifying flags on the command line. When GCC-XML attempts to automatically determine how to simulate a compiler, these flags are taken into consideration.
91
+ .TP
92
+ .B GCCXML_CONFIG
93
+ The configuration file for common settings.
94
+ When non-default settings are often used, it is convenient to write a single file containing them. When such a file is specified, it will be read to configure any settings that are not yet known. Each line of the file consists of one assignment of the form KEY="VALUE" (for example, GCCXML_COMPILER="g++").
95
+ .TP
96
+ .B GCCXML_EXECUTABLE
97
+ Specify the patched GCC C++ parser executable.
98
+ The GCC-XML program as seen by the user is actually a front-end that determines the flags needed to configure the patched GCC C++ parser to simulate another compiler. This setting specifies the real executable to run once the flags have been determined. Users should rarely need to change this value from its default.
99
+ .TP
100
+ .B GCCXML_CPP
101
+ Specify the GCC C preprocessor executable.
102
+ The GCC-XML program as seen by the user is actually a front-end that determines the flags needed to configure the patched GCC C++ parser to simulate another compiler. This setting specifies the preprocessor to run with the flags that have been determined for debugging purposes. Users should rarely need to change this value from its default.
103
+ .TP
104
+ .B GCCXML_ROOT
105
+ The GCC-XML support library directory.
106
+ Since GCC-XML is only one C++ parser, it cannot exactly duplicate the functionality of every compiler it tries to simulate. Some compilers provide standard headers with code that GCC-XML cannot directly handle. To work around this limitation, a support library is provided for each compiler. This consists of a set of header files that are used in place of the compiler's system headers. These files contain slight tweaks and then include the corresponding real header. The root of the directory tree containing these support library headers is specified by this setting. Users should rarely need to change this value from its default.
107
+ .TP
108
+ .B GCCXML_FLAGS
109
+ Flags used to simulate the other compiler.
110
+ When GCC-XML runs the patched GCC C++ parser, these flags are passed to the program to tell it how to simulate a particular compiler. This setting is usually detected automatically from the other settings, but it can be specified directly by advanced users. Most users should not attempt to change this value from the automatic configuration.
111
+ .TP
112
+ .B GCCXML_USER_FLAGS
113
+ Additional user flags for compiler simulation.
114
+ When GCC-XML runs the patched GCC C++ parser, these flags are passed in addition to those specified by GCCXML_FLAGS. This allows advanced users to tweak the compiler simulation while still using the automatic configuration of GCCXML_FLAGS. Users should rarely need to change this value from its default.
115
+ .PP
116
+ There are several means by which these settings are configured. They are listed here in order of precedence (highest first):
117
+ .TP
118
+ .B Command-line Options
119
+ Settings can be specified by their corresponding options.
120
+ When a setting's corresponding command-line option is provided, it is used in favor over any other means of configuration. If GCCXML_CONFIG is set on the command-line, settings are read from the file with precedence just slightly lower than other command-line options.
121
+ .TP
122
+ .B Environment Variables
123
+ Settings are configured by name in the environment.
124
+ Each setting not already known is read from an environment variable with its name. If GCCXML_CONFIG is set by the environment, settings are read from the file with precedence just slightly lower than other environment variables.
125
+ .TP
126
+ .B Configuration Files
127
+ A search for GCCXML_CONFIG is performed.
128
+ If GCCXML_CONFIG has not yet been set, an attempt is made to find a configuration file automatically. First, if the file $HOME/.gccxml/config exists, it will be used. Second, if GCC-XML is being executed from its build directory, a config file from that directory will be used. Finally, if a config file is found in the installation's support library directory, it will be used. Once found, any unknown settings are read from the configuration file.
129
+ .TP
130
+ .B Guessing
131
+ Guesses are made based on other settings.
132
+ Once GCCXML_COMPILER has been set, it is used to automatically find the setting for GCCXML_FLAGS. If it is not set, the "CXX" environment variable is checked as a last-resort to find the compiler setting and determine GCCXML_FLAGS.
133
+ .PP
134
+ Most users should not have to adjust the defaults for these settings. There is a default GCCXML_CONFIG file provided in the support library directory after installation. It configures GCC-XML to simulate the compiler that was used to build it.
135
+ .SH COMPILERS
136
+ .PP
137
+ GCC-XML can simulate any of the following compilers:
138
+ .TP
139
+ .B GCC
140
+ Versions 4.2, 4.1, 4.0, 3.4, 3.3, 3.2, 2.95.x
141
+ .TP
142
+ .B Visual C++
143
+ Versions 8, 7.1, 7.0, and 6 (sp5)
144
+ .TP
145
+ .B Borland, Intel, SGI
146
+ formerly supported but no longer tested
147
+ .PP
148
+ The following extra C preprocessor definitions are provided:
149
+ .TP
150
+ .B -D__GCCXML__=MMmmpp
151
+ MM, mm, and pp are the major, minor, and patch versions of GCC-XML. This preprocessor symbol identifies GCC-XML to the source code as it is preprocessed. It can be used to enable GCC-XML-specific information.
152
+ .TP
153
+ .B -D__GCCXML_GNUC__=M
154
+ Defined to internal GCC parser major version.
155
+ .TP
156
+ .B -D__GCCXML_GNUC_MINOR__=m
157
+ Defined to internal GCC parser minor version.
158
+ .TP
159
+ .B -D__GCCXML_GNUC_PATCHLEVEL__=p
160
+ Defined to internal GCC parser patchlevel.
161
+ .PP
162
+ Advanced users can simulate other compilers by manually configuring the GCCXML_FLAGS setting. Contact the mailing list for help.
163
+ .SH METAINFO
164
+ .PP
165
+ GCC-XML has added a new attribute to the legal set of C/C++ attributes. The attribute is used to attach meta information to C/C++ source code, which will then appear in the XML output. The syntax for declaring an attribute is as follows:
166
+ .TP
167
+ .B __attribute((gccxml(<string>, <string>, ...)))
168
+ Here <string> is a quoted string. There must be at least one argument to the 'gccxml' attribute, but there is no upper limit to the total number of arguments. Each argument is verified to be a string - if a non-string argument is found, the attribute is ignored.
169
+ .PP
170
+ The XML output for the code element that is tagged with the attribute will then contain the following:
171
+ .TP
172
+ .B attributes=" ... gccxml(<string>,<string>,<string> ...) ... "
173
+ The 'attributes' XML attribute contains all attributes applied to the code element. Each argument of the attribute is printed without enclosing quotes, so if an argument contains the ',' character, the argument will appear to be multiple arguments.
174
+ .PP
175
+ The 'gccxml' attribute can be applied to any declaration including structs, classes, fields, parameters, methods, functions, variables, and typedefs. The only exception is that GCC's handling of the '__attribute' language element is currently broken for enumerations and constructors with an inlined body. The 'gccxml' attribute can be used any number of times on a given declaration.
176
+ .PP
177
+ As an example of how this attribute can be used to attach meta information to C++ declarations, consider the following macro:
178
+ .TP
179
+ .B #define _out_ __attribute((gccxml("out")))
180
+ Here '_out_' has been defined to be the gccxml attribute where the first argument is the string "out". It is recommended that the first argument be used as a unique string name for the type of meta information begin applied.
181
+ .PP
182
+ Now a method declaration can be written as follows:
183
+ .TP
184
+ .B void getInteger(_out_ int& i);
185
+ This will cause the XML output to contain meta information for the '_out_' attribute, in the form "gccxml(out)".
186
+ .PP
187
+ Using the 'gccxml' attribute enables meta information to be included directly within C++ source code, without the need for a custom parser to extract the meta information. The 'gccxml' attribute is provided for convenience only - there is no guarantee that future versions of GCC will accept the '__attribute' language element in a bug-free manner.
188
+ .SH COPYRIGHT
189
+ .PP
190
+ GCC-XML - XML output for GCC
191
+
192
+ .PP
193
+ Copyright (c) 2002-2007 Kitware, Inc., Insight Consortium
194
+
195
+ .PP
196
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
197
+
198
+ .TP
199
+ .B *
200
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
201
+
202
+ .TP
203
+ .B *
204
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
205
+
206
+ .TP
207
+ .B *
208
+ The names of Kitware, Inc., the Insight Consortium, or the names of any consortium members, or of any contributors, may not be used to endorse or promote products derived from this software without specific prior written permission.
209
+
210
+ .TP
211
+ .B *
212
+ Modified source versions must be plainly marked as such, and must not be misrepresented as being the original software.
213
+
214
+ .PP
215
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
216
+
217
+ .PP
218
+ ------------------------------------------------------------
219
+
220
+ .PP
221
+ gccxml_cc1plus - A GCC parser patched for XML dumps of translation units
222
+
223
+ .PP
224
+ Copyright (c) 2002-2007 Kitware, Inc., Insight Consortium
225
+
226
+ .PP
227
+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
228
+
229
+ .PP
230
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
231
+
232
+ .PP
233
+ You should have received a copy of the GNU General Public License along with this program; if not, write to the
234
+ Free Software Foundation, Inc.
235
+ 51 Franklin Street, Fifth Floor
236
+ Boston, MA 02110-1301 USA
237
+
238
+ .SH MAILING LIST
239
+ For help and discussion about using gccxml, a mailing list is
240
+ provided at
241
+ .B gccxml@www.gccxml.org.
242
+ Please first read the full documentation at
243
+ .B http://www.gccxml.org
244
+ before posting questions to the list.
245
+ .SH AUTHOR
246
+ This manual page was generated by "gccxml --man".