summaryrefslogtreecommitdiff
path: root/core/gcc
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-04-06 13:07:17 +0200
committerMichał Masłowski <mtjm@mtjm.eu>2012-04-06 13:07:17 +0200
commit2781491d77559e5a9f0e0d26698d91da745f14f3 (patch)
treebc5a86ba577d887c224f2ba87e16b3f662901641 /core/gcc
parent5f875caf9e31730faff78cfa1fc99c30717a924d (diff)
Update gcc PKGBUILD and patch for upstream changes, try harder to use our CFLAGS.
Diffstat (limited to 'core/gcc')
-rw-r--r--core/gcc/PKGBUILD22
-rw-r--r--core/gcc/gcc_mips64el_lib.patch35
2 files changed, 33 insertions, 24 deletions
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 647ce04f3..fc95dfa89 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -29,7 +29,12 @@ source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
gcc_pure64.patch
gcc_mips64el_lib.patch
- gcc-4.6.2-cloog-0.17.patch)
+ gcc-4.7.0-cloog-0.17.patch)
+md5sums=('947f9a70dcbb4baaf20b1e95b518048e'
+ '489d2f5311535800a120efd8d18db719'
+ 'ced48436c1b3c981d721a829f1094de1'
+ '474b8f5a7dee6ddd96b95a7240bfb961'
+ '575f7d17b022e609447a590e481b18b5')
if [ -n "${_snapshot}" ]; then
_basedir="${srcdir}/gcc-${_snapshot}"
@@ -49,8 +54,7 @@ build() {
if [ "${CARCH}" = "x86_64" ]; then
patch -p1 -i ${srcdir}/gcc_pure64.patch
elif [ "${CARCH}" = "mips64el" ]; then
- patch -Np0 -i ${srcdir}/gcc_mips64el_lib.patch
- patch -p1 -i ${srcdir}/gcc_pure64.patch
+ patch -p1 -i ${srcdir}/gcc_mips64el_lib.patch
fi
# compatibility with latest cloog
@@ -61,25 +65,29 @@ build() {
cd ${srcdir}
mkdir gcc-build && cd gcc-build
-# what's this for?
+ # Use our CFLAGS, CXXFLAGS and LDFLAGS for the binaries built.
export BOOT_CFLAGS="$CFLAGS"
+ export CFLAGS_FOR_BUILD="$CFLAGS"
export CFLAGS_FOR_TARGET="$CFLAGS"
+ export CXXFLAGS_FOR_BUILD="$CXXFLAGS"
export CXXFLAGS_FOR_TARGET="$CXXFLAGS"
export BOOT_LDFLAGS="$LDFLAGS"
+ export LDFLAGS_FOR_BUILD="$LDFLAGS"
export LDFLAGS_FOR_TARGET="$LDFLAGS"
if [[ "${CARCH}" != "mips64el" ]]; then
languages=c,c++,ada,fortran,go,lto,objc,obj-c++
+ # The ancient MIPS ABI has possible requirements incompatible
+ # with GNU hash.
extra="--with-linker-hash-style=gnu"
else
-# mips64el doesn't support gnu.hash yet
languages=c,c++,fortran,lto,objc,obj-c++
fi
${_basedir}/configure --prefix=/usr \
--libdir=/usr/lib --libexecdir=/usr/lib \
--mandir=/usr/share/man --infodir=/usr/share/info \
- --with-bugurl=https://bugs.parabolagnulinux.org/ \
+ --with-bugurl=https://labs.parabolagnulinux.org/ \
--enable-languages=$languages \
--enable-shared --enable-threads=posix \
--with-system-zlib --enable-__cxa_atexit \
@@ -97,6 +105,8 @@ build() {
}
check() {
+ # Takes days and no one here uses it.
+ [ "$CARCH" != "mips64el" ] || return
cd gcc-build
# increase stack size to prevent test failures
diff --git a/core/gcc/gcc_mips64el_lib.patch b/core/gcc/gcc_mips64el_lib.patch
index 425758e88..c938d9b30 100644
--- a/core/gcc/gcc_mips64el_lib.patch
+++ b/core/gcc/gcc_mips64el_lib.patch
@@ -1,19 +1,9 @@
---- gcc/config/mips/t-linux64.orig 2011-04-09 20:28:51.729723495 -0300
-+++ gcc/config/mips/t-linux64 2011-04-09 20:29:06.913724013 -0300
-@@ -18,7 +18,7 @@
-
- MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
- MULTILIB_DIRNAMES = n32 32 64
--MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
-+MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64
-
- EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
-
---- gcc/config/mips/linux64.h.orig 2011-04-09 20:27:06.909723735 -0300
-+++ gcc/config/mips/linux64.h 2011-04-09 20:28:16.033723803 -0300
-@@ -35,9 +35,9 @@
- %{!shared: \
- %{profile:-lc_p} %{!profile:-lc}}"
+diff -ru gcc-4.7-20120324.orig/gcc/config/mips/linux64.h gcc-4.7-20120324/gcc/config/mips/linux64.h
+--- gcc-4.7-20120324.orig/gcc/config/mips/linux64.h 2012-04-06 11:32:50.545152897 +0200
++++ gcc-4.7-20120324/gcc/config/mips/linux64.h 2012-04-06 12:06:58.501290352 +0200
+@@ -23,9 +23,9 @@
+ #define GNU_USER_LINK_EMULATION64 "elf64%{EB:b}%{EL:l}tsmip"
+ #define GNU_USER_LINK_EMULATIONN32 "elf32%{EB:b}%{EL:l}tsmipn32"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld.so.1"
@@ -21,5 +11,14 @@
-#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
+#define GLIBC_DYNAMIC_LINKERN32 "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
- #define LINUX_DYNAMIC_LINKERN32 \
- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
+ #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32"
+ #define GNU_USER_DYNAMIC_LINKERN32 \
+diff -ru gcc-4.7-20120324.orig/gcc/config/mips/t-linux64 gcc-4.7-20120324/gcc/config/mips/t-linux64
+--- gcc-4.7-20120324.orig/gcc/config/mips/t-linux64 2012-04-06 11:32:50.379989000 +0200
++++ gcc-4.7-20120324/gcc/config/mips/t-linux64 2012-04-06 12:05:55.461021317 +0200
+@@ -18,4 +18,4 @@
+
+ MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+ MULTILIB_DIRNAMES = n32 32 64
+-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
++MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64