diff gcc/config/print-sysroot-suffix.sh @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children 84e7813d76e9
line wrap: on
line diff
--- a/gcc/config/print-sysroot-suffix.sh	Sun Aug 21 07:07:55 2011 +0900
+++ b/gcc/config/print-sysroot-suffix.sh	Fri Oct 27 22:46:09 2017 +0900
@@ -1,8 +1,9 @@
 #! /bin/sh
 # Script to generate SYSROOT_SUFFIX_SPEC equivalent to MULTILIB_OSDIRNAMES
-# Arguments are MULTILIB_OSDIRNAMES, MULTILIB_OPTIONS and MULTILIB_MATCHES.
+# Arguments are MULTILIB_OSDIRNAMES, MULTILIB_OPTIONS, MULTILIB_MATCHES,
+# and MULTILIB_REUSE.
 
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 
 # This file is part of GCC.
 
@@ -29,10 +30,11 @@
 #          MULTILIB_OSDIRNAMES \
 #          MULTILIB_OPTIONS \
 #          MULTILIB_MATCHES \
+#          MULTILIB_REUSE
 #      > t-sysroot-suffix.h
 
-# The three options exactly correspond to the variables of the same
-# names defined in the tmake_file fragments.
+# The four options exactly correspond to the variables of the same
+# names defined in the t-sysroot-suffix tmake_file fragment.
 
 # Example:
 #   sh ./gcc/config/print-sysroot-suffix.sh "a=A" "a b/c/d" ""
@@ -54,6 +56,7 @@
 dirnames="$1"
 options="$2"
 matches="$3"
+reuse="$4"
 
 cat > print-sysroot-suffix3.sh <<\EOF
 #! /bin/sh
@@ -80,7 +83,14 @@
 n="\" \\
 $padding\""
 if [ $# = 0 ]; then
+  case $optstring in
 EOF
+for x in $reuse; do
+  l=`echo $x | sed -e 's/=.*$//' -e 's/\./=/g'`
+  r=`echo $x | sed -e 's/^.*=//' -e 's/\./=/g'`
+  echo "/$r/) optstring=\"/$l/\" ;;" >> print-sysroot-suffix2.sh
+done
+echo "  esac" >> print-sysroot-suffix2.sh
 
 pat=
 for x in $dirnames; do