gcc: move patches to versioned dir, add support for gcc-4.7, add options to choice gcc version, set per default to 4.8 except for RPi, disable GOLD for RPi, update to gcc-4.8-20130509

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-05-13 10:59:57 +02:00
parent cf7bd59c45
commit 1ef22aa109
19 changed files with 316 additions and 4 deletions

View File

@ -19,12 +19,20 @@
################################################################################
PKG_NAME="gcc"
PKG_VERSION="4.8.0"
if [ "$GCC_VERSION" = "4.7" ]; then
PKG_VERSION="4.7.3"
PKG_URL="ftp://ftp.gnu.org/gnu/gcc/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
else
# PKG_VERSION="4.8.0"
# PKG_URL="ftp://ftp.gnu.org/gnu/gcc/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_VERSION="4.8-20130509"
PKG_URL="ftp://ftp.gwdg.de/pub/misc/gcc/snapshots/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
fi
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://gcc.gnu.org/"
PKG_URL="ftp://ftp.gnu.org/gnu/gcc/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
# PKG_URL="ftp://ftp.gnu.org/gnu/gcc/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="ccache"
PKG_PRIORITY="optional"

View File

@ -0,0 +1,24 @@
diff -Naur gcc-4.6-20120120-orig/configure gcc-4.6-20120120/configure
--- gcc-4.6-20120120-orig/configure 2011-12-18 20:03:44.000000000 +1000
+++ gcc-4.6-20120120/configure 2012-02-03 17:55:14.885990135 +1000
@@ -6049,8 +6049,8 @@
LDFLAGS="${_cloog_saved_LDFLAGS} ${clooglibs} ${ppllibs}"
if test "${cloog_org}" = yes ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.16.1 of CLooG" >&5
-$as_echo_n "checking for version 0.16.1 of CLooG... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version 0.18 of CLooG" >&5
+$as_echo_n "checking for version 0.18 of CLooG... " >&6; }
if test "${gcc_cv_cloog_ct_0_14_0+set}" = set; then :
$as_echo_n "(cached) " >&6
else
@@ -6061,8 +6061,7 @@
main ()
{
#if CLOOG_VERSION_MAJOR != 0 \
- || CLOOG_VERSION_MINOR != 16 \
- || CLOOG_VERSION_REVISION < 1
+ || CLOOG_VERSION_MINOR != 18
choke me
#endif
;

View File

@ -0,0 +1,13 @@
diff -Naur gcc-4.7.3/gcc/config/i386/t-linux64 gcc-4.7.3.patch/gcc/config/i386/t-linux64
--- gcc-4.7.3/gcc/config/i386/t-linux64 2013-01-14 17:32:37.000000000 +0100
+++ gcc-4.7.3.patch/gcc/config/i386/t-linux64 2013-04-13 01:57:45.286907048 +0200
@@ -34,6 +34,6 @@
comma=,
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
-MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
-MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)
+#MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+#MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
+#MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)

View File

