patches/gcc/4.3.1/340-make-mno-spe-work-as-expected.patch
author "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
Wed Dec 14 16:55:22 2011 +0100 (2011-12-14)
branch1.13
changeset 2848 1ff89596dab0
permissions -rw-r--r--
libc/eglibc: fix localedef 2.14 build

The localedef of eglibc 2.14 requires NOT_IN_libc to be defined in order to
compile intl/l10nflist.c.

This is because localedef is built separately from eglibc and uses some parts of
eglibc that don't compile in standalone without this preprocessor definition.

This fixes the following error:

[ALL ] gcc -g -O2 -DNO_SYSCONF -DNO_UNCOMPRESS
-DLOCALE_PATH='"/usr/lib/locale:/usr/share/i18n"'
-DLOCALEDIR='"/usr/lib/locale"' -DLOCALE_ALIAS_PATH='"/usr/share/locale"'
-DCHARMAP_PATH='"/usr/share/i18n/charmaps"'
-DREPERTOIREMAP_PATH='"/usr/share/i18n/repertoiremaps"'
-DLOCSRCDIR='"/usr/share/i18n/locales"' -Iglibc/locale/programs -Iglibc/locale
-I/<snip>/.build/src/eglibc-localedef-2_14/include
-I/<snip>/.build/src/eglibc-localedef-2_14 -I.
-include /<snip>/.build/src/eglibc-localedef-2_14/include/always.h -Wall
-Wno-format -c -o locarchive.o glibc/locale/programs/locarchive.c
[ALL ] glibc/locale/programs/locarchive.c: In function 'enlarge_archive':
[ALL ] glibc/locale/programs/locarchive.c:303:21: warning: variable
'oldlocrectab' set but not used [-Wunused-but-set-variable]
[ALL ] In file included from glibc/locale/programs/locarchive.c:651:0:
[ALL ] glibc/locale/programs/../../intl/l10nflist.c: In function
'_nl_normalize_codeset':
[ERROR] glibc/locale/programs/../../intl/l10nflist.c:342:9: error:
'_nl_C_locobj_ptr' undeclared (first use in this function)
[ALL ] glibc/locale/programs/../../intl/l10nflist.c:342:9: note: each
undeclared identifier is reported only once for each function it appears in
[ALL ] glibc/locale/programs/locarchive.c: In function
'add_locales_to_archive':
[ALL ] glibc/locale/programs/locarchive.c:1450:7: warning: passing argument
1 of '__xpg_basename' discards 'const' qualifier from pointer target type
[enabled by default]
[ALL ] /usr/include/libgen.h:35:14: note: expected 'char *' but argument is
of type 'const char *'
[ERROR] make[1]: *** [locarchive.o] Error 1

Signed-off-by: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
(transplanted from 4cd9134739b594451794cf61a6e1b137422cdafd)
yann@792
     1
2008-04-03  Nathan Froyd  <froydnj@codesourcery.com>
yann@792
     2
	    Nathan Sidwell  <nathan@codesourcery.com>
yann@792
     3
yann@792
     4
        * config/rs6000/rs6000.opt (mspe): Remove Var property.
yann@792
     5
	(misel): Likewise.
yann@792
     6
        * config/rs6000/rs6000.h (rs6000_spe): Declare.
yann@792
     7
	(rs6000_isel): Likewise.
yann@792
     8
        * config/rs6000/rs6000.c (rs6000_spe): New variable.
yann@792
     9
	(rs6000_isel): New variable.
yann@792
    10
        (rs6000_handle_option): Handle OPT_mspe and OPT_misel.
yann@792
    11
yann@792
    12
Index: gcc/config/rs6000/rs6000.c
yann@792
    13
===================================================================
yann@792
    14
--- a/gcc/config/rs6000/rs6000.c	(revision 134642)
yann@792
    15
+++ b/gcc/config/rs6000/rs6000.c	(working copy)
yann@792
    16
@@ -174,9 +174,15 @@ int rs6000_ieeequad;
yann@792
    17
 /* Nonzero to use AltiVec ABI.  */
yann@792
    18
 int rs6000_altivec_abi;
