patches/gcc/3.3.1/pr11949-fix.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
Message-Id: 20030822160024.GA305@ftbfs.org
yann@1
     2
From: Matt Kraai kraai at alumni dot cmu dot edu
yann@1
     3
To: gcc-patches at gcc dot gnu dot org
yann@1
     4
Date: Fri, 22 Aug 2003 09:00:24 -0700
yann@1
     5
Subject: PR 11949
yann@1
     6
yann@1
     7
Howdy,
yann@1
     8
yann@1
     9
I've backported the following patch from the mainline to the 3.3
yann@1
    10
branch to fix PR 11949.
yann@1
    11
yann@1
    12
Bootstrapped and regression tested on powerpc-unknown-linux-gnu.
yann@1
    13
yann@1
    14
OK to commit?
yann@1
    15
yann@1
    16
	PR c/11949
yann@1
    17
	Backport from mainline:
yann@1
    18
yann@1
    19
	2003-05-05  Aldy Hernandez  aldyh@redhat.com
yann@1
    20
yann@1
    21
	* testsuite/gcc.c-torture/compile/simd-6.c: New.
yann@1
    22
yann@1
    23
	* c-typeck.c (digest_init): Handle arrays of vector constants.
yann@1
    24
yann@1
    25
Index: gcc/c-typeck.c
yann@1
    26
===================================================================
yann@1
    27
RCS file: /cvs/gcc/gcc/gcc/c-typeck.c,v
yann@1
    28
retrieving revision 1.213.2.8
yann@1
    29
diff -3 -c -p -r1.213.2.8 c-typeck.c
yann@1
    30
*** gcc/gcc/c-typeck.c	19 Aug 2003 01:42:35 -0000	1.213.2.8
yann@1
    31
--- gcc/gcc/c-typeck.c	22 Aug 2003 09:24:03 -0000
yann@1
    32
*************** digest_init (type, init, require_constan
yann@1
    33
*** 4765,4772 ****
yann@1
    34
    if (code == VECTOR_TYPE
yann@1
    35
        && comptypes (TREE_TYPE (inside_init), type)
yann@1
    36
        && TREE_CONSTANT (inside_init))
yann@1
    37
!     return build_vector (type, TREE_OPERAND (inside_init, 1));
yann@1
    38
! 
yann@1
    39
  
yann@1
    40
    /* Any type can be initialized
yann@1
    41
       from an expression of the same type, optionally with braces.  */
yann@1
    42
--- 4765,4778 ----
yann@1
    43
    if (code == VECTOR_TYPE
yann@1
    44
        && comptypes (TREE_TYPE (inside_init), type)
yann@1
    45
        && TREE_CONSTANT (inside_init))
yann@1
    46
!     {
yann@1
    47
!       if (TREE_CODE (inside_init) == VECTOR_CST
yann@1
    48
! 	  && comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (inside_init)),
yann@1
    49
! 			TYPE_MAIN_VARIANT (type)))
yann@1
    50
! 	return inside_init;
yann@1
    51
!       else
yann@1
    52
! 	return build_vector (type, CONSTRUCTOR_ELTS (inside_init));
yann@1
    53
!     }
yann@1
    54
  
yann@1
    55
    /* Any type can be initialized
yann@1
    56
       from an expression of the same type, optionally with braces.  */
yann@1
    57
yann@1
    58
typedef int __attribute__((mode(V2SI))) vec;
yann@1
    59
yann@1
    60
vec a[] = {(vec) {1, 2}, {3, 4}};
yann@1
    61