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>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
     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.