patches/glibc/2.1.3/glibc-2.1.3-ac_cv_prog_cc_cross.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
yann@1
     1
Lets you work around the canadian cross build error
yann@1
     2
yann@1
     3
.../gcc-3.4.0-glibc-2.1.3/build-glibc/elf/sln .../gcc-3.4.0-glibc-2.1.3/build-glibc/elf/symlink.list
yann@1
     4
make[1]: *** [install-symbolic-link] Segmentation fault
yann@1
     5
make[1]: Leaving directory `.../gcc-3.4.0-glibc-2.1.3/glibc-2.1.3'
yann@1
     6
make: *** [install] Error 2
yann@1
     7
yann@1
     8
by setting --host != --build when running glibc-2.1.3/configure
yann@1
     9
instead of hoping that host and build aren't aliases for each other
yann@1
    10
and that running a host program on the build machine doesn't 
yann@1
    11
put up a dialog box or accidentally work.
yann@1
    12
yann@1
    13
(cf. http://sources.redhat.com/ml/crossgcc/2002-08/msg00099.html, in which 
yann@1
    14
the run of conftest caused a dialog box to pop up and block the build on cygwin)
yann@1
    15
yann@1
    16
--- glibc-2.1.3/configure.old	2004-05-26 19:30:45.000000000 -0700
yann@1
    17
+++ glibc-2.1.3/configure	2004-05-26 19:42:29.000000000 -0700
yann@1
    18
@@ -1224,7 +1224,7 @@
yann@1
    19
 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
yann@1
    20
 echo "$ac_t""$build" 1>&6
yann@1
    21
 
yann@1
    22
-if test $host != $build; then
yann@1
    23
+if test x$host_alias != x$build_alias; then
yann@1
    24
   ac_tool_prefix=${host_alias}-
yann@1
    25
 else
yann@1
    26
   ac_tool_prefix=
yann@1
    27
@@ -1487,7 +1487,7 @@
yann@1
    28
 if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
yann@1
    29
   ac_cv_prog_cc_works=yes
yann@1
    30
   # If we can't run a trivial program, we are probably using a cross compiler.
yann@1
    31
-  if (./conftest; exit) 2>/dev/null; then
yann@1
    32
+  if test x$host_alias == x$build_alias && (./conftest; exit) 2>/dev/null; then
yann@1
    33
     ac_cv_prog_cc_cross=no
yann@1
    34
   else
yann@1
    35
     ac_cv_prog_cc_cross=yes
yann@1
    36
@@ -1566,7 +1566,7 @@
yann@1
    37
 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
yann@1
    38
 echo "$ac_t""$build" 1>&6
yann@1
    39
 
yann@1
    40
-if test $host != $build; then
yann@1
    41
+if test x$host_alias != x$build_alias; then
yann@1
    42
   for ac_prog in gcc cc
yann@1
    43
 do
yann@1
    44
 # Extract the first word of "$ac_prog", so it can be a program name with args.