patches/gcc/3.3.1/sh-spec.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
See http://gcc.gnu.org/PR11902
yann@1
     2
yann@1
     3
Part of fix for abort on line
yann@1
     4
  assert (info[DT_RPATH] == NULL);
yann@1
     5
in glibc-2.3.2's ld.so, which makes all dynamically-linked
yann@1
     6
programs crash.
yann@1
     7
yann@1
     8
Message-Id: <200308020452.h724q0n01509@r-rr.iij4u.or.jp>
yann@1
     9
To: dank@kegel.com
yann@1
    10
Cc: kkojima@rr.iij4u.or.jp
yann@1
    11
Subject: Re: Writing PIC version of __udivsi3_i4?
yann@1
    12
In-Reply-To: Your message of "Fri, 01 Aug 2003 21:15:27 -0700"
yann@1
    13
	<3F2B3ADF.6030206@kegel.com>
yann@1
    14
References: <3F2B3ADF.6030206@kegel.com>
yann@1
    15
Date: Sat, 02 Aug 2003 13:58:05 +0900
yann@1
    16
From: kaz Kojima <kkojima@rr.iij4u.or.jp>
yann@1
    17
yann@1
    18
Dan Kegel <dank@kegel.com> wrote:
yann@1
    19
> It seems it might be from gcc's spec file:
yann@1
    20
> 
yann@1
    21
> *subtarget_link_spec:
yann@1
    22
> %{shared:-shared}    %{!static:      %{rdynamic:-export-dynamic}      %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}      %{!rpath:-rpath /lib}}    %{static:-static}
yann@1
    23
> 
yann@1
    24
> as the only place -rpath showed up was in the output of gcc -v as it
yann@1
    25
> was linking libc.so.
yann@1
    26
> 
yann@1
    27
> Well, that's a clue, anyway!  Guess I'll dig through the spec files
yann@1
    28
> tomorrow to see if I can figure it out some more.
yann@1
    29
yann@1
    30
I've grepped gcc/config/*/*.h and found only SH and old libc1 stuffs
yann@1
    31
of i386/alpha include %{!rpath:-rpath ... in 3.3 release and the
yann@1
    32
current CVS. And my sh-gcc's specs doesn't have this :-(
yann@1
    33
It would be the Right Thing to remove this stuff simply. How about
yann@1
    34
the gcc patch below?
yann@1
    35
yann@1
    36
Regards,
yann@1
    37
	kaz
yann@1
    38
--
yann@1
    39
--- gcc-3.3/gcc/config/sh/linux.h.orig	Sat Aug  2 13:20:57 2003
yann@1
    40
+++ gcc-3.3/gcc/config/sh/linux.h	Sat Aug  2 13:22:42 2003
yann@1
    41
@@ -48,8 +48,7 @@ do { \
yann@1
    42
   "%{shared:-shared} \
yann@1
    43
    %{!static: \
yann@1
    44
      %{rdynamic:-export-dynamic} \
yann@1
    45
-     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \
yann@1
    46
-     %{!rpath:-rpath /lib}} \
yann@1
    47
+     %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \
yann@1
    48
    %{static:-static}"
yann@1
    49
 
yann@1
    50
 /* The GNU C++ standard library requires that these macros be defined.  */
yann@1
    51
yann@1
    52