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.
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.