patches/glibc/2.3.6/260-csu-Makefile.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:47:16 2010 +0200 (2010-07-29)
changeset 2045 fdaa6c7f6dea
parent 495 276501e872e5
permissions -rw-r--r--
cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer

Idea and know-how taken from CodeSourcery build script.

Normal build:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb77f3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
/lib/ld-linux.so.2 (0xb77f4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb7843000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
yann@495
     1
Use printf instead of echo for some shells.
yann@495
     2
yann@495
     3
http://www.cygwin.com/ml/libc-alpha/2005-02/msg00123.html
yann@495
     4
yann@495
     5
This patch does not generate invalid csu/version-info.h which has
yann@495
     6
unterminating " line because some /bin/sh cannot parse correctly.  The
yann@495
     7
previous discussion was:
yann@495
     8
yann@495
     9
	http://sources.redhat.com/ml/libc-alpha/2004-08/msg00129.html
yann@495
    10
	http://sources.redhat.com/ml/libc-alpha/2004-08/msg00145.html
yann@495
    11
yann@495
    12
This patch gets rid of all this issue because the conclusion of the
yann@495
    13
discussion was to use printf instead of echo.  Roland, could you look
yann@495
    14
at it again?
yann@495
    15
yann@495
    16
Regards,
yann@495
    17
-- gotom
yann@495
    18
yann@495
    19
2005-02-26  GOTO Masanori  <gotom@debian.or.jp>
yann@495
    20
yann@495
    21
	* csu/Makefile: Use printf instead of echo for some shells.
yann@495
    22
yann@495
    23
Index: csu/Makefile
yann@495
    24
===================================================================
yann@495
    25
RCS file: /cvs/glibc/libc/csu/Makefile,v
yann@495
    26
retrieving revision 1.75
yann@495
    27
diff -u -p -r1.75 Makefile
yann@495
    28
--- glibc/csu/Makefile	3 Jan 2005 17:57:14 -0000	1.75
yann@495
    29
+++ glibc.new/csu/Makefile	27 Feb 2005 01:17:49 -0000
yann@495
    30
@@ -241,7 +241,7 @@ $(objpfx)version-info.h: $(common-objpfx
yann@495
    31
 	 esac; \
yann@495
    32
 	 files="$(all-Banner-files)";				\
yann@495
    33
 	 if test -n "$$files"; then				\
yann@495
    34
-	   echo "\"Available extensions:\\n\"";			\
yann@495
    35
+	   printf '"Available extensions:\\n"\n';		\
yann@495
    36
 	   sed -e '/^#/d' -e 's/^[[:space:]]*/	/'		\
yann@495
    37
 	       -e 's/^\(.*\)$$/\"\1\\n\"/' $$files;		\
yann@495
    38
 	 fi) > $@T
yann@495
    39