Message ID | 20140605202327.0432bbe9@octopus |
---|---|
State | New |
Headers | show |
On Thu, 5 Jun 2014 20:23:27 +0100 Julian Brown <julian@codesourcery.com> wrote: > Hi, > > The print-sysroot-suffix.sh script that can be used (via the > t-sysroot-suffix makefile fragment) to auto-generate > the SYSROOT_SUFFIX_SPEC macro for non-trivial multilib setups does not > take into account the MULTILIB_REUSE target fragment variable. > > I'm not sure of a way to demonstrate how this causes problems with a > vanilla tree, but consider the attached patch > (arm-sysroot-mlib-arrangement-1.diff) intended to create a compiler > with three multilibs: Ping? (Note that no in-tree targets use both print-sysroot-suffix.sh and MULTILIB_REUSE, AFAICT, so this patch is mostly useful to 3rd-party integrators.) Julian
--- gcc/config/print-sysroot-suffix.sh (revision 210209) +++ gcc/config/print-sysroot-suffix.sh (working copy) @@ -29,6 +29,7 @@ # MULTILIB_OSDIRNAMES \ # MULTILIB_OPTIONS \ # MULTILIB_MATCHES \ +# MULTILIB_REUSE # > t-sysroot-suffix.h # The three options exactly correspond to the variables of the same @@ -54,6 +55,7 @@ set -e dirnames="$1" options="$2" matches="$3" +reuse="$4" cat > print-sysroot-suffix3.sh <<\EOF #! /bin/sh @@ -80,7 +82,14 @@ shift 2 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 --- gcc/config/t-sysroot-suffix (revision 210209) +++ gcc/config/t-sysroot-suffix (working copy) @@ -3,5 +3,5 @@ sysroot-suffix.h: $(srcdir)/config/print-sysroot-suffix.sh $(SHELL) $(srcdir)/config/print-sysroot-suffix.sh \ "$(MULTILIB_OSDIRNAMES)" "$(MULTILIB_OPTIONS)" \ - "$(MULTILIB_MATCHES)" > tmp-sysroot-suffix.h + "$(MULTILIB_MATCHES)" "$(MULTILIB_REUSE)" > tmp-sysroot-suffix.h mv tmp-sysroot-suffix.h $@