source: patches/gcc-3.4.1-fix_configure_for_target_native.patch @ 617118d

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 617118d was 617118d, checked in by Jim Gifford <clfs@…>, 18 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100644
File size: 4.0 KB
  • gcc/configure

    Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au)
    Origin: Ryan Oliver
    Date: 2004-07-15
    Initial Package Version: 3.4.1 (problem exists through 3.3 series)
    Description: There are issues with configure when attempting to cross-compile
    	a native gcc for target. During the last stage of make configure-host,
    	where host = target, the configury doesn't check if host != build.
    	Therefore it assumes that the build is a native build and performs
    	 binutils feature checks using either 
    	a) what the native compiler we are building would normally use.
    	   If a target-native binutils has already been built with the same
    	   prefix, this is the binutils which is used which of course will not
    	   work on host
    	b) the host os's assembler/linker/nm/as
    	which leads to bogus results.
    	This patch fixes this behaviour, so that if host = target and 
    	host != build the cross tools will be used for feature checks.
    
    old new  
    95189518        # If the loop below does not find an assembler, then use whatever
    95199519        # one we can find in the users's path.
    95209520        # user's path.
    9521         if test "x$program_prefix" != xNONE; then
     9521        if test "x$host" = "x$target" -a "x$host" != "x$build"; then
     9522                gcc_cv_as=${target_alias}-as$host_exeext
     9523        elif test "x$gcc_cv_as" = x -a "x$program_prefix" != xNONE; then
    95229524                gcc_cv_as=${program_prefix}as$host_exeext
    95239525        else
    95249526                gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
     
    95289530                   $test_prefix/libexec/gcc/$target_noncanonical \
    95299531                   /usr/lib/gcc/$target_noncanonical/$gcc_version \
    95309532                   /usr/lib/gcc/$target_noncanonical \
    9531                    $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
    9532                    $test_prefix/$target_noncanonical/bin"
     9533                   $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
     9534        if test "x$build" = "x$target" ; then
     9535                test_dirs="$test_dirs \
     9536                           $test_prefix/$target_noncanonical/bin"
     9537        fi
    95339538
    9534         if test x$host = x$target; then
     9539        if test x$host = x$target -a x$host = x$build; then
    95359540            test_dirs="$test_dirs \
    95369541                   /usr/libexec \
    95379542                   /usr/ccs/gcc \
     
    96339638        # If the loop below does not find an linker, then use whatever
    96349639        # one we can find in the users's path.
    96359640        # user's path.
    9636         if test "x$program_prefix" != xNONE; then
     9641        if test "x$host" = "x$target" -a "x$host" != "x$build"; then
     9642                gcc_cv_ld=${target_alias}-ld$host_exeext
     9643        elif test "x$gcc_cv_ld" = x -a "x$program_prefix" != xNONE; then
    96379644                gcc_cv_ld=${program_prefix}ld$host_exeext
    96389645        else
    96399646                gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
     
    96439650                   $test_prefix/libexec/gcc/$target_noncanonical \
    96449651                   /usr/lib/gcc/$target_noncanonical/$gcc_version \
    96459652                   /usr/lib/gcc/$target_noncanonical \
    9646                    $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
    9647                    $test_prefix/$target_noncanonical/bin"
     9653                   $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
     9654        if test "x$build" = "x$target" ; then
     9655                test_dirs="$test_dirs \
     9656                           $test_prefix/$target_noncanonical/bin"
     9657        fi
    96489658
    9649         if test x$host = x$target; then
     9659        if test x$host = x$target -a x$host = x$build; then
    96509660            test_dirs="$test_dirs \
    96519661                   /usr/libexec \
    96529662                   /usr/ccs/gcc \
     
    96929702        gcc_cv_nm=./nm$host_exeext
    96939703        rm -f nm$host_exeext
    96949704        $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
     9705elif test "x$host" = "x$target" -a "x$host" != "x$build"; then
     9706        gcc_cv_nm=${target_alias}-nm$host_exeext
    96959707elif test "x$program_prefix" != xNONE; then
    96969708        gcc_cv_nm=${program_prefix}nm$host_exeext
    96979709else
     
    97189730        rm -f objdump$host_exeext
    97199731        $symbolic_link ../binutils/objdump$host_exeext \
    97209732                objdump$host_exeext 2>/dev/null
     9733elif test "x$host" = "x$target" -a "x$host" != "x$build"; then
     9734        gcc_cv_objdump=${target_alias}-objdump$host_exeext
    97219735elif test "x$program_prefix" != xNONE; then
    97229736        gcc_cv_objdump=${program_prefix}objdump$host_exeext
    97239737else
Note: See TracBrowser for help on using the repository browser.