From patchwork Sun Jul 4 22:08:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Fix PR target/44531 From: Kaz Kojima X-Patchwork-Id: 57855 Message-Id: <20100705.070835.215034573.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Date: Mon, 05 Jul 2010 07:08:35 +0900 (JST) On SH, we use sed for processing multilibs configuration in config.gcc. PR target/44531 is a 4.5/4.6 regression reported for darwin hosts which have a non-gnu sed. The 'i' modifier of the 's' command of sed looks a gnu extension which darwin's sed doesn't support. The attached patch uses explicit regular expressions instead of the 'i' modifier. It's tested on native sh4-unknown-linux-gnu, cross combined tree setting on powerpc- apple-darwin9.8.0 and i686-pc-linux-gnu. For native sh-linux, I'm using an unrevied patch in http://gcc.gnu.org/ml/gcc-patches/2010-06/msg02420.html to avoid bootstrap issue on that target. Applied on trunk. I'll apply it to 4.5-branch latter. Regards, kaz --- 2010-07-04 Kaz Kojima PR target/44531 * config.gcc (sh*-*-*): Use regular expressions instead of the 'i' modifier for sed substitutions. --- ORIG/trunk/gcc/config.gcc 2010-06-13 10:27:51.000000000 +0900 +++ trunk/gcc/config.gcc 2010-06-21 07:28:15.000000000 +0900 @@ -2335,7 +2335,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbian target_cpu_default=SELECT_`echo ${sh_cpu_default}|tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_` tm_defines=${tm_defines}' SH_MULTILIB_CPU_DEFAULT=\"'`echo $sh_cpu_default|sed s/sh/m/`'\"' tm_defines="$tm_defines SUPPORT_`echo $sh_cpu_default | sed 's/^m/sh/' | tr abcdefghijklmnopqrstuvwxyz- ABCDEFGHIJKLMNOPQRSTUVWXYZ_`=1" - sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^sh/m/i' -e 's/ sh/ m/gi' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-` + sh_multilibs=`echo $sh_multilibs | sed -e 's/,/ /g' -e 's/^[Ss][Hh]/m/' -e 's/ [Ss][Hh]/ m/g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-` for sh_multilib in ${sh_multilibs}; do case ${sh_multilib} in m1 | m2 | m2e | m3 | m3e | \