patches/cygwin/1.5.15-1/100-crossbuild.patch
author "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
Thu Jul 28 22:09:31 2011 +0200 (2011-07-28)
changeset 2573 424fa2092ace
parent 402 197e1b49586e
permissions -rw-r--r--
scripts/libc: do not build add-ons by default

Currently, no --enable-add-ons option is passed to libc configure when
"$(do_libc_add_ons_list ,)" is empty, which makes configure automatically search
for present add-ons. In that case, all present add-ons are built, although
no add-on was selected by the user in the config. Moreover, this can make the
configure fail if some non-standard add-ons like eglibc-localedef are present.

This behavior also leads to an inconsistency from a user point of view between
the following cases:
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS="none" in the config,
which makes "$(do_libc_add_ons_list ,)" return "", so all present add-ons
are built.
- LIBC_ADDONS_LIST="", LIBC_GLIBC_USE_PORTS=n and THREADS!="none" in the
config, which makes "$(do_libc_add_ons_list ,)" return the add-on supporting
the chosen threading implementation, e.g. "nptl", so only this add-on is
built.

This patch disables the building of all add-ons in that case.

It is still possible to build all present add-ons by adding --enable-add-ons to
LIBC_GLIBC_EXTRA_CONFIG_ARRAY.

Signed-off-by: "Benoît THÉBAUDEAU" <benoit.thebaudeau@advansee.com>
yann@402
     1
Message-ID: <4269173F.7020705@zee2.com>
yann@402
     2
Date: Fri, 22 Apr 2005 16:24:47 +0100
yann@402
     3
From: Steve Papacharalambous <stevep@zee2.com>
yann@402
     4
To: "Robert P. J. Day" <rpjday@mindspring.com>
yann@402
     5
CC: crossgcc list <crossgcc@sources.redhat.com>
yann@402
     6
Subject: Re: cygwin source directory has moved
yann@402
     7
In-Reply-To: <Pine.LNX.4.61.0504181746050.11794@localhost.localdomain>
yann@402
     8
yann@402
     9
Hi Robert,
yann@402
    10
yann@402
    11
I've attached two patches:
yann@402
    12
yann@402
    13
1/  For crosstool-0.31 which changes the CYGWIN_URL to one which has the
yann@402
    14
cygwin source archives.  The version of cygwin that is used to build the
yann@402
    15
cross toolchain has been changed to cygwin-1.5.15-1-src.tar.bz2 since
yann@402
    16
most of the mirror sites don't seem to have the original archive used.
yann@402
    17
[created gcc-3.3.2-cygwin-1.5.15-1.dat - dank]
yann@402
    18
yann@402
    19
yann@402
    20
2/ The later cygwin source archive fails to cross build with the error:
yann@402
    21
/opt/crosstool/i686-pc-cygwin/gcc-3.3.2-cygwin-1.5.15-1/lib/gcc-lib/i686-pc-cygwin/bin/ld:
yann@402
    22
cannot find -luser32
yann@402
    23
yann@402
    24
unless the second patch is applied,
yann@402
    25
yann@402
    26
yann@402
    27
diff -uNr cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in cygwin-1.5.15-1/winsup/mingw/Makefile.in
yann@402
    28
--- cygwin-1.5.15-1.orig/winsup/mingw/Makefile.in	2005-02-28 22:51:02.000000000 +0000
yann@402
    29
+++ cygwin-1.5.15-1/winsup/mingw/Makefile.in	2005-04-22 15:29:18.000000000 +0100
yann@402
    30
@@ -71,7 +71,7 @@
yann@402
    31
 mkinstalldirs = $(SHELL) @MKINSTALLDIRS@
yann@402
    32
 
yann@402
    33
 CC := @CC@
yann@402
    34
-override CC := ${filter-out -L% -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
yann@402
    35
+override CC := ${filter-out -B%,${shell echo $(CC) | sed -e 's%\(-isystem\|-iwithprefixbefore\)  *[^ ]*\( \|$$\)% %g'}}
yann@402
    36
 # FIXME: Which is it, CC or CC_FOR_TARGET?
yann@402
    37
 CC_FOR_TARGET = $(CC)
yann@402
    38
 AS_FOR_TARGET = $(AS)
yann@402
    39
yann@402
    40