Commit e918809c by Julian Brown Committed by Sandra Loosemore

print-sysroot-suffix.sh: Handle MULTILIB_REUSE settings.

2015-06-05  Julian Brown  <julian@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/print-sysroot-suffix.sh: Handle MULTILIB_REUSE settings.
	* config/t-sysroot-suffix (sysroot-suffix.h): Pass MULTILIB_REUSE
	to print-sysroot-suffix.sh script.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>

From-SVN: r224156
parent 9bbcf8b8
2015-06-05 Julian Brown <julian@codesourcery.com>
Sandra Loosemore <sandra@codesourcery.com>
* config/print-sysroot-suffix.sh: Handle MULTILIB_REUSE settings.
* config/t-sysroot-suffix (sysroot-suffix.h): Pass MULTILIB_REUSE
to print-sysroot-suffix.sh script.
2015-06-05 Tom de Vries <tom@codesourcery.com> 2015-06-05 Tom de Vries <tom@codesourcery.com>
merge from gomp4 branch: merge from gomp4 branch:
......
#! /bin/sh #! /bin/sh
# Script to generate SYSROOT_SUFFIX_SPEC equivalent to MULTILIB_OSDIRNAMES # 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-2015 Free Software Foundation, Inc. # Copyright (C) 2009-2015 Free Software Foundation, Inc.
...@@ -29,10 +30,11 @@ ...@@ -29,10 +30,11 @@
# MULTILIB_OSDIRNAMES \ # MULTILIB_OSDIRNAMES \
# MULTILIB_OPTIONS \ # MULTILIB_OPTIONS \
# MULTILIB_MATCHES \ # MULTILIB_MATCHES \
# MULTILIB_REUSE
# > t-sysroot-suffix.h # > t-sysroot-suffix.h
# The three options exactly correspond to the variables of the same # The four options exactly correspond to the variables of the same
# names defined in the tmake_file fragments. # names defined in the t-sysroot-suffix tmake_file fragment.
# Example: # Example:
# sh ./gcc/config/print-sysroot-suffix.sh "a=A" "a b/c/d" "" # sh ./gcc/config/print-sysroot-suffix.sh "a=A" "a b/c/d" ""
...@@ -54,6 +56,7 @@ set -e ...@@ -54,6 +56,7 @@ set -e
dirnames="$1" dirnames="$1"
options="$2" options="$2"
matches="$3" matches="$3"
reuse="$4"
cat > print-sysroot-suffix3.sh <<\EOF cat > print-sysroot-suffix3.sh <<\EOF
#! /bin/sh #! /bin/sh
...@@ -80,7 +83,14 @@ shift 2 ...@@ -80,7 +83,14 @@ shift 2
n="\" \\ n="\" \\
$padding\"" $padding\""
if [ $# = 0 ]; then if [ $# = 0 ]; then
case $optstring in
EOF 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= pat=
for x in $dirnames; do for x in $dirnames; do
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
sysroot-suffix.h: $(srcdir)/config/print-sysroot-suffix.sh sysroot-suffix.h: $(srcdir)/config/print-sysroot-suffix.sh
$(SHELL) $(srcdir)/config/print-sysroot-suffix.sh \ $(SHELL) $(srcdir)/config/print-sysroot-suffix.sh \
"$(MULTILIB_OSDIRNAMES)" "$(MULTILIB_OPTIONS)" \ "$(MULTILIB_OSDIRNAMES)" "$(MULTILIB_OPTIONS)" \
"$(MULTILIB_MATCHES)" > tmp-sysroot-suffix.h "$(MULTILIB_MATCHES)" "$(MULTILIB_REUSE)" > tmp-sysroot-suffix.h
mv tmp-sysroot-suffix.h $@ mv tmp-sysroot-suffix.h $@
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment