gettext/gettext.patch

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

     1 Index: gettext-runtime/intl/plural-exp.c
     2 --- gettext-runtime/intl/plural-exp.c.orig	2009-06-28 21:44:04.000000000 +0200
     3 +++ gettext-runtime/intl/plural-exp.c	2010-05-10 08:51:14.000000000 +0200
     4 @@ -27,7 +27,7 @@
     6  #include "plural-exp.h"
     8 -#if (defined __GNUC__ && !(__APPLE_CC__ > 1) && !defined __cplusplus) \
     9 +#if (defined __GNUC__ && !(__APPLE_CC__+0 > 1) && !defined __cplusplus) \
    10      || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
    12  /* These structs are the constant expression for the germanic plural
    13 Index: gettext-tools/gnulib-lib/execute.c
    14 --- gettext-tools/gnulib-lib/execute.c.orig	2010-02-16 22:32:17.000000000 +0100
    15 +++ gettext-tools/gnulib-lib/execute.c	2010-05-10 20:22:18.000000000 +0200
    16 @@ -200,6 +200,9 @@
    17       subprocess to exit with return code 127.  It is implementation
    18       dependent which error is reported which way.  We treat both cases as
    19       equivalent.  */
    20 +#ifndef HAVE_ENVIRON_DECL
    21 +  extern char **environ;
    22 +#endif
    23    sigset_t blocked_signals;
    24    posix_spawn_file_actions_t actions;
    25    bool actions_allocated;

mercurial