aboutsummaryrefslogtreecommitdiff
path: root/gcc/genmultilib
diff options
context:
space:
mode:
authorBen Collins <bcollins@debian.org>2000-03-06 18:05:52 +0000
committerJakub Jelinek <jakub@gcc.gnu.org>2000-03-06 19:05:52 +0100
commit0a8d66180c7acc2e53e62127c2de2a9a0a53dce2 (patch)
tree222bb1ec57e5b5560e626764100e5afd5f9e13f5 /gcc/genmultilib
parentfd05eb8097447db2163a7900a2db30be7aaf9851 (diff)
downloadgcc-0a8d66180c7acc2e53e62127c2de2a9a0a53dce2.zip
gcc-0a8d66180c7acc2e53e62127c2de2a9a0a53dce2.tar.gz
gcc-0a8d66180c7acc2e53e62127c2de2a9a0a53dce2.tar.bz2
Makefile.in: Pass a new MULTILIB_EXCLUSIONS option as the sixth argument to genmultilib.
* Makefile.in: Pass a new MULTILIB_EXCLUSIONS option as the sixth argument to genmultilib. * genmultilib: accept new MULTILIB_EXCLUSIONS option and output the contents into the multilib.h header. * gcc.c: Declare multilib_exclusions for the specs file. (set_multilib_dir): Use it. (print_multilib_info): Likewise. * t-linux64: Declare arguments for new MULTILIB_EXCLUSIONS option to pass to genmultilib. From-SVN: r32365
Diffstat (limited to 'gcc/genmultilib')
-rw-r--r--gcc/genmultilib57
1 files changed, 42 insertions, 15 deletions
diff --git a/gcc/genmultilib b/gcc/genmultilib
index b6dfdf3..6610b7b 100644
--- a/gcc/genmultilib
+++ b/gcc/genmultilib
@@ -53,6 +53,16 @@
# The optional fifth argument is a list of options that should be
# used whenever building multilib libraries.
+# The optional sixth argument is a list of exclusions used internally by
+# the compiler similar to exceptions. The difference being that exclusions
+# allow matching default options that genmultilib does not know about and
+# is done at runtime as opposed to being sorted out at compile time.
+# Each element in the list is a seperate exclusion rule. Each rule is
+# a list of options (sans preceding '-') seperated by a '/'. The options
+# on the rule are grouped as an AND operation, and all options much match
+# for the rule to exclude a set. Options can be preceded with a '!' to
+# match a logical NOT.
+
# The output looks like
# #define MULTILIB_MATCHES "\
# SUBDIRECTORY OPTIONS;\
@@ -66,23 +76,28 @@
# The order of the subdirectories is such that they can be created in
# order; that is, a subdirectory is preceded by all its parents.
-# Here is a example (this is simplified from the actual 680x0 case):
-# genmultilib "m68000/m68020 msoft-float" "m68000 m68020 msoft-float"
-# "m68000=mc68000"
+# Here is an example (this is from the actual sparc64 case):
+# genmultilib 'm64/m32 mno-app-regs|mcmodel=medany' '64 32 alt'
+# 'mcmodel?medany=mcmodel?medmid' 'm32/mno-app-regs* m32/mcmodel=*'
+# 'm32/!m64/mno-app-regs m32/!m64/mcmodel=medany'
# This produces:
-# ". !m68000 !mc68000 !m68020 !msoft-float;",
-# "m68000 m68000 !m68020 !msoft-float;",
-# "m68000 mc60000 !m68020 !msoft-float;",
-# "m68020 !m68000 !mc68000 m68020 !msoft-float;",
-# "msoft-float !m68000 !mc68000 !m68020 msoft-float;",
-# "m68000/msoft-float m68000 !m68020 msoft-float;",
-# "m68000/msoft-float mc68000 !m68020 msoft-float;",
-# "m68020/msoft-float !m68000 !mc68000 m68020 msoft-float;",
+# ". !m64 !m32 !mno-app-regs !mcmodel=medany;",
+# "64 m64 !m32 !mno-app-regs !mcmodel=medany;",
+# "32 !m64 m32 !mno-app-regs !mcmodel=medany;",
+# "alt !m64 !m32 mno-app-regs mcmodel=medany;",
+# "alt !m64 !m32 mno-app-regs !mcmodel=medany;",
+# "alt !m64 !m32 !mno-app-regs mcmodel=medany;",
+# "64/alt m64 !m32 mno-app-regs mcmodel=medany;",
+# "64/alt m64 !m32 mno-app-regs !mcmodel=medany;",
+# "64/alt m64 !m32 !mno-app-regs mcmodel=medany;",
#
-# The effect is that `gcc -msoft-float' (for example) will append
-# msoft-float to the directory name when searching for libraries or
-# startup files, and `gcc -m68000 -msoft-float' (for example) will
-# append m68000/msoft-float.
+# The effect is that `gcc -mno-app-regs' (for example) will append "alt"
+# to the directory name when searching for libraries or startup files and
+# `gcc -m32 -mcmodel=medany' (for example) will append "32/alt". Also note
+# that exclusion above is moot, unless the compiler had a default of -m32,
+# which would mean that all of the "alt" directories (not the 64/alt ones)
+# would be ignored (not generated, nor used) since the exclusion also
+# matches the multilib_default args.
# Copy the positional parameters into variables.
options=$1
@@ -90,6 +105,7 @@ dirnames=$2
matches=$3
exceptions=$4
extra=$5
+exclusions=$6
echo "static char *multilib_raw[] = {"
@@ -286,6 +302,17 @@ echo "};"
# Output the default options now
echo ""
echo "static char *multilib_extra = \"${extra}\";"
+
+# Output the exclusion rules now
+echo ""
+echo "static char *multilib_exclusions_raw[] = {"
+for rule in ${exclusions}; do
+ s=`echo ${rule} | sed -e 's,/, ,g'`
+ echo "\"${s};\","
+done
+echo "NULL"
+echo "};"
+
rm -f tmpmultilib2
exit 0