summaryrefslogtreecommitdiff
path: root/gcc/genmultilib
diff options
context:
space:
mode:
authormeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-11-30 17:49:53 +0000
committermeissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>1995-11-30 17:49:53 +0000
commit31d3a2a1303eabaa175be5bbcd2cecc8feda54f4 (patch)
tree60b2cc83a8522099e67172444d5f51e9a6319c63 /gcc/genmultilib
parent1cee7c215c26cc03233f906abba5464650e8e99c (diff)
downloadgcc-31d3a2a1303eabaa175be5bbcd2cecc8feda54f4.tar.gz
Add MULTILIB_EXCEPTiONS
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@10642 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genmultilib')
-rw-r--r--gcc/genmultilib31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/genmultilib b/gcc/genmultilib
index d4cc7ff7fe5..882180086d0 100644
--- a/gcc/genmultilib
+++ b/gcc/genmultilib
@@ -42,6 +42,9 @@
# appear in the first argument, and the second should be a synonym for
# it. Question marks are replaced with equal signs in both options.
+# The optional fourth argument is a list of multilib directory
+# combinations that should not be built.
+
# The output looks like
# #define MULTILIB_MATCHES "\
# SUBDIRECTORY OPTIONS;\
@@ -78,6 +81,7 @@
options=$1
dirnames=$2
matches=$3
+exceptions=$4
# What we want to do is select all combinations of the sets in
# options. Each combination which includes a set of mutually
@@ -112,6 +116,33 @@ combinations=`initial=/ ./tmpmultilib ${options}`
rm -f tmpmultilib
+# If there exceptions, weed them out now
+if [ -n "${exceptions}" ]; then
+ rm -f tmpmultilib2
+ cat >tmpmultilib2 <<\EOF
+#!/bin/sh
+# This recursive script weeds out any combination of multilib
+# switches that should not be generated. The output looks like
+# a list of subdirectory names with leading and trailing slashes.
+
+ for opt in $@; do
+ case "$opt" in
+EOF
+
+ for except in ${exceptions}; do
+ echo " /${except}/) : ;;" >> tmpmultilib2
+ done
+
+cat >>tmpmultilib2 <<\EOF
+ *) echo ${opt};;
+ esac
+ done
+EOF
+ chmod +x tmpmultilib2
+ combinations=`./tmpmultilib2 ${combinations}`
+ rm -f ./tmpmultilib2
+fi
+
# Construct a sed pattern which will convert option names to directory
# names.
todirnames=