openpkg/make.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
parent 13
cb59d6afeb61
child 428
f880f219c566
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: glob/glob.c
     2 diff -Nau glob/glob.c.orig glob/glob.c
     3 --- glob/glob.c.orig	2006-03-10 03:20:45 +0100
     4 +++ glob/glob.c	2006-04-01 19:09:18 +0200
     5 @@ -217,13 +217,13 @@
     6  #  ifdef HAVE_ALLOCA_H
     7  #   include <alloca.h>
     8  #  else	/* Not HAVE_ALLOCA_H.  */
     9 -#   ifndef _AIX
    10 +#   if !defined (_AIX) && !defined (__FreeBSD__)
    11  #    ifdef WINDOWS32
    12  #     include <malloc.h>
    13  #    else
    14  extern char *alloca ();
    15  #    endif /* WINDOWS32 */
    16 -#   endif /* Not _AIX.  */
    17 +#   endif /* Not _AIX && not __FreeBSD__.  */
    18  #  endif /* sparc or HAVE_ALLOCA_H.  */
    19  # endif	/* GCC.  */
    21 Index: make.h
    22 diff -Nau make.h.orig make.h
    23 --- make.h.orig	2006-02-16 00:54:43 +0100
    24 +++ make.h	2006-04-01 19:09:18 +0200
    25 @@ -36,7 +36,7 @@
    26   #pragma alloca
    27  # else
    28  #  if !defined(__GNUC__) && !defined(WINDOWS32)
    29 -#   ifndef alloca /* predefined by HP cc +Olibcalls */
    30 +#   if !defined (alloca) && !defined (__FreeBSD__) /* predefined by HP cc +Olibcalls, part of stdlib.h on FreeBSD */
    31  char *alloca ();
    32  #   endif
    33  #  endif

mercurial