When there is an exported shell-function 'dir()' and /bin/sh is bashish,
the make aborts very ugly (see below).

The problem is a quoting bug in gcc/mklibgcc.in, where the dir-variable
gets expanded by make, but make does not have the dir-variable set anywhere
and so puts in the shell-function.

Here's the failure text:
( ` if [ -f ./nm ] ; then echo ./nm ; elif [ -f
/tools/haubi/toolsbox-4-patchespre.haubi/i686-pc-linux-gnu/var/tmp/portage/gcc-3.4.4/work/build/gcc/../binutils/nm-new
] ; then echo
/tools/haubi/toolsbox-4-patchespre.haubi/i686-pc-linux-gnu/var/tmp/portage/gcc-3.4.4/work/build/gcc/../binutils/nm-new
; else if [ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo nm; else
t='s,y,y,'; echo nm | sed -e  ; fi; fi` -pg libgcc/./_muldi3.o | gawk 'NF == 3
&& $2 !~ /^[UN]$/ { print "\t.hidden", $3 }'; cat libgcc/() {  local x;
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `( ` if [ -f ./nm ] ; then echo ./nm ; elif [ -f
/tools/haubi/toolsbox-4-patchespre.haubi/i686-pc-linux-gnu/var/tmp/portage/gcc-3.4.4/work/build/gcc/../binutils/nm-new
] ; then echo
/tools/haubi/toolsbox-4-patchespre.haubi/i686-pc-linux-gnu/var/tmp/portage/gcc-3.4.4/work/build/gcc/../binutils/nm-new
; else if [ "i686-pc-linux-gnu" = "i686-pc-linux-gnu" ] ; then echo nm; else
t='s,y,y,'; echo nm | sed -e  ; fi; fi` -pg libgcc/./_muldi3.o | gawk 'NF == 3
&& $2 !~ /^[UN]$/ { print "\t.hidden", $3 }'; cat libgcc/() {  local x;'
make[3]: *** [libgcc/./_muldi3.oS] Error 2
make[2]: *** [libgcc.a] Error 2
make[1]: *** [stage1_build] Error 2
make: *** [profiledbootstrap] Error 2

-- 
           Summary: quoting of dir-variable in mklibgcc.in
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michael dot haubenwallner at salomon dot at
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22213

Reply via email to