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 Jul 28 21:34:41 2007 +0000 (2007-07-28)
changeset 301 2be7232a73ac
permissions -rw-r--r--
Bump version to 0.2.2.
     1 Lets you work around the canadian cross build error
     2 
     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
     4 make[1]: *** [install-symbolic-link] Segmentation fault
     5 make[1]: Leaving directory `.../gcc-3.4.0-glibc-2.1.3/glibc-2.1.3'
     6 make: *** [install] Error 2
     7 
     8 by setting --host != --build when running glibc-2.1.3/configure
     9 instead of hoping that host and build aren't aliases for each other
    10 and that running a host program on the build machine doesn't 
    11 put up a dialog box or accidentally work.
    12 
    13 (cf. http://sources.redhat.com/ml/crossgcc/2002-08/msg00099.html, in which 
    14 the run of conftest caused a dialog box to pop up and block the build on cygwin)
    15 
    16 --- glibc-2.1.3/configure.old	2004-05-26 19:30:45.000000000 -0700
    17 +++ glibc-2.1.3/configure	2004-05-26 19:42:29.000000000 -0700
    18 @@ -1224,7 +1224,7 @@
    19  build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    20  echo "$ac_t""$build" 1>&6
    21  
    22 -if test $host != $build; then
    23 +if test x$host_alias != x$build_alias; then
    24    ac_tool_prefix=${host_alias}-
    25  else
    26    ac_tool_prefix=
    27 @@ -1487,7 +1487,7 @@
    28  if { (eval echo configure:1488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    29    ac_cv_prog_cc_works=yes
    30    # If we can't run a trivial program, we are probably using a cross compiler.
    31 -  if (./conftest; exit) 2>/dev/null; then
    32 +  if test x$host_alias == x$build_alias && (./conftest; exit) 2>/dev/null; then
    33      ac_cv_prog_cc_cross=no
    34    else
    35      ac_cv_prog_cc_cross=yes
    36 @@ -1566,7 +1566,7 @@
    37  build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
    38  echo "$ac_t""$build" 1>&6
    39  
    40 -if test $host != $build; then
    41 +if test x$host_alias != x$build_alias; then
    42    for ac_prog in gcc cc
    43  do
    44  # Extract the first word of "$ac_prog", so it can be a program name with args.