summaryrefslogtreecommitdiff
path: root/gcc/mkconfig.sh
diff options
context:
space:
mode:
authorgrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-03 05:22:51 +0000
committergrahams <grahams@138bc75d-0d04-0410-961f-82ee72b054a4>2002-01-03 05:22:51 +0000
commitf9c310767f8d0464ab1359326f08254f3dea9440 (patch)
tree1439891a388da71d9d3697962f15432fbd3e35a0 /gcc/mkconfig.sh
parent76c6f48d72cc265e1e6b7d0b6d53a9093114fc08 (diff)
downloadgcc-f9c310767f8d0464ab1359326f08254f3dea9440.tar.gz
* mkconfig.sh: Output to config.h, hconfig.h and tconfig.h
forward defs for struct tags rtx_def, union_tree, rtvec_def also output corresponding typedefs for rtxm, tree, and rtvcec. * system.h: Move forward defs for struct tags rtx_def, union_tree, rtvec_def along with corresponding typedefs for rtx, tree, and rtvcec to config.h, hconfig.h, tconfig.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48499 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mkconfig.sh')
-rw-r--r--gcc/mkconfig.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/mkconfig.sh b/gcc/mkconfig.sh
index fde254a86dd..b63e40a7087 100644
--- a/gcc/mkconfig.sh
+++ b/gcc/mkconfig.sh
@@ -35,6 +35,27 @@ if [ -n "$HEADERS" ]; then
esac
fi
+# Provide three core typedefs used by everything, if we are compiling
+# GCC. These used to be found in rtl.h and tree.h, but this is no
+# longer practical. Providing these in config.h/tconfig.h/hconfig.h
+# rather than system.h allows the typedefs to be used anywhere in GCC.
+case $output in
+ *config.h | *hconfig.h | *tconfig.h)
+ echo "#ifdef IN_GCC"
+ echo "/* Provide three core typedefs used by everything, if we are compiling"
+ echo " GCC. These used to be found in rtl.h and tree.h, but this is no"
+ echo " longer practical. Providing these here rather that system.h allows"
+ echo " the typedefs to be used everywhere within GCC. */"
+ echo "struct rtx_def;"
+ echo "typedef struct rtx_def *rtx;"
+ echo "struct rtvec_def;"
+ echo "typedef struct rtvec_def *rtvec;"
+ echo "union tree_node;"
+ echo "typedef union tree_node *tree;"
+ echo "#endif"
+ ;;
+esac
+
if [ -n "$HEADERS" ]; then
echo '#ifdef IN_GCC'
for file in $HEADERS; do