yann@792
    19
 
yann@792
    20
+/* Nonzero if we want SPE SIMD instructions.  */
yann@792
    21
+int rs6000_spe;
yann@792
    22
+
yann@792
    23
 /* Nonzero if we want SPE ABI extensions.  */
yann@792
    24
 int rs6000_spe_abi;
yann@792
    25
 
yann@792
    26
+/* Nonzero to use isel instructions.  */
yann@792
    27
+int rs6000_isel;
yann@792
    28
+
yann@792
    29
 /* Nonzero if floating point operations are done in the GPRs.  */
yann@792
    30
 int rs6000_float_gprs = 0;
yann@792
    31
 
yann@792
    32
@@ -2177,11 +2183,21 @@ rs6000_handle_option (size_t code, const
yann@792
    33
       rs6000_parse_yes_no_option ("vrsave", arg, &(TARGET_ALTIVEC_VRSAVE));
yann@792
    34
       break;
yann@792
    35
 
yann@792
    36
+    case OPT_misel:
yann@792
    37
+      rs6000_explicit_options.isel = true;
yann@792
    38
+      rs6000_isel = value;
yann@792
    39
+      break;
yann@792
    40
+
yann@792
    41
     case OPT_misel_:
yann@792
    42
       rs6000_explicit_options.isel = true;
yann@792
    43
       rs6000_parse_yes_no_option ("isel", arg, &(rs6000_isel));
yann@792
    44
       break;
yann@792
    45
 
yann@792
    46
+    case OPT_mspe:
yann@792
    47
+      rs6000_explicit_options.spe = true;
yann@792
    48
+      rs6000_spe = value;
yann@792
    49
+      break;
yann@792
    50
+
yann@792
    51
     case OPT_mspe_:
yann@792
    52
       rs6000_explicit_options.spe = true;
yann@792
    53
       rs6000_parse_yes_no_option ("spe", arg, &(rs6000_spe));
yann@792
    54
Index: gcc/config/rs6000/rs6000.opt
yann@792
    55
===================================================================
yann@792
    56
--- a/gcc/config/rs6000/rs6000.opt	(revision 134642)
yann@792
    57
+++ b/gcc/config/rs6000/rs6000.opt	(working copy)
yann@792
    58
@@ -190,7 +190,7 @@ Target RejectNegative Joined
yann@792
    59
 -mvrsave=yes/no	Deprecated option.  Use -mvrsave/-mno-vrsave instead
yann@792
    60
 
yann@792
    61
 misel
yann@792
    62
-Target Var(rs6000_isel)
yann@792
    63
+Target
yann@792
    64
 Generate isel instructions
yann@792
    65
 
yann@792
    66
 misel=
yann@792
    67
@@ -198,7 +198,7 @@ Target RejectNegative Joined
yann@792
    68
 -misel=yes/no	Deprecated option.  Use -misel/-mno-isel instead
yann@792
    69
 
yann@792
    70
 mspe
yann@792
    71
-Target Var(rs6000_spe)
yann@792
    72
+Target
yann@792
    73
 Generate SPE SIMD instructions on E500
yann@792
    74
 
yann@792
    75
 mpaired
yann@792
    76
Index: gcc/config/rs6000/rs6000.h
yann@792
    77
===================================================================
yann@792
    78
--- a/gcc/config/rs6000/rs6000.h	(revision 134642)
yann@792
    79
+++ b/gcc/config/rs6000/rs6000.h	(working copy)
yann@792
    80
@@ -367,6 +367,8 @@ extern int rs6000_long_double_type_size;
yann@792
    81
 extern int rs6000_ieeequad;
yann@792
    82
 extern int rs6000_altivec_abi;
yann@792
    83
 extern int rs6000_spe_abi;
yann@792
    84
+extern int rs6000_spe;
yann@792
    85
+extern int rs6000_isel;
yann@792
    86
 extern int rs6000_float_gprs;
yann@792
    87
 extern int rs6000_alignment_flags;
yann@792
    88
 extern const char *rs6000_sched_insert_nops_str;
yann@792
    89
yann@792
    90