Magellan Linux

Annotation of /trunk/gcc/patches/gcc-3.4.3-fix_configure_for_target_native-1.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 169 - (hide annotations) (download)
Tue May 8 21:36:54 2007 UTC (17 years ago) by niro
File size: 4074 byte(s)
-moved to patches subdir

1 niro 169 Submitted By: Ryan Oliver (ryan dot oliver at pha dot com dot au)
2     Origin: Ryan Oliver
3     Date: 2004-07-15
4     Initial Package Version: 3.4.1 (problem exists through 3.3 series)
5     Upstream Status: Unknown
6     Description: There are issues with configure when attempting to cross-compile
7     a native gcc for target. During the last stage of make configure-host,
8     where host = target, the configury doesn't check if host != build.
9     Therefore it assumes that the build is a native build and performs
10     binutils feature checks using either
11     a) what the native compiler we are building would normally use.
12     If a target-native binutils has already been built with the same
13     prefix, this is the binutils which is used which of course will not
14     work on host
15     b) the host os's assembler/linker/nm/as
16     which leads to bogus results.
17     This patch fixes this behaviour, so that if host = target and
18     host != build the cross tools will be used for feature checks.
19    
20     --- gcc-3.4.1-ORIG/gcc/configure 2004-04-19 09:45:10.000000000 +1000
21     +++ gcc-3.4.1/gcc/configure 2004-07-15 02:01:17.000000000 +1000
22     @@ -9518,7 +9518,9 @@
23     # If the loop below does not find an assembler, then use whatever
24     # one we can find in the users's path.
25     # user's path.
26     - if test "x$program_prefix" != xNONE; then
27     + if test "x$host" = "x$target" -a "x$host" != "x$build"; then
28     + gcc_cv_as=${target_alias}-as$host_exeext
29     + elif test "x$gcc_cv_as" = x -a "x$program_prefix" != xNONE; then
30     gcc_cv_as=${program_prefix}as$host_exeext
31     else
32     gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
33     @@ -9528,10 +9530,13 @@
34     $test_prefix/libexec/gcc/$target_noncanonical \
35     /usr/lib/gcc/$target_noncanonical/$gcc_version \
36     /usr/lib/gcc/$target_noncanonical \
37     - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
38     - $test_prefix/$target_noncanonical/bin"
39     + $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
40     + if test "x$build" = "x$target" ; then
41     + test_dirs="$test_dirs \
42     + $test_prefix/$target_noncanonical/bin"
43     + fi
44    
45     - if test x$host = x$target; then
46     + if test x$host = x$target -a x$host = x$build; then
47     test_dirs="$test_dirs \
48     /usr/libexec \
49     /usr/ccs/gcc \
50     @@ -9633,7 +9638,9 @@
51     # If the loop below does not find an linker, then use whatever
52     # one we can find in the users's path.
53     # user's path.
54     - if test "x$program_prefix" != xNONE; then
55     + if test "x$host" = "x$target" -a "x$host" != "x$build"; then
56     + gcc_cv_ld=${target_alias}-ld$host_exeext
57     + elif test "x$gcc_cv_ld" = x -a "x$program_prefix" != xNONE; then
58     gcc_cv_ld=${program_prefix}ld$host_exeext
59     else
60     gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
61     @@ -9643,10 +9650,13 @@
62     $test_prefix/libexec/gcc/$target_noncanonical \
63     /usr/lib/gcc/$target_noncanonical/$gcc_version \
64     /usr/lib/gcc/$target_noncanonical \
65     - $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
66     - $test_prefix/$target_noncanonical/bin"
67     + $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version"
68     + if test "x$build" = "x$target" ; then
69     + test_dirs="$test_dirs \
70     + $test_prefix/$target_noncanonical/bin"
71     + fi
72    
73     - if test x$host = x$target; then
74     + if test x$host = x$target -a x$host = x$build; then
75     test_dirs="$test_dirs \
76     /usr/libexec \
77     /usr/ccs/gcc \
78     @@ -9692,6 +9702,8 @@
79     gcc_cv_nm=./nm$host_exeext
80     rm -f nm$host_exeext
81     $symbolic_link ../binutils/nm-new$host_exeext nm$host_exeext 2>/dev/null
82     +elif test "x$host" = "x$target" -a "x$host" != "x$build"; then
83     + gcc_cv_nm=${target_alias}-nm$host_exeext
84     elif test "x$program_prefix" != xNONE; then
85     gcc_cv_nm=${program_prefix}nm$host_exeext
86     else
87     @@ -9718,6 +9730,8 @@
88     rm -f objdump$host_exeext
89     $symbolic_link ../binutils/objdump$host_exeext \
90     objdump$host_exeext 2>/dev/null
91     +elif test "x$host" = "x$target" -a "x$host" != "x$build"; then
92     + gcc_cv_objdump=${target_alias}-objdump$host_exeext
93     elif test "x$program_prefix" != xNONE; then
94     gcc_cv_objdump=${program_prefix}objdump$host_exeext
95     else

Properties

Name Value
svn:executable *