@ -0,0 +1,131 @@
diff -Naur gcc-4.7.0-old/gcc/config/i386/linux64.h gcc-4.7.0-new/gcc/config/i386/linux64.h
--- gcc-4.7.0-old/gcc/config/i386/linux64.h 2011-07-07 08:38:34.000000000 -0700
+++ gcc-4.7.0-new/gcc/config/i386/linux64.h 2012-04-23 21:03:08.000000000 -0700
@@ -29,5 +29,5 @@
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
-#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKERX32 "/lib/ld-linux-x32.so.2"
diff -Naur gcc-4.7.0-old/gcc/config/mips/iris6.h gcc-4.7.0-new/gcc/config/mips/iris6.h
--- gcc-4.7.0-old/gcc/config/mips/iris6.h 2012-03-05 02:43:22.000000000 -0800
+++ gcc-4.7.0-new/gcc/config/mips/iris6.h 2012-04-23 21:02:07.000000000 -0700
@@ -256,27 +256,27 @@
#define STARTFILE_SPEC \
"%{!shared: \
%{mabi=n32: \
- %{mips4:%{pg:/usr/lib32/mips4/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips4/mcrt1.o%s /usr/lib32/mips4/libprof1.a%s} \
- %{!p:/usr/lib32/mips4/crt1.o%s}}} \
- %{!mips4:%{pg:/usr/lib32/mips3/gcrt1.o%s} \
- %{!pg:%{p:/usr/lib32/mips3/mcrt1.o%s /usr/lib32/mips3/libprof1.a%s} \
- %{!p:/usr/lib32/mips3/crt1.o%s}}}} \
+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o%s} \
+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o%s /usr/lib/mips4/libprof1.a%s} \
+ %{!p:/usr/lib/mips4/crt1.o%s}}} \
+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o%s} \
+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o%s /usr/lib/mips3/libprof1.a%s} \
+ %{!p:/usr/lib/mips3/crt1.o%s}}}} \
%{mabi=64: \
- %{mips4:%{pg:/usr/lib64/mips4/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips4/mcrt1.o /usr/lib64/mips4/libprof1.a} \
- %{!p:/usr/lib64/mips4/crt1.o}}} \
- %{!mips4:%{pg:/usr/lib64/mips3/gcrt1.o} \
- %{!pg:%{p:/usr/lib64/mips3/mcrt1.o /usr/lib64/mips3/libprof1.a} \
- %{!p:/usr/lib64/mips3/crt1.o}}}}} \
+ %{mips4:%{pg:/usr/lib/mips4/gcrt1.o} \
+ %{!pg:%{p:/usr/lib/mips4/mcrt1.o /usr/lib/mips4/libprof1.a} \
+ %{!p:/usr/lib/mips4/crt1.o}}} \
+ %{!mips4:%{pg:/usr/lib/mips3/gcrt1.o} \
+ %{!pg:%{p:/usr/lib/mips3/mcrt1.o /usr/lib/mips3/libprof1.a} \
+ %{!p:/usr/lib/mips3/crt1.o}}}}} \
irix-crti.o%s crtbegin.o%s"
#undef LIB_SPEC
#define LIB_SPEC \
- "%{mabi=n32: %{mips4:-L/usr/lib32/mips4} %{!mips4:-L/usr/lib32/mips3} \
- -L/usr/lib32} \
- %{mabi=64: %{mips4:-L/usr/lib64/mips4} %{!mips4:-L/usr/lib64/mips3} \
- -L/usr/lib64} \
+ "%{mabi=n32: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \
+ -L/usr/lib} \
+ %{mabi=64: %{mips4:-L/usr/lib/mips4} %{!mips4:-L/usr/lib/mips3} \
+ -L/usr/lib} \
%{!shared:" \
SUBTARGET_DONT_WARN_UNUSED_SPEC \
" %{pthread:-lpthread} %{p:libprof1.a%s}%{pg:libprof1.a%s} -lc " \
@@ -293,10 +293,10 @@
"%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
crtend.o%s irix-crtn.o%s \
%{!shared: \
- %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
- %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
- %{mabi=64:%{mips4:/usr/lib64/mips4/crtn.o%s}\
- %{!mips4:/usr/lib64/mips3/crtn.o%s}}}"
+ %{mabi=n32:%{mips4:/usr/lib/mips4/crtn.o%s}\
+ %{!mips4:/usr/lib/mips3/crtn.o%s}}\
+ %{mabi=64:%{mips4:/usr/lib/mips4/crtn.o%s}\
+ %{!mips4:/usr/lib/mips3/crtn.o%s}}}"
/* Generic part of the LINK_SPEC. */
#undef LINK_SPEC
diff -Naur gcc-4.7.0-old/gcc/config/mips/linux64.h gcc-4.7.0-new/gcc/config/mips/linux64.h
--- gcc-4.7.0-old/gcc/config/mips/linux64.h 2011-07-19 11:00:27.000000000 -0700
+++ gcc-4.7.0-new/gcc/config/mips/linux64.h 2012-04-23 21:02:07.000000000 -0700
@@ -24,9 +24,9 @@
#define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
-#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1"
+#define UCLIBC_DYNAMIC_LINKERN32 "/lib/ld-uClibc.so.0"
#define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
#define GNU_USER_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \
diff -Naur gcc-4.7.0-old/gcc/config/rs6000/linux64.h gcc-4.7.0-new/gcc/config/rs6000/linux64.h
--- gcc-4.7.0-old/gcc/config/rs6000/linux64.h 2012-03-12 09:16:51.000000000 -0700
+++ gcc-4.7.0-new/gcc/config/rs6000/linux64.h 2012-04-23 21:02:07.000000000 -0700
@@ -359,7 +359,7 @@
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#if DEFAULT_LIBC == LIBC_UCLIBC
diff -Naur gcc-4.7.0-old/gcc/config/sparc/linux64.h gcc-4.7.0-new/gcc/config/sparc/linux64.h
--- gcc-4.7.0-old/gcc/config/sparc/linux64.h 2011-11-11 17:05:07.000000000 -0800
+++ gcc-4.7.0-new/gcc/config/sparc/linux64.h 2012-04-23 21:02:07.000000000 -0700
@@ -94,7 +94,7 @@
done. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux.so.2"
#ifdef SPARC_BI_ARCH
@@ -113,7 +113,7 @@
%{static:-static}} \
"
-#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
+#define LINK_ARCH64_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \
@@ -202,7 +202,7 @@
#else /* !SPARC_BI_ARCH */
#undef LINK_SPEC
-#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib64 %{shared:-shared} \
+#define LINK_SPEC "-m elf64_sparc -Y P,%R/usr/lib %{shared:-shared} \
%{!shared: \
%{!static: \
%{rdynamic:-export-dynamic} \

View File

@ -0,0 +1,97 @@
diff -Naur gcc-4.7.0-old/libstdc++-v3/config.h.in gcc-4.7.0-new/libstdc++-v3/config.h.in
--- gcc-4.7.0-old/libstdc++-v3/config.h.in 2012-03-22 08:25:54.000000000 -0700
+++ gcc-4.7.0-new/libstdc++-v3/config.h.in 2012-03-22 08:28:32.000000000 -0700
@@ -130,7 +130,7 @@
#undef HAVE_FABSL
/* Define to 1 if you have the <fenv.h> header file. */
-#undef HAVE_FENV_H
+#define HAVE_FENV_H 1
/* Define to 1 if you have the `finite' function. */
#undef HAVE_FINITE
@@ -184,7 +184,7 @@
#undef HAVE_HYPOTL
/* Define if you have the iconv() function. */
-#undef HAVE_ICONV
+#define HAVE_ICONV 1
/* Define to 1 if you have the <ieeefp.h> header file. */
#undef HAVE_IEEEFP_H
@@ -223,7 +223,7 @@
#undef HAVE_ISWBLANK
/* Define if LC_MESSAGES is available in <locale.h>. */
-#undef HAVE_LC_MESSAGES
+#define HAVE_LC_MESSAGES 1
/* Define to 1 if you have the `ldexpf' function. */
#undef HAVE_LDEXPF
@@ -304,7 +304,7 @@
#undef HAVE_QFPCLASS
/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
+#define HAVE_SETENV 1
/* Define to 1 if you have the `sincos' function. */
#undef HAVE_SINCOS
@@ -346,7 +346,7 @@
#undef HAVE_STDLIB_H
/* Define if strerror_l is available in <string.h>. */
-#undef HAVE_STRERROR_L
+#define HAVE_STRERROR_L 1
/* Define if strerror_r is available in <string.h>. */
#undef HAVE_STRERROR_R
@@ -377,7 +377,7 @@
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/ipc.h> header file. */
-#undef HAVE_SYS_IPC_H
+#define HAVE_SYS_IPC_H 1
/* Define to 1 if you have the <sys/isa_defs.h> header file. */
#undef HAVE_SYS_ISA_DEFS_H
@@ -389,10 +389,10 @@
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/resource.h> header file. */
-#undef HAVE_SYS_RESOURCE_H
+#define HAVE_SYS_RESOURCE_H 1
/* Define to 1 if you have the <sys/sem.h> header file. */
-#undef HAVE_SYS_SEM_H
+#define HAVE_SYS_SEM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -401,7 +401,7 @@
#undef HAVE_SYS_SYSINFO_H
/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
+#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
@@ -431,7 +431,7 @@
#undef HAVE_TGMATH_H
/* Define to 1 if the target supports thread-local storage. */
-#undef HAVE_TLS
+#define HAVE_TLS 1
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -644,7 +644,7 @@
#undef HAVE__TANL
/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
+#define ICONV_CONST 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -92,7 +92,6 @@
GOLD_SUPPORT="yes"
# Bootloader to use (syslinux / u-boot / atv-bootloader)
# BOOTLOADER="atv-bootloader" disabled for now
BOOTLOADER="atv-bootloader"
# Configuration for u-boot
@ -101,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -89,7 +89,7 @@
LTO_SUPPORT="yes"
# GOLD (Google Linker) support
GOLD_SUPPORT="yes"
GOLD_SUPPORT="no"
# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader)
BOOTLOADER="bcm2835-bootloader"
@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="4.7"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -100,6 +100,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel

View File

@ -95,6 +95,10 @@
# Target Configfile for u-boot
UBOOT_CONFIGFILE=""
# GCC to use. values can be:
# default: default mainline gcc
GCC_VERSION="default"
# Kernel to use. values can be:
# default: default mainline kernel
# ti-omap4: Ti's OMAP4 kernel