summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/mkconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/mkconfig.sh')
-rw-r--r--contrib/gcc/mkconfig.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/gcc/mkconfig.sh b/contrib/gcc/mkconfig.sh
index f0d97ec..cc87ccb 100644
--- a/contrib/gcc/mkconfig.sh
+++ b/contrib/gcc/mkconfig.sh
@@ -2,11 +2,11 @@
# Generate gcc's config.h, which is not your normal autoconf-generated
# config.h (that's auto-(host|build).h). $1 is the file to generate.
-# HEADERS, DEFINES, and possibly TARGET_CPU_DEFAULT are expected to be
-# set in the environment.
+# TM_DEFINES, HEADERS, XM_DEFINES, and possibly TARGET_CPU_DEFAULT are
+# expected to be set in the environment.
if [ -z "$1" ]; then
- echo "Usage: HEADERS='list' DEFINES='list' mkconfig.sh FILE" >&2
+ echo "Usage: TM_DEFINES='list' HEADERS='list' XM_DEFINES='list' mkconfig.sh FILE" >&2
exit 1
fi
@@ -19,6 +19,13 @@ if [ "$TARGET_CPU_DEFAULT" != "" ]; then
echo "#define TARGET_CPU_DEFAULT ($TARGET_CPU_DEFAULT)" >> ${output}T
fi
+# Provide defines for other target machine macros to be used everywhere.
+for def in $TM_DEFINES; do
+ echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
+ echo "# define $def" | sed 's/=/ /' >> ${output}T
+ echo "#endif" >> ${output}T
+done
+
# The first entry in HEADERS may be auto-host.h or auto-build.h;
# it wants to be included even when not -DIN_GCC.
if [ -n "$HEADERS" ]; then
@@ -50,6 +57,7 @@ typedef struct rtvec_def *rtvec;
union tree_node;
typedef union tree_node *tree;
#endif
+#define GTY(x)
EOF
;;
esac
@@ -62,7 +70,7 @@ if [ -n "$HEADERS" ]; then
echo '#endif' >> ${output}T
fi
-for def in $DEFINES; do
+for def in $XM_DEFINES; do
echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
echo "# define $def" | sed 's/=/ /' >> ${output}T
echo "#endif" >> ${output}T
OpenPOWER on IntegriCloud