source: scripts/patches/gcc-3.4.1-fix_configure_for_target_native.patch@ 643f8be

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 643f8be was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

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