patches/uClibc/0.9.28/001-install_dev.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Apr 26 21:31:05 2008 +0000 (2008-04-26)
changeset 454 372b2f397baa
permissions -rw-r--r--
Configure tsocks with a simple heuristic.

Consider the proxy has to be in a 'local' network. It means it is directly
reachable by the local machine, even if the local machine has to hop through
one or more gates to reach the proxy (often the case in enterprise networks
where class A 10.0.0.0/8 is in fact sub-divided into smaller networks, each
one of them in a different location, eg. 10.1.0.0/16 in a place, while
10.2.0.0/16 would be on the other side of the world). Not being in the same
subnet does not mean the proxy is not available.

So we will build a mask with at most high bits set, which defines a network
that has both the local machine and the proxy. Because a machine may have
more than one interface, build a mask for each of them, removing 127.0.0.1
which is added automagically by tsocks, and removing duplicate masks.

If all of this does not work, then it means the local machine can NOT in fact
reach the proxy, which in turn means the user mis-configured something (most
probably a typo...).

/trunk/scripts/crosstool.sh | 61 52 9 0 +++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 9 deletions(-)
yann@1
     1
There are at least three weird glitches in the Makefile:
yann@1
     2
 - the test operator is a dual-equal sign (==) when it should be a single one (=);
yann@1
     3
 - the exclude options are not accepted as is by GNU tar;
yann@1
     4
 - how on earth could KERNEL_SOURCE possibly be equal to DEVEL_PREFIX ???
yann@1
     5
yann@1
     6
We (Cedric DUVAL and I, Yann E. MORIN) are not quite sure why it is that way.
yann@1
     7
We're not quite sure either on how to solve this.
yann@1
     8
yann@1
     9
What we need is to built a toolchain; in no way we need to install the linux headers.
yann@1
    10
  ==> systematically exclude them from the [s]tar command.
yann@1
    11
yann@1
    12
This patch is inspired by the svn repository of uClibc as of 20060209.
yann@1
    13
diff -dur /home/ymorin/dev/uClibc-0.9.28/Makefile uClibc-0.9.28/Makefile
yann@1
    14
--- /home/ymorin/dev/uClibc-0.9.28/Makefile	2005-08-18 00:49:49.000000000 +0200
yann@1
    15
+++ uClibc-0.9.28/Makefile	2006-02-09 17:06:58.000000000 +0100
yann@1
    16
@@ -158,12 +158,17 @@
yann@1
    17
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)lib
yann@1
    18
 	$(INSTALL) -d $(PREFIX)$(DEVEL_PREFIX)include
yann@1
    19
 	-$(INSTALL) -m 644 lib/*.[ao] $(PREFIX)$(DEVEL_PREFIX)lib/
yann@1
    20
-	if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
yann@1
    21
-		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
yann@1
    22
-	else \
yann@1
    23
-		extra_exclude="" ; \
yann@1
    24
-	fi ; \
yann@1
    25
-	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
yann@1
    26
+#	if [ "$(KERNEL_SOURCE)" == "$(DEVEL_PREFIX)" ] ; then \
yann@1
    27
+#		extra_exclude="--exclude include/linux --exclude include/asm'*'" ; \
yann@1
    28
+#	else \
yann@1
    29
+#		extra_exclude="" ; \
yann@1
    30
+#	fi ; \
yann@1
    31
+#	tar -chf - include --exclude .svn --exclude CVS $$extra_exclude \
yann@1
    32
+#		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
yann@1
    33
+	printf ".svn\n.cvsignore\nCVS\n" > tar_exclude ; \
yann@1
    34
+	ls -1d include/linux include/asm* >> tar_exclude ; \
yann@1
    35
+	tar -chf - -X tar_exclude include \
yann@1
    36
 		| tar -xf - -C $(PREFIX)$(DEVEL_PREFIX)
yann@1
    37
+	rm -f tar_exclude
yann@1
    38
 ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
yann@1
    39
 	# Remove floating point related headers since float support is disabled.