gcc/gcc.patch

Sun, 03 Apr 2011 13:34:55 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sun, 03 Apr 2011 13:34:55 +0200
changeset 337
f71e028eb3e2
parent 320
d8a8300afdc8
child 406
cd6aad0e0d4e
permissions
-rw-r--r--

Correct and improve several packaging aspects including...
Correct datadir path for python modules, correct jar(1) path for
building libgcj classes, strip libexecdir path of version numbers,
improve name of oblbld build path, clean whitespace from as(1) and
ld(1) GNU detection, remove seemingly discarded '--with-local-prefix'
configure argument, and correct hardcoded lto plugin libtool archive
dependency information.

Most importantly, correct IA32 architecture detection logic in
config.gcc to correctly emit SSE2 instructions conditionally, leading
to the removal of all '-march' bootstrap options and replacement with
unconditional (for IA32/AMD64) '-mtune=native' options. Comments and
buildtime warnings are corrected appropriately. In theory these changes
cause a more portable, orthoganal, and optimal bootstrap to be built.

     1 Index: config.guess
     2 diff -Nau config.guess.orig config.guess
     3 --- config.guess.orig	2011-03-21 16:02:29.000000000 +0100
     4 +++ config.guess	2011-03-27 18:06:45.404612233 +0200
     5 @@ -194,7 +194,7 @@
     6  		release='-gnu'
     7  		;;
     8  	    *)
     9 -		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    10 +		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
    11  		;;
    12  	esac
    13  	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    14 Index: gcc/config/alpha/osf5.h
    15 diff -Nau gcc/config/alpha/osf5.h.orig gcc/config/alpha/osf5.h
    16 --- gcc/config/alpha/osf5.h.orig	2010-11-21 01:54:14.000000000 +0100
    17 +++ gcc/config/alpha/osf5.h	2011-03-27 18:06:45.432326155 +0200
    18 @@ -94,7 +94,7 @@
    19     constructor and call-frame data structures are not accidentally
    20     overridden.  */
    21  #define LINK_SPEC  \
    22 -  "-G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
    23 +  "-oldstyle_liblookup %{!o:-o a.out} -G 8 %{O*:-O3} %{!O*:-O1} -S %{static:-non_shared} \
    24     %{!static:%{shared:-shared -hidden_symbol _GLOBAL_*} \
    25     %{!shared:-call_shared}} %{pg} %{taso} %{rpath*}"
    27 Index: gcc/config/i386/sol2-10.h
    28 diff -Nau gcc/config/i386/sol2-10.h.orig gcc/config/i386/sol2-10.h
    29 --- gcc/config/i386/sol2-10.h.orig	2011-01-26 21:23:17.000000000 +0100
    30 +++ gcc/config/i386/sol2-10.h	2011-03-27 18:06:45.455032224 +0200
    31 @@ -105,7 +105,7 @@
    32               -R /usr/ucblib/64} \
    33     %{!compat-bsd: \
    34       %{!YP,*:%{p|pg:-Y P,/usr/lib/libp/64:/lib/64:/usr/lib/64} \
    35 -             %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}}}"
    36 +             %{!p:%{!pg:-Y P,/lib/64:/usr/lib/64}}} -rpath-link /lib/64:/usr/lib/64}"
    38  #undef LINK_ARCH64_SPEC
    39  #define LINK_ARCH64_SPEC LINK_ARCH64_SPEC_BASE
    40 @@ -122,7 +122,7 @@
    41  #endif
    43  #define TARGET_LD_EMULATION "%{m64:-m " X86_64_EMULATION "}" \
    44 -			    "%{!m64:-m " I386_EMULATION "} "
    45 +			    "%{!m64:} "
    46  #else
    47  #define TARGET_LD_EMULATION ""
    48  #endif
    49 Index: gcc/config/i386/sol2.h
    50 diff -Nau gcc/config/i386/sol2.h.orig gcc/config/i386/sol2.h
    51 --- gcc/config/i386/sol2.h.orig	2011-02-02 17:58:49.000000000 +0100
    52 +++ gcc/config/i386/sol2.h	2011-03-27 18:06:45.458713885 +0200
    53 @@ -73,6 +73,9 @@
    54  #undef ASM_QUAD
    55  #endif
    57 +#undef DEFAULT_PCC_STRUCT_RETURN
    58 +#define DEFAULT_PCC_STRUCT_RETURN 1
    59 +
    60  /* The Solaris assembler wants a .local for non-exported aliases.  */
    61  #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)	\
    62    do {							\
    63 Index: gcc/config/sol2.h
    64 diff -Nau gcc/config/sol2.h.orig gcc/config/sol2.h
    65 --- gcc/config/sol2.h.orig	2011-01-26 21:23:17.000000000 +0100
    66 +++ gcc/config/sol2.h	2011-03-27 18:06:45.477952967 +0200
    67 @@ -183,8 +183,8 @@
    68    "%{h*} %{v:-V} \
    69     %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
    70     %{static:-dn -Bstatic} \
    71 -   %{shared:-G -dy %{!mimpure-text:-z text}} \
    72 -   %{symbolic:-Bsymbolic -G -dy -z text} \
    73 +   %{shared:-G -dy} \
    74 +   %{symbolic:-Bsymbolic -G -dy} \
    75     %(link_arch) \
    76     %{Qy:} %{!Qn:-Qy}"
    78 Index: gcc/system.h
    79 diff -Nau gcc/system.h.orig gcc/system.h
    80 --- gcc/system.h.orig	2011-01-09 13:41:33.000000000 +0100
    81 +++ gcc/system.h	2011-03-27 18:06:45.498233251 +0200
    82 @@ -430,10 +430,6 @@
    83  extern char *strstr (const char *, const char *);
    84  #endif
    86 -#ifdef HAVE_MALLOC_H
    87 -#include <malloc.h>
    88 -#endif
    89 -
    90  #if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
    91  extern void *malloc (size_t);
    92  #endif
    93 Index: libcpp/charset.c
    94 diff -Nau libcpp/charset.c.orig libcpp/charset.c
    95 --- libcpp/charset.c.orig	2011-01-03 21:52:22.000000000 +0100
    96 +++ libcpp/charset.c	2011-03-27 18:06:45.522800310 +0200
    97 @@ -75,6 +75,7 @@
    98  #define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1)
    99  #define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1)
   100  #define iconv_close(x)   (void)0
   101 +#undef ICONV_CONST
   102  #define ICONV_CONST
   103  #endif
   105 Index: libcpp/internal.h
   106 diff -Nau libcpp/internal.h.orig libcpp/internal.h
   107 --- libcpp/internal.h.orig	2010-09-29 20:18:38.000000000 +0200
   108 +++ libcpp/internal.h	2011-03-27 18:06:45.537431542 +0200
   109 @@ -29,6 +29,7 @@
   110  #if HAVE_ICONV
   111  #include <iconv.h>
   112  #else
   113 +#undef  HAVE_ICONV
   114  #define HAVE_ICONV 0
   115  typedef int iconv_t;  /* dummy */
   116  #endif

mercurial