source:
scripts/patches/gcc-3.4.1-fix_configure_for_target_native.patch@
135c6f8
Last change on this file since 135c6f8 was 7f65c0e, checked in by , 19 years ago | |
---|---|
|
|
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 9518 9518 # If the loop below does not find an assembler, then use whatever 9519 9519 # one we can find in the users's path. 9520 9520 # 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 9522 9524 gcc_cv_as=${program_prefix}as$host_exeext 9523 9525 else 9524 9526 gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext … … 9528 9530 $test_prefix/libexec/gcc/$target_noncanonical \ 9529 9531 /usr/lib/gcc/$target_noncanonical/$gcc_version \ 9530 9532 /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 9533 9538 9534 if test x$host = x$target ; then9539 if test x$host = x$target -a x$host = x$build; then 9535 9540 test_dirs="$test_dirs \ 9536 9541 /usr/libexec \ 9537 9542 /usr/ccs/gcc \ … … 9633 9638 # If the loop below does not find an linker, then use whatever 9634 9639 # one we can find in the users's path. 9635 9640 # 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 9637 9644 gcc_cv_ld=${program_prefix}ld$host_exeext 9638 9645 else 9639 9646 gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext … … 9643 9650 $test_prefix/libexec/gcc/$target_noncanonical \ 9644 9651 /usr/lib/gcc/$target_noncanonical/$gcc_version \ 9645 9652 /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 9648 9658 9649 if test x$host = x$target ; then9659 if test x$host = x$target -a x$host = x$build; then 9650 9660 test_dirs="$test_dirs \ 9651 9661 /usr/libexec \ 9652 9662 /usr/ccs/gcc \ … … 9692 9702 gcc_cv_nm=./nm$host_exeext 9693 9703 rm -f nm$host_exeext 9694 9704 $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null 9705 elif test "x$host" = "x$target" -a "x$host" != "x$build"; then 9706 gcc_cv_nm=${target_alias}-nm$host_exeext 9695 9707 elif test "x$program_prefix" != xNONE; then 9696 9708 gcc_cv_nm=${program_prefix}nm$host_exeext 9697 9709 else … … 9718 9730 rm -f objdump$host_exeext 9719 9731 $symbolic_link ../binutils/objdump$host_exeext \ 9720 9732 objdump$host_exeext 2>/dev/null 9733 elif test "x$host" = "x$target" -a "x$host" != "x$build"; then 9734 gcc_cv_objdump=${target_alias}-objdump$host_exeext 9721 9735 elif test "x$program_prefix" != xNONE; then 9722 9736 gcc_cv_objdump=${program_prefix}objdump$host_exeext 9723 9737 else
Note:
See TracBrowser
for help on using the repository browser.