This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 3.x development tree".
The branch, master has been updated via d0b0931b6a6fdc712f33d020223ced849f264595 (commit) via f360facb610d1cc5a43948d26c76c35d0aaa13e6 (commit) via fc9286643ee2637687e9744a90ea54a523a6c99f (commit) via 4acac6c20b40251526f9a9265b08707bd65d8802 (commit) via a1f9cb0a03b56ac53e70708b9c0e36118dc2fd65 (commit) via 378d39c4698f795d84c85543b666e1bd07493d16 (commit) via 6312b7d05908c1ad67d760baacf8520b6a659afd (commit) via 76c8c32a810a38f896cd80010ed4616b3226abfa (commit) via 0352604e9d1015cfd4662f948197f8f0e8590cde (commit) via 3c4e6e3cee9684ee74f836ee44d88d275f2bbc24 (commit) via ba2e7991cc67689b4cde7f41bf5236064b082362 (commit) via fc8c7db0171ae0a6b4f649b7066f987ec429a98f (commit) from 236898d61338706c7a8f22f80eb7a2d917619805 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit d0b0931b6a6fdc712f33d020223ced849f264595 Merge: f360fac 236898d Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 5 18:32:25 2010 +0100
Merge branch 'master' of ssh://git.ipfire.org/pub/git/people/ms/ipfire-3.x into next
commit f360facb610d1cc5a43948d26c76c35d0aaa13e6 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 5 18:31:52 2010 +0100
sip: Update to current snapshot version (4.12-snapshot).
commit fc9286643ee2637687e9744a90ea54a523a6c99f Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 5 18:31:39 2010 +0100
pyQt: Add --assume-shared.
commit 4acac6c20b40251526f9a9265b08707bd65d8802 Author: Michael Tremer michael.tremer@ipfire.org Date: Fri Nov 5 11:28:42 2010 +0100
qt: Don't delete any files.
This breaks more than you would have expected.
commit a1f9cb0a03b56ac53e70708b9c0e36118dc2fd65 Merge: 6312b7d 378d39c Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Oct 31 22:50:41 2010 +0100
Merge remote branch 'stevee/qt' into next
commit 378d39c4698f795d84c85543b666e1bd07493d16 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Oct 31 22:46:16 2010 +0100
qt: Add patches to fix a lot of bugs.
commit 6312b7d05908c1ad67d760baacf8520b6a659afd Merge: 76c8c32 3c4e6e3 Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Oct 31 17:03:33 2010 +0100
Merge remote branch 'stevee/openssh' into next
commit 76c8c32a810a38f896cd80010ed4616b3226abfa Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Oct 31 17:03:11 2010 +0100
pyQt: Update to 4.8.1.
commit 0352604e9d1015cfd4662f948197f8f0e8590cde Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Oct 31 17:02:06 2010 +0100
gcc: Apply some bugfix patches to gcc.
commit 3c4e6e3cee9684ee74f836ee44d88d275f2bbc24 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Oct 31 16:50:35 2010 +0100
openssh: Fix typo in NM.
commit ba2e7991cc67689b4cde7f41bf5236064b082362 Author: Schantl Stefan Stevee@ipfire.org Date: Sun Oct 31 16:39:47 2010 +0100
openssh: Split package into openssh-clients and openssh-server.
commit fc8c7db0171ae0a6b4f649b7066f987ec429a98f Author: Michael Tremer michael.tremer@ipfire.org Date: Sun Oct 31 12:40:17 2010 +0100
Revert "gcc: Update patchset and fix errors."
This reverts commit e3a40b9851a8dcea07af83289ecfdc46d89cba2a.
-----------------------------------------------------------------------
Summary of changes: pkgs/core/gcc/gcc.nm | 2 +- ...0.patch => gcc-4.5.0-piepatches-20100421.patch} | 438 ++++++++++++++------ pkgs/core/gcc/patches/gcc45-libtool-no-rpath.patch | 27 ++ pkgs/core/openssh/openssh.nm | 27 ++ pkgs/core/pyQt/pyQt.nm | 5 +- ...makes-override-redirect-windows-popup-men.patch | 67 +++ ...adds-support-for-using-isystem-to-allow-p.patch | 56 +++ ...tabs-are-inserted-or-removed-in-a-QTabBar.patch | 47 +++ ...0012-Add-context-to-tr-calls-in-QShortcut.patch | 70 ++++ pkgs/core/qt/patches/qt | 1 + .../patches/qt-4.6.3-bn-rendering-bz562049.patch | 15 + .../patches/qt-4.6.3-bn-rendering-bz562058.patch | 12 + .../qt-4.6.3-indic-rendering-bz631732.patch | 14 + .../qt-4.6.3-indic-rendering-bz636399.patch | 30 ++ .../qt-everywhere-opensource-src-4.6.2-cups.patch | 84 ++++ ...source-src-4.6.3-glib_eventloop_nullcheck.patch | 21 + ...e-src-4.7.0-CVE-2010-1822-crash-svg-image.patch | 26 ++ ...pensource-src-4.7.0-QTBUG-13567-QTreeView.patch | 31 ++ ...verywhere-opensource-src-4.7.0-QTBUG-6185.patch | 34 ++ ...ource-src-4.7.0-beta1-qtwebkit_pluginpath.patch | 19 + ...erywhere-opensource-src-4.7.0-beta1-s390x.patch | 61 +++ ...e-opensource-src-4.7.0-beta1-uic_multilib.patch | 36 ++ ...e-opensource-src-4.7.0-beta2-kde4_plugins.patch | 19 + ...e-opensource-src-4.7.0-beta2-mysql_config.patch | 19 + ...ource-src-4.7.0-beta2-phonon_servicesfile.patch | 40 ++ .../qt-everywhere-opensource-src-4.7.0-bpp24.patch | 15 + ...11-opensource-src-4.2.2-multilib-optflags.patch | 33 ++ ...ensource-src-4.5.0-fix-qatomic-inline-asm.patch | 50 +++ ...-opensource-src-4.5.1-enable_ft_lcdfilter.patch | 12 + pkgs/core/qt/qt.nm | 9 +- pkgs/core/sip/sip.nm | 4 +- 31 files changed, 1182 insertions(+), 142 deletions(-) rename pkgs/core/gcc/patches/{gcc-4.5.1-esp-20101030.patch => gcc-4.5.0-piepatches-20100421.patch} (67%) create mode 100644 pkgs/core/gcc/patches/gcc45-libtool-no-rpath.patch create mode 100644 pkgs/core/qt/patches/0002-This-patch-makes-override-redirect-windows-popup-men.patch create mode 100644 pkgs/core/qt/patches/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch create mode 100644 pkgs/core/qt/patches/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch create mode 100644 pkgs/core/qt/patches/0012-Add-context-to-tr-calls-in-QShortcut.patch create mode 160000 pkgs/core/qt/patches/qt create mode 100644 pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562049.patch create mode 100644 pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562058.patch create mode 100644 pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz631732.patch create mode 100644 pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz636399.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.2-cups.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-CVE-2010-1822-crash-svg-image.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-13567-QTreeView.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-s390x.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-kde4_plugins.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-mysql_config.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-phonon_servicesfile.patch create mode 100644 pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-bpp24.patch create mode 100644 pkgs/core/qt/patches/qt-x11-opensource-src-4.2.2-multilib-optflags.patch create mode 100644 pkgs/core/qt/patches/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch create mode 100644 pkgs/core/qt/patches/qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch
Difference in files: diff --git a/pkgs/core/gcc/gcc.nm b/pkgs/core/gcc/gcc.nm index b1cc18a..e16e683 100644 --- a/pkgs/core/gcc/gcc.nm +++ b/pkgs/core/gcc/gcc.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = gcc PKG_VER = 4.5.1 -PKG_REL = 2 +PKG_REL = 3
PKG_MAINTAINER = Michael Tremer michael.tremer@ipfire.org PKG_GROUP = Development/Compilers diff --git a/pkgs/core/gcc/patches/gcc-4.5.0-piepatches-20100421.patch b/pkgs/core/gcc/patches/gcc-4.5.0-piepatches-20100421.patch new file mode 100644 index 0000000..e525d5b --- /dev/null +++ b/pkgs/core/gcc/patches/gcc-4.5.0-piepatches-20100421.patch @@ -0,0 +1,1056 @@ +diff -Nur gcc-4.5.0-vanilla/configure gcc-4.5.0/configure +--- gcc-4.5.0-vanilla/configure 2010-04-02 19:35:47.000000000 +0200 ++++ gcc-4.5.0/configure 2010-04-21 15:21:09.762948361 +0200 +@@ -707,6 +707,7 @@ + CFLAGS + CC + target_subdir ++enable_esp + host_subdir + build_subdir + build_libsubdir +@@ -1485,6 +1486,11 @@ + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-gold use gold instead of ld + --enable-libada build libada directory ++ --enable-esp ++ Enable Stack protector, Position independent executable and ++ Fortify_sources as default if we have suppot for it when compiling ++ and link with -z relro and -z now as default. ++ Linux targets supported i*86, x86_64, powerpc*, ia64, arm* and mips + --enable-libssp build libssp directory + --enable-build-with-cxx build with C++ compiler instead of C compiler + --disable-ppl-version-check disable check for PPL version +@@ -3164,6 +3170,24 @@ + noconfigdirs="$noconfigdirs gnattools" + fi + ++# Check whether --enable-esp was given and target have the support. ++# Check whether --enable-esp or --disable-esp was given. ++if test "${enable_esp+set}" = set; then ++ enableval="$enable_esp" ++ ++ case $target in ++ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux* | mips-*-linux*) ++ enable_esp=yes ++ ;; ++ *) ++ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5 ++echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} ++ { (exit 1); exit 1; }; } ++ ;; ++ esac ++ ++fi; ++ + # Check whether --enable-libssp was given. + if test "${enable_libssp+set}" = set; then : + enableval=$enable_libssp; ENABLE_LIBSSP=$enableval +@@ -14290,6 +14314,9 @@ + *) stage1_cflags="-g -J" ;; + esac ;; + esac ++if test x$enable_esp = xyes; then ++ stage1_cflags="$stage1_cflags -fno-stack-protector" ++fi + + # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. + if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then +diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux64.h gcc-4.5.0/gcc/config/i386/linux64.h +--- gcc-4.5.0-vanilla/gcc/config/i386/linux64.h 2010-03-24 21:44:48.000000000 +0100 ++++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-04-21 15:21:16.730815972 +0200 +@@ -115,7 +115,7 @@ + /* This macro may be overridden in i386/k*bsd-gnu.h. */ + #define REG_NAME(reg) reg + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* i386 glibc provides __stack_chk_guard in %gs:0x14, + x86_64 glibc provides it in %fs:0x28. */ + #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) +diff -Nur gcc-4.5.0-vanilla/gcc/config/i386/linux.h gcc-4.5.0/gcc/config/i386/linux.h +--- gcc-4.5.0-vanilla/gcc/config/i386/linux.h 2010-03-24 21:44:48.000000000 +0100 ++++ gcc-4.5.0/gcc/config/i386/linux.h 2010-04-21 15:21:16.721813554 +0200 +@@ -212,7 +212,7 @@ + /* This macro may be overridden in i386/k*bsd-gnu.h. */ + #define REG_NAME(reg) reg + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* i386 glibc provides __stack_chk_guard in %gs:0x14. */ + #define TARGET_THREAD_SSP_OFFSET 0x14 + #endif +diff -Nur gcc-4.5.0-vanilla/gcc/config/linux.h gcc-4.5.0/gcc/config/linux.h +--- gcc-4.5.0-vanilla/gcc/config/linux.h 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.5.0/gcc/config/linux.h 2010-04-21 15:21:16.667815357 +0200 +@@ -43,7 +43,11 @@ + object constructed before entering `main'. */ + + #undef STARTFILE_SPEC +-#if defined HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) ++#define STARTFILE_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ ++ %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) + #define STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" +diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h gcc-4.5.0/gcc/config/rs6000/linux64.h +--- gcc-4.5.0-vanilla/gcc/config/rs6000/linux64.h 2010-03-17 05:44:37.000000000 +0100 ++++ gcc-4.5.0/gcc/config/rs6000/linux64.h 2010-04-21 15:21:16.732816308 +0200 +@@ -162,7 +162,7 @@ + #endif + + #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \ +-%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ ++%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ + %{memb} %{!memb: %{msdata=eabi: -memb}} \ + %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ + %{mcall-freebsd: -mbig} \ +@@ -525,7 +525,7 @@ + + #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), + ppc64 glibc provides it at -0x7010(13). */ + #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? -0x7010 : -0x7008) +diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h gcc-4.5.0/gcc/config/rs6000/linux.h +--- gcc-4.5.0-vanilla/gcc/config/rs6000/linux.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.5.0/gcc/config/rs6000/linux.h 2010-04-21 15:21:16.731819651 +0200 +@@ -117,7 +117,7 @@ + + #define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ + #define TARGET_THREAD_SSP_OFFSET -0x7008 + #endif +diff -Nur gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h gcc-4.5.0/gcc/config/rs6000/sysv4.h +--- gcc-4.5.0-vanilla/gcc/config/rs6000/sysv4.h 2009-11-25 21:23:20.000000000 +0100 ++++ gcc-4.5.0/gcc/config/rs6000/sysv4.h 2010-04-21 15:21:16.674812959 +0200 +@@ -883,7 +883,12 @@ + %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ + %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" + +-#ifdef HAVE_LD_PIE ++#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) ++#define STARTFILE_LINUX_SPEC \ ++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ ++ %{mnewlib:ecrti.o%s;:crti.o%s} \ ++ {static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" ++#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) + #define STARTFILE_LINUX_SPEC "\ + %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + %{mnewlib:ecrti.o%s;:crti.o%s} \ +diff -Nur gcc-4.5.0-vanilla/gcc/config/s390/linux.h gcc-4.5.0/gcc/config/s390/linux.h +--- gcc-4.5.0-vanilla/gcc/config/s390/linux.h 2007-08-02 12:49:31.000000000 +0200 ++++ gcc-4.5.0/gcc/config/s390/linux.h 2010-04-21 15:21:16.738814124 +0200 +@@ -93,7 +93,7 @@ + + #define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* s390 glibc provides __stack_chk_guard in 0x14(tp), + s390x glibc provides it at 0x28(tp). */ + #define TARGET_THREAD_SSP_OFFSET (TARGET_64BIT ? 0x28 : 0x14) +diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h gcc-4.5.0/gcc/config/sparc/linux64.h +--- gcc-4.5.0-vanilla/gcc/config/sparc/linux64.h 2009-12-08 00:31:01.000000000 +0100 ++++ gcc-4.5.0/gcc/config/sparc/linux64.h 2010-04-21 15:21:16.749816158 +0200 +@@ -298,7 +298,7 @@ + #undef NEED_INDICATE_EXEC_STACK + #define NEED_INDICATE_EXEC_STACK 1 + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14], + sparc64 glibc provides it at [%g7 + 0x28]. */ + #define TARGET_THREAD_SSP_OFFSET (TARGET_ARCH64 ? 0x28 : 0x14) +diff -Nur gcc-4.5.0-vanilla/gcc/config/sparc/linux.h gcc-4.5.0/gcc/config/sparc/linux.h +--- gcc-4.5.0-vanilla/gcc/config/sparc/linux.h 2009-12-08 00:31:01.000000000 +0100 ++++ gcc-4.5.0/gcc/config/sparc/linux.h 2010-04-21 15:21:16.746815839 +0200 +@@ -172,7 +172,7 @@ + #undef NEED_INDICATE_EXEC_STACK + #define NEED_INDICATE_EXEC_STACK 1 + +-#ifdef TARGET_LIBC_PROVIDES_SSP ++#if defined TARGET_LIBC_PROVIDES_SSP && !defined __UCLIBC__ + /* sparc glibc provides __stack_chk_guard in [%g7 + 0x14]. */ + #define TARGET_THREAD_SSP_OFFSET 0x14 + #endif +diff -Nur gcc-4.5.0-vanilla/gcc/config.in gcc-4.5.0/gcc/config.in +--- gcc-4.5.0-vanilla/gcc/config.in 2010-04-14 11:30:07.000000000 +0200 ++++ gcc-4.5.0/gcc/config.in 2010-04-21 15:21:09.879812904 +0200 +@@ -52,6 +52,12 @@ + #endif + + ++/* Define to 1 to enable crtbeginTS.o. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_CRTBEGINTS ++#endif ++ ++ + /* Define to 1 to specify that we are using the BID decimal floating point + format instead of DPD */ + #ifndef USED_FOR_TARGET +@@ -71,6 +77,12 @@ + #endif + + ++/* Define to 1 to enable esp. */ ++#ifndef USED_FOR_TARGET ++#undef ENABLE_ESP ++#endif ++ ++ + /* Define to 1 to enable fixed-point arithmetic extension to C. */ + #ifndef USED_FOR_TARGET + #undef ENABLE_FIXED_POINT +@@ -996,6 +1008,12 @@ + #endif + + ++/* Define to 1 if your compiler supports -fstack-protector */ ++#ifndef USED_FOR_TARGET ++#undef HAVE_GCC_SSP ++#endif ++ ++ + /* Define to 1 if you have the `getchar_unlocked' function. */ + #ifndef USED_FOR_TARGET + #undef HAVE_GETCHAR_UNLOCKED +diff -Nur gcc-4.5.0-vanilla/gcc/configure gcc-4.5.0/gcc/configure +--- gcc-4.5.0-vanilla/gcc/configure 2010-03-26 06:40:32.000000000 +0100 ++++ gcc-4.5.0/gcc/configure 2010-04-21 15:21:09.784072083 +0200 +@@ -678,6 +678,8 @@ + HOST_LIBS + GGC + libgcc_visibility ++enable_esp ++enable_crtbeginTS + gcc_cv_readelf + gcc_cv_objdump + ORIGINAL_NM_FOR_TARGET +@@ -24576,6 +24578,50 @@ + ;; + esac + ++echo "$as_me:$LINENO: checking linker -z now support" >&5 ++echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 ++if test "${gcc_cv_ld_now+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ gcc_cv_ld_now=no ++if test $in_tree_ld = yes ; then ++ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ ++ && test $in_tree_ld_is_elf = yes; then ++ gcc_cv_ld_now=yes ++ fi ++elif test x$gcc_cv_ld != x; then ++ # Check if linker supports -z now options ++ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then ++ gcc_cv_ld_now=yes ++ fi ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 ++echo "${ECHO_T}$gcc_cv_ld_now" >&6 ++ ++echo "$as_me:$LINENO: checking linker -z relro support" >&5 ++echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 ++if test "${gcc_cv_ld_relro+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ gcc_cv_ld_relro=no ++if test $in_tree_ld = yes ; then ++ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ ++ && test $in_tree_ld_is_elf = yes; then ++ gcc_cv_ld_relro=yes ++ fi ++elif test x$gcc_cv_ld != x; then ++ # Check if linker supports -z relro and -z norelro options ++ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then ++ gcc_cv_ld_relro=yes ++ fi ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 ++echo "${ECHO_T}$gcc_cv_ld_relro" >&6 ++ + { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 + $as_echo_n "checking linker --build-id support... " >&6; } + if test "${gcc_cv_ld_buildid+set}" = set; then : +@@ -24729,6 +24775,146 @@ + + fi + ++if test x$gcc_cv_libc_provides_ssp = xyes; then ++ echo "$as_me:$LINENO: checking whether $CC support -fstack-protector" >&5 ++echo $ECHO_N "checking whether $CC support -fstack-protector... $ECHO_C" >&6 ++if test "${gcc_cv_cc_stack_protector+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ saved_CFLAGS="$CFLAGS" ++ CFLAGS="$CFLAGS -fstack-protector" ++ cat >conftest.$ac_ext <<_ACEOF ++#ifndef __SSP__ ++#error ++#endif ++ ++_ACEOF ++rm -f conftest.$ac_objext ++if { (eval echo "$as_me:$LINENO: "$ac_compile"") >&5 ++ (eval $ac_compile) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: $? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: $? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest.$ac_objext' ++ { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: $? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ++ case $target in ++ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux*) ++ if test x$set_have_as_tls = xyes; then ++ gcc_cv_cc_stack_protector=yes ++ else ++ gcc_cv_cc_stack_protector=no ++ fi ++ ;; ++ *) ++ cc_cv_cc_stack_protector=yes ++ ;; ++ esac ++ ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++gcc_cv_cc_stack_protector=no ++fi ++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ++ CFLAGS="$saved_CFLAGS" ++ ++fi ++echo "$as_me:$LINENO: result: $gcc_cv_cc_stack_protector" >&5 ++echo "${ECHO_T}$gcc_cv_cc_stack_protector" >&6 ++fi ++if test x$gcc_cv_cc_stack_protector = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define HAVE_GCC_SSP 1 ++_ACEOF ++ ++fi ++ ++ ++if test x$enable_esp = xyes ; then ++case $target in ++ ia64*-*-linux*) ++ if test x$gcc_cv_ld_now = xyes; then ++ enable_esp_ld=yes ++ else ++ enable_esp_ld=no ++ fi ++ ;; ++ *-*-linux*) ++ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then ++ enable_esp_ld=yes ++ else ++ enable_esp_ld=no ++ fi ++ ;; ++ *) ++ enable_esp_ld=no ++ ;; ++ esac ++else ++ enable_esp_ld=no ++fi ++if test x$enable_esp_ld = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define ENABLE_ESP 1 ++_ACEOF ++ ++fi ++if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then ++ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5 ++echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;} ++ { (exit 1); exit 1; }; } ++fi ++ ++echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5 ++echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6 ++if test "${enable_crtbeginTS+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++if test x$enable_esp = xyes ; then ++ case "$target" in ++ ia64*-*-linux*) ++ enable_crtbeginTS=no ;; ++ *-*-linux*) ++ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then ++ enable_crtbeginTS=yes ++ fi ++ ;; ++ *) enable_crtbeginTS=no ;; ++ esac ++fi ++ ++fi ++echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5 ++echo "${ECHO_T}$enable_crtbeginTS" >&6 ++ ++if test x$enable_crtbeginTS = xyes; then ++ ++cat >>confdefs.h <<_ACEOF ++#define ENABLE_CRTBEGINTS 1 ++_ACEOF ++ ++fi ++ + # Check if TFmode long double should be used by default or not. + # Some glibc targets used DFmode long double, but with glibc 2.4 + # and later they can use TFmode. +diff -Nur gcc-4.5.0-vanilla/gcc/cp/lang-specs.h gcc-4.5.0/gcc/cp/lang-specs.h +--- gcc-4.5.0-vanilla/gcc/cp/lang-specs.h 2007-08-06 13:10:19.000000000 +0200 ++++ gcc-4.5.0/gcc/cp/lang-specs.h 2010-04-21 15:21:16.684816335 +0200 +@@ -47,7 +47,7 @@ + %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ + cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ + %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2 %{+e1*}\ ++ %(cc1_options) %(esp_options) %2 %{+e1*}\ + %{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {"@c++", +@@ -57,11 +57,11 @@ + %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ + cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ + %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2 %{+e1*}\ ++ %(cc1_options) %(esp_options) %2 %{+e1*}\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".ii", "@c++-cpp-output", 0, 0, 0}, + {"@c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ ++ cc1plus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.5.0-vanilla/gcc/doc/invoke.texi gcc-4.5.0/gcc/doc/invoke.texi +--- gcc-4.5.0-vanilla/gcc/doc/invoke.texi 2010-04-06 16:02:22.000000000 +0200 ++++ gcc-4.5.0/gcc/doc/invoke.texi 2010-04-21 15:21:16.796812184 +0200 +@@ -7856,6 +7856,11 @@ + @opindex fstack-protector-all + Like @option{-fstack-protector} except that all functions are protected. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} ++or @option{-nostdlib} or @option{-nodefaultlibs} or ++@option{-fstack-protector} are found. ++ + @item -fsection-anchors + @opindex fsection-anchors + Try to reduce the number of symbolic address calculations by using +@@ -8705,6 +8710,12 @@ + that were used to generate code (@option{-fpie}, @option{-fPIE}, + or model suboptions) when you specify this option. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} ++are found. ++ + @item -rdynamic + @opindex rdynamic + Pass the flag @option{-export-dynamic} to the ELF linker, on targets +@@ -17251,6 +17262,11 @@ + @code{__pie__} and @code{__PIE__}. The macros have the value 1 + for @option{-fpie} and 2 for @option{-fPIE}. + ++NOTE: When --enable-esp this option is enabled by default ++for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} ++or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or ++@option{-nostartfiles} or @option{-shared} are found. ++ + @item -fno-jump-tables + @opindex fno-jump-tables + Do not use jump tables for switch statements even where it would be +diff -Nur gcc-4.5.0-vanilla/gcc/esp.h gcc-4.5.0/gcc/esp.h +--- gcc-4.5.0-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 ++++ gcc-4.5.0/gcc/esp.h 2010-04-21 15:21:16.622811922 +0200 +@@ -0,0 +1,148 @@ ++/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. ++ * Version 20100409.1 ++ * Magnus Granberg (Zorry) zorry@gentoo.org */ ++#ifndef GCC_ESP_H ++#define GCC_ESP_H ++ ++/* This file will add -fstack-protector, -fPIE, -pie -D_FORTIFY_SOURCES=2 -z,relro and -z,now ++ as default if the defines and the spec allow it. ++ ++ On Gentoo ++ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass ++ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. ++ We use -fstack-protector-all instead of -fstack-protector ++ This will add some unsupported upstream commands options as -nopie. ++ -D__KERNEL__ is added so we don't have -fPIE and -fstack-protector-all when building kernels. ++ ESP_CC1_SPEC is added to CC1_SPEC. ++ -D_FORTIFY_SOURCES=2 is added with gentoo's patchset as default so no need to set it hear. ++ ESP_LINK_SPEC will not add -z,relro as it default on with binutils. ++ ESP_CC1_STRICT_SPEC is added so we don't use gcc/opts.c to disable it. ++ ESP_OPTIONS_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile, -static and -shared. ++ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie. ++*/ ++#ifdef ENABLE_ESP ++ ++ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ ++ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict)" ++ #ifdef HAVE_GCC_SSP ++ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" ++ #else ++ #define ESP_CC1_SSP_SPEC "" ++ #endif ++ #define ESP_CC1_PIE_SPEC "%{!nopie: }" ++ #define ESP_CC1_STRICT_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" ++ ++ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable ++ -z now will be added if we don't have -vanilla spec */ ++ #define ESP_LINK_SPEC "%(esp_link_now)" ++ #define ESP_LINK_NOW_SPEC "%{!now:-z now}" ++ ++ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ ++ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" ++ ++ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c ++ For precompiling headers. */ ++ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" ++ ++ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector ++ -fstack-protector-all and we have TARGET_LIBC_PROVIDES_SSP and HAVE_GCC_SSP defined. */ ++ #ifdef HAVE_GCC_SSP ++ #define ESP_OPTIONS_SSP_SPEC \ ++ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ ++ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" ++ #else ++ #define ESP_OPTIONS_SSP_SPEC "" ++ #endif ++ ++ /* If HAVE_LD_PIE not defined we will not add any -fPIE -pie */ ++ #ifdef HAVE_LD_PIE ++ ++ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ ++ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" ++ ++ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static ++ -nostdlib -nostartfiles. */ ++ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINTS ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" ++ #else ++ #define ESP_OPTIONS_PIE_SPEC \ ++ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ ++ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" ++ #endif ++ ++ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib ++ -nostartfiles */ ++ /* With ENABLE_CRTBEGINTS we don't need to check for -static ++ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ ++ #ifdef ENABLE_CRTBEGINTS ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" ++ #else ++ #define ESP_LINK_PIE_SPEC \ ++ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ ++ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" ++ #endif ++ ++ /* This will check if shared is set when -static -pie -fPIE -fpie -fno-PIC -fno-pic, -pie is set when -static -pg -p -profile. ++ If set it will make gcc print out "-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible" or ++ "-pie and pg|p|profile are incompatible" */ ++ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ ++ #ifdef ENABLE_CRTBEGINTS ++ #define ESP_OPTIONS_PIE_CHECK_SPEC \ ++ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ ++ %{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible}}" ++ #else ++ #define ESP_OPTIONS_PIE_CHECK_SPEC \ ++ "%{shared:%{static|pie|fPIE|fpie|fno-PIC|fno-pic:%e-shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic are incompatible}} \ ++ %{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible}}" ++ #endif ++ ++ /* We don't pass -pie to the linker when -static */ ++ #ifdef ENABLE_CRTBEGINTS ++ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link) " ++ #else ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " ++ #endif ++ ++ #else ++ #define ESP_OPTIONS_PIE_SPEC "" ++ #define ESP_OPTIONS_PIE_CHECK_SPEC "" ++ #define ESP_LINK_PIE_SPEC "" ++ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link) " ++ #endif ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_cc1", ESP_CC1_SPEC }, \ ++ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ ++ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ ++ { "esp_cc1_strict", ESP_CC1_STRICT_SPEC }, \ ++ { "esp_link", ESP_LINK_SPEC }, \ ++ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ ++ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ ++ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ ++ { "esp_options_pie_check", ESP_OPTIONS_PIE_CHECK_SPEC }, \ ++ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } ++ ++ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; ++ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; ++ ++#else /* If not ESP_ENABLE defined do this. */ ++ ++ #define ESP_OPTIONS_SPEC "" ++ #define ESP_CPP_OPTIONS_SPEC "" ++ ++ /* We add extra spec name's to the EXTRA_SPECS list */ ++ #define ESP_EXTRA_SPECS \ ++ { "esp_options", ESP_OPTIONS_SPEC }, \ ++ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } ++ ++#endif ++#endif /* End GCC_ESP_H */ +diff -Nur gcc-4.5.0-vanilla/gcc/gcc.c gcc-4.5.0/gcc/gcc.c +--- gcc-4.5.0-vanilla/gcc/gcc.c 2010-02-11 13:23:08.000000000 +0100 ++++ gcc-4.5.0/gcc/gcc.c 2010-04-21 15:21:16.589812777 +0200 +@@ -84,6 +84,7 @@ + #include "gcc.h" + #include "flags.h" + #include "opts.h" ++#include "esp.h" /* for --enable-esp support */ + + #ifdef HAVE_MMAP_FILE + # include <sys/mman.h> +@@ -822,7 +823,9 @@ + + static const char *asm_debug; + static const char *cpp_spec = CPP_SPEC; ++#ifndef ENABLE_ESP + static const char *cc1_spec = CC1_SPEC; ++#endif + static const char *cc1plus_spec = CC1PLUS_SPEC; + static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; + static const char *link_ssp_spec = LINK_SSP_SPEC; +@@ -885,7 +888,7 @@ + static const char *cpp_options = + "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ + %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ +- %{undef} %{save-temps*:-fpch-preprocess}"; ++ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; + + /* This contains cpp options which are not passed when the preprocessor + output will be used by another program. */ +@@ -893,6 +896,9 @@ + + /* NB: This is shared amongst all front-ends, except for Ada. */ + static const char *cc1_options = ++#ifdef ENABLE_ESP ++"%(esp_options_pie_check)" ++#endif + "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ + %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\ + %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \ +@@ -1075,15 +1081,15 @@ + %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ + %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ + cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ +- %(cc1_options)}\ ++ %(cc1_options) %(esp_options)}\ + %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ +- cc1 %(cpp_unique_options) %(cc1_options)}}}\ ++ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ + %{!fsyntax-only:%(invoke_as)}} \ + %{combine:\ + %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ + %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\ + %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ +- cc1 %(cpp_unique_options) %(cc1_options)}}\ ++ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}\ + %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1}, + {"-", + "%{!E:%e-E or -x required when input is from standard input}\ +@@ -1106,7 +1112,7 @@ + %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0}, + {".i", "@cpp-output", 0, 1, 0}, + {"@cpp-output", +- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, ++ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, + {".s", "@assembler", 0, 1, 0}, + {"@assembler", + "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0}, +@@ -1699,18 +1705,23 @@ + INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), + }; + +-#ifdef EXTRA_SPECS /* additional specs needed */ ++/* EXTRA_SPECS needs to be defined */ ++#ifndef EXTRA_SPECS ++#define EXTRA_SPECS ++#endif ++ ++/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ + /* Structure to keep track of just the first two args of a spec_list. +- That is all that the EXTRA_SPECS macro gives us. */ ++ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ + struct spec_list_1 + { + const char *const name; + const char *const ptr; + }; + +-static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; ++/* ESP_EXTRA_SPECS before EXTRA_SPECS */ ++static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; + static struct spec_list *extra_specs = (struct spec_list *) 0; +-#endif + + /* List of dynamically allocates specs that have been defined so far. */ + +@@ -1798,7 +1809,6 @@ + if (verbose_flag) + notice ("Using built-in specs.\n"); + +-#ifdef EXTRA_SPECS + extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); + + for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) +@@ -1811,7 +1821,6 @@ + sl->ptr_spec = &sl->ptr; + next = sl; + } +-#endif + + for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) + { +@@ -7111,6 +7120,12 @@ + gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, + spec_version, dir_separator_str, NULL); + ++#ifdef ENABLE_ESP ++ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end ++ of the command line. */ ++ do_self_spec (esp_command_options_spec); ++#endif ++ + /* Now we have the specs. + Set the `valid' bits for switches that match anything in any spec. */ + +diff -Nur gcc-4.5.0-vanilla/gcc/Makefile.in gcc-4.5.0/gcc/Makefile.in +--- gcc-4.5.0-vanilla/gcc/Makefile.in 2010-04-02 09:49:06.000000000 +0200 ++++ gcc-4.5.0/gcc/Makefile.in 2010-04-21 15:21:10.033812913 +0200 +@@ -636,13 +636,24 @@ + INHIBIT_LIBC_CFLAGS = -Dinhibit_libc + endif + ++# We don't want __stack_chk_fail in crt* and libgcc2.a. ++# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE. ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOPIE_CFLAGS = -fno-PIE ++ESP_NOSSP_CFLAGS = -fno-stack-protector ++else ++ESP_NOPIE_CFLAGS= ++ESP_NOSSP_CFLAGS= ++endif ++ + # Options to use when compiling libgcc2.a. + # + LIBGCC2_DEBUG_CFLAGS = -g + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ + $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \ + -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ +- $(INHIBIT_LIBC_CFLAGS) ++ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) + + # Additional options to use when compiling libgcc2.a. + # Some targets override this to -isystem include +@@ -655,7 +666,7 @@ + CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline -fno-exceptions \ + -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ +- $(INHIBIT_LIBC_CFLAGS) ++ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) + + # Additional sources to handle exceptions; overridden by targets as needed. + LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ +@@ -685,6 +696,12 @@ + # The rules for compiling them should be in the t-* file for the machine. + EXTRA_PARTS = @extra_parts@ + ++# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes ++enable_crtbeginTS = @enable_crtbeginTS@ ++ifeq ($(enable_crtbeginTS),yes) ++EXTRA_PARTS += crtbeginTS.o ++endif ++ + # List of extra object files that should be compiled and linked with + # compiler proper (cc1, cc1obj, cc1plus). + EXTRA_OBJS = @extra_objs@ +@@ -1863,9 +1880,10 @@ + echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars + echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars + echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars +- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars ++ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars + echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars + echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars ++ echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars + + mv tmp-libgcc.mvars libgcc.mvars + +@@ -1899,12 +1917,14 @@ + $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ + gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) + $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ ++ $(ESP_NOPIE_CFLAGS) \ + -c $(srcdir)/crtstuff.c -DCRT_BEGIN \ + -o $(T)crtbegin$(objext) + + $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ + gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) + $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ ++ $(ESP_NOPIE_CFLAGS) \ + -c $(srcdir)/crtstuff.c -DCRT_END \ + -o $(T)crtend$(objext) + +@@ -1925,9 +1945,19 @@ + $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ + gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) + $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ ++ $(ESP_NOPIE_CFLAGS) \ + -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ + -o $(T)crtbeginT$(objext) + ++# This is a version of crtbegin for -static -fPIE links if esp is enable. ++ifeq ($(enable_crtbeginTS),yes) ++$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ ++ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) ++ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ ++ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ ++ -o $(T)crtbeginTS$(objext) ++endif ++ + # Compile the start modules crt0.o and mcrt0.o that are linked with + # every program + $(T)crt0.o: s-crt0 ; @true +diff -Nur gcc-4.5.0-vanilla/gcc/objc/lang-specs.h gcc-4.5.0/gcc/objc/lang-specs.h +--- gcc-4.5.0-vanilla/gcc/objc/lang-specs.h 2007-08-02 12:37:36.000000000 +0200 ++++ gcc-4.5.0/gcc/objc/lang-specs.h 2010-04-21 15:21:16.702913793 +0200 +@@ -30,13 +30,13 @@ + %{traditional|ftraditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ +- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ ++ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ + %{!save-temps:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {".mi", "@objc-cpp-output", 0, 0, 0}, + {"@objc-cpp-output", +- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objective-c-header", + "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ +@@ -45,10 +45,10 @@ + %{traditional|ftraditional|traditional-cpp:\ + %eGNU Objective C no longer supports traditional compilation}\ + %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ +- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj -fpreprocessed %b.mi %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}\ + %{!save-temps:%{!no-integrated-cpp:\ +- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ ++ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ + -o %g.s %{!o*:--output-pch=%i.gch}\ + %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, +diff -Nur gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h gcc-4.5.0/gcc/objcp/lang-specs.h +--- gcc-4.5.0-vanilla/gcc/objcp/lang-specs.h 2007-08-02 12:38:44.000000000 +0200 ++++ gcc-4.5.0/gcc/objcp/lang-specs.h 2010-04-21 15:21:16.708817730 +0200 +@@ -36,7 +36,7 @@ + %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ + cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ + %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2 %{+e1*}\ ++ %(cc1_options) %(esp_options) %2 %{+e1*}\ + -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {"@objective-c++", +@@ -46,15 +46,15 @@ + %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ + cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ + %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ +- %(cc1_options) %2 %{+e1*}\ ++ %(cc1_options) %(esp_options) %2 %{+e1*}\ + %{!fsyntax-only:%(invoke_as)}}}}", + CPLUSPLUS_CPP_SPEC, 0, 0}, + {".mii", "@objective-c++-cpp-output", 0, 0, 0}, + {"@objective-c++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, + {"@objc++-cpp-output", + "%{!M:%{!MM:%{!E:\ +- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ ++ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ + %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, +diff -Nur gcc-4.5.0-vanilla/gcc/varasm.c gcc-4.5.0/gcc/varasm.c +--- gcc-4.5.0-vanilla/gcc/varasm.c 2010-03-27 12:56:30.000000000 +0100 ++++ gcc-4.5.0/gcc/varasm.c 2010-04-21 15:21:16.606812404 +0200 +@@ -5961,7 +5961,11 @@ + bool is_local; + + is_local = targetm.binds_local_p (decl); +- if (!flag_shlib) ++ #ifdef ENABLE_ESP ++ if (!flag_pic) ++ #else ++ if (!flag_shlib) ++ #endif + { + if (is_local) + kind = TLS_MODEL_LOCAL_EXEC; +diff -Nur gcc-4.5.0-vanilla/libgcc/Makefile.in gcc-4.5.0/libgcc/Makefile.in +--- gcc-4.5.0-vanilla/libgcc/Makefile.in 2010-03-30 15:08:52.000000000 +0200 ++++ gcc-4.5.0/libgcc/Makefile.in 2010-04-21 15:21:10.824811514 +0200 +@@ -291,6 +291,12 @@ + gen-hide-list = echo > $@ + endif + ++# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes ++enable_libgcc_crtbeginTS = $(enable_crtbeginTS) ++ifeq ($(enable_libgcc_crtbeginTS),yes) ++EXTRA_PARTS += crtbeginTS.o ++endif ++ + ifneq ($(EXTRA_PARTS),) + extra-parts = libgcc-extra-parts + INSTALL_PARTS = $(EXTRA_PARTS) +@@ -842,6 +848,13 @@ + crtbeginT.o: $(gcc_srcdir)/crtstuff.c + $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ + -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O ++ ++# This is a version of crtbegin for -static -fPIE links. ++ifeq ($(enable_libgcc_crtbeginTS),yes) ++crtbeginTS.o: $(gcc_srcdir)/crtstuff.c ++ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ ++ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O ++endif + endif + + # Build extra startfiles in the libgcc directory. +diff -Nur gcc-4.5.0-vanilla/libmudflap/configure gcc-4.5.0/libmudflap/configure +--- gcc-4.5.0-vanilla/libmudflap/configure 2009-12-05 18:18:53.000000000 +0100 ++++ gcc-4.5.0/libmudflap/configure 2010-04-21 15:21:09.843811773 +0200 +@@ -652,6 +652,7 @@ + MAINTAINER_MODE_FALSE + MAINTAINER_MODE_TRUE + am__untar ++enable_esp + am__tar + AMTAR + am__leading_dot +diff -Nur gcc-4.5.0-vanilla/libmudflap/Makefile.in gcc-4.5.0/libmudflap/Makefile.in +--- gcc-4.5.0-vanilla/libmudflap/Makefile.in 2010-04-02 20:18:06.000000000 +0200 ++++ gcc-4.5.0/libmudflap/Makefile.in 2010-04-21 15:21:10.844815108 +0200 +@@ -304,10 +304,18 @@ + MAINT_CHARSET = latin1 + SUBDIRS = testsuite + ++# Some stuff don't compile with PIE or SSP ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE ++else ++NO_ESP_CFLAGS = ++endif ++ + # May be used by various substitution variables. + gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) +-AM_CFLAGS = -Wall $(SECTION_FLAGS) +-@LIBMUDFLAPTH_FALSE@libmudflapth = ++AM_CFLAGS = -Wall $(SECTION_FLAGS) $(NO_ESP_CFLAGS) ++@LIBMUDFLAPTH_FALSE@libmudflapth = + @LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la + toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth) + libsubincludedir = $(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include +diff -Nur gcc-4.5.0-vanilla/Makefile.in gcc-4.5.0/Makefile.in +--- gcc-4.5.0-vanilla/Makefile.in 2010-02-17 12:01:44.000000000 +0100 ++++ gcc-4.5.0/Makefile.in 2010-04-21 15:21:10.022812548 +0200 +@@ -350,9 +350,17 @@ + BUILD_PREFIX = @BUILD_PREFIX@ + BUILD_PREFIX_1 = @BUILD_PREFIX_1@ + ++# Some stuff don't compile with SSP ++enable_esp = @enable_esp@ ++ifeq ($(enable_esp),yes) ++ESP_NOSSP_CFLAGS = -fno-stack-protector ++else ++ESP_NOSSP_CFLAGS= ++endif ++ + # Flags to pass to stage2 and later makes. They are defined + # here so that they can be overridden by Makefile fragments. +-BOOT_CFLAGS= -g -O2 ++BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) + BOOT_LDFLAGS= + BOOT_ADAFLAGS=-gnatpg -gnata + +@@ -397,9 +405,9 @@ + + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-LIBCFLAGS = $(CFLAGS) ++LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) + CXXFLAGS = @CXXFLAGS@ +-LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates ++LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) + + TFLAGS = + diff --git a/pkgs/core/gcc/patches/gcc-4.5.1-esp-20101030.patch b/pkgs/core/gcc/patches/gcc-4.5.1-esp-20101030.patch deleted file mode 100644 index d9c0daa..0000000 --- a/pkgs/core/gcc/patches/gcc-4.5.1-esp-20101030.patch +++ /dev/null @@ -1,876 +0,0 @@ -diff -Nur gcc-4.5.1-vanilla/configure gcc-4.5.1/configure ---- gcc-4.5.1-vanilla/configure 2010-06-24 23:06:37.000000000 +0200 -+++ gcc-4.5.1/configure 2010-10-30 15:13:15.694229807 +0200 -@@ -707,6 +707,7 @@ - CFLAGS - CC - target_subdir -+enable_esp - host_subdir - build_subdir - build_libsubdir -@@ -1485,6 +1486,11 @@ - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-gold use gold instead of ld - --enable-libada build libada directory -+ --enable-esp -+ Enable Stack protector, Position independent executable as -+ default if we have suppot for it when compiling -+ and link with -z relro and -z now as default. -+ Linux targets supported i*86, x86_64, powerpc, powerpc64, ia64 and arm - --enable-libssp build libssp directory - --enable-build-with-cxx build with C++ compiler instead of C compiler - --disable-ppl-version-check disable check for PPL version -@@ -3164,6 +3170,25 @@ - noconfigdirs="$noconfigdirs gnattools" - fi - -+# Check whether --enable-esp was given and target have the support. -+# Check whether --enable-esp or --disable-esp was given. -+if test "${enable_esp+set}" = set; then -+ enableval="$enable_esp" -+ -+ case $target in -+ i?86*-*-linux* | x86_64*-*-linux* | powerpc-*-linux* | powerpc64-*-linux* | arm*-*-linux* | ia64-*-linux*) -+ enable_esp=yes -+ ;; -+ *) -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported on this $target target." >&5 -+echo "$as_me: error: *** --enable-esp is not supported on this $target target." >&2;} -+ { (exit 1); exit 1; }; } -+ ;; -+ esac -+ -+fi; -+ -+ - # Check whether --enable-libssp was given. - if test "${enable_libssp+set}" = set; then : - enableval=$enable_libssp; ENABLE_LIBSSP=$enableval -@@ -14354,6 +14379,9 @@ - *) stage1_cflags="-g -J" ;; - esac ;; - esac -+if test x$enable_esp = xyes; then -+ stage1_cflags="$stage1_cflags -fno-stack-protector" -+fi - - # This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. - if test "$GCC" = yes -a "$ENABLE_BUILD_WITH_CXX" != yes; then -diff -Nur gcc-4.5.1-vanilla/gcc/config/linux.h gcc-4.5.1/gcc/config/linux.h ---- gcc-4.5.1-vanilla/gcc/config/linux.h 2009-04-09 17:00:19.000000000 +0200 -+++ gcc-4.5.1/gcc/config/linux.h 2010-10-30 15:13:15.845989169 +0200 -@@ -43,7 +43,11 @@ - object constructed before entering `main'. */ - - #undef STARTFILE_SPEC --#if defined HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_SPEC \ -+ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crti.o%s \ -+ %{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -diff -Nur gcc-4.5.1-vanilla/gcc/config/rs6000/linux64.h gcc-4.5.1/gcc/config/rs6000/linux64.h ---- gcc-4.5.1-vanilla/gcc/config/rs6000/linux64.h 2010-03-17 05:44:37.000000000 +0100 -+++ gcc-4.5.1/gcc/config/rs6000/linux64.h 2010-10-30 15:13:15.843989710 +0200 -@@ -162,7 +162,7 @@ - #endif - - #define ASM_SPEC32 "-a32 %{n} %{T} %{Ym,*} %{Yd,*} \ --%{mrelocatable} %{mrelocatable-lib} %{fpic:-K PIC} %{fPIC:-K PIC} \ -+%{mrelocatable} %{mrelocatable-lib} %{fpic|fPIC|fpie|fPIE:-K PIC} \ - %{memb} %{!memb: %{msdata=eabi: -memb}} \ - %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ - %{mcall-freebsd: -mbig} \ -diff -Nur gcc-4.5.1-vanilla/gcc/config/rs6000/sysv4.h gcc-4.5.1/gcc/config/rs6000/sysv4.h ---- gcc-4.5.1-vanilla/gcc/config/rs6000/sysv4.h 2009-11-25 21:23:20.000000000 +0100 -+++ gcc-4.5.1/gcc/config/rs6000/sysv4.h 2010-10-30 15:13:15.846988480 +0200 -@@ -883,7 +883,12 @@ - %{!mnewlib: %{pthread:-lpthread} %{shared:-lc} \ - %{!shared: %{profile:-lc_p} %{!profile:-lc}}}" - --#ifdef HAVE_LD_PIE -+#if defined (HAVE_LD_PIE) && defined (ENABLE_CRTBEGINTS) -+#define STARTFILE_LINUX_SPEC "\ -+%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ -+%{mnewlib:ecrti.o%s;:crti.o%s} \ -+%{static:%{pie:crtbeginTS.o%s;:crtbeginT.o%s}} %{!static:%{shared|pie:crtbeginS.o%s;:crtbegin.o%s}}" -+#elif defined (HAVE_LD_PIE) && ! defined (ENABLE_CRTBEGINTS) - #define STARTFILE_LINUX_SPEC "\ - %{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - %{mnewlib:ecrti.o%s;:crti.o%s} \ -diff -Nur gcc-4.5.1-vanilla/gcc/config.in gcc-4.5.1/gcc/config.in ---- gcc-4.5.1-vanilla/gcc/config.in 2010-07-31 11:34:58.000000000 +0200 -+++ gcc-4.5.1/gcc/config.in 2010-10-30 15:13:15.784230669 +0200 -@@ -52,6 +52,12 @@ - #endif - - -+/* Define to 1 to enable crtbeginTS.o. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_CRTBEGINTS -+#endif -+ -+ - /* Define to 1 to specify that we are using the BID decimal floating point - format instead of DPD */ - #ifndef USED_FOR_TARGET -@@ -71,6 +77,12 @@ - #endif - - -+/* Define to 1 to enable esp. */ -+#ifndef USED_FOR_TARGET -+#undef ENABLE_ESP -+#endif -+ -+ - /* Define to 1 to enable fixed-point arithmetic extension to C. */ - #ifndef USED_FOR_TARGET - #undef ENABLE_FIXED_POINT -diff -Nur gcc-4.5.1-vanilla/gcc/configure gcc-4.5.1/gcc/configure ---- gcc-4.5.1-vanilla/gcc/configure 2010-06-14 12:38:18.000000000 +0200 -+++ gcc-4.5.1/gcc/configure 2010-10-30 15:13:15.707229526 +0200 -@@ -680,6 +680,8 @@ - HOST_LIBS - GGC - libgcc_visibility -+enable_esp -+enable_crtbeginTS - gcc_cv_readelf - gcc_cv_objdump - ORIGINAL_NM_FOR_TARGET -@@ -24831,6 +24833,50 @@ - ;; - esac - -+echo "$as_me:$LINENO: checking linker -z now support" >&5 -+echo $ECHO_N "checking linker -z now support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_now+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_now=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_now=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z now options -+ if $gcc_cv_ld --help 2>/dev/null | grep now > /dev/null; then -+ gcc_cv_ld_now=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_now" >&5 -+echo "${ECHO_T}$gcc_cv_ld_now" >&6 -+ -+echo "$as_me:$LINENO: checking linker -z relro support" >&5 -+echo $ECHO_N "checking linker -z relro support... $ECHO_C" >&6 -+if test "${gcc_cv_ld_relro+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ gcc_cv_ld_relro=no -+if test $in_tree_ld = yes ; then -+ if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \ -+ && test $in_tree_ld_is_elf = yes; then -+ gcc_cv_ld_relro=yes -+ fi -+elif test x$gcc_cv_ld != x; then -+ # Check if linker supports -z relro and -z norelro options -+ if $gcc_cv_ld --help 2>/dev/null | grep relro > /dev/null; then -+ gcc_cv_ld_relro=yes -+ fi -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $gcc_cv_ld_relro" >&5 -+echo "${ECHO_T}$gcc_cv_ld_relro" >&6 -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker --build-id support" >&5 - $as_echo_n "checking linker --build-id support... " >&6; } - if test "${gcc_cv_ld_buildid+set}" = set; then : -@@ -25014,6 +25060,74 @@ - - fi - -+if test x$enable_esp = xyes ; then -+case $target in -+ ia64*-*-linux*) -+ if test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_relro = xyes && test x$gcc_cv_ld_now = xyes; then -+ enable_esp_ld=yes -+ else -+ enable_esp_ld=no -+ fi -+ ;; -+ *) -+ enable_esp_ld=no -+ ;; -+ esac -+else -+ enable_espf_ld=no -+fi -+if test x$enable_esp_ld = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_ESP 1 -+_ACEOF -+ -+fi -+ -+if test x$enable_esp = xyes && test x$enable_esp_ld = xno; then -+ { { echo "$as_me:$LINENO: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&5 -+echo "$as_me: error: *** --enable-esp is not supported. You don't have -z,relro or -z,now support in the linker." >&2;} -+ { (exit 1); exit 1; }; } -+fi -+ -+echo "$as_me:$LINENO: checking for crtbeginTS.o support" >&5 -+echo $ECHO_N "checking for crtbeginTS.o support... $ECHO_C" >&6 -+if test "${enable_crtbeginTS+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ -+if test x$enable_esp = xyes ; then -+ case "$target" in -+ ia64*-*-linux*) -+ enable_crtbeginTS=no ;; -+ *-*-linux*) -+ if test x$gcc_cv_ld_pie = xyes && test x$lt_cv_prog_compiler_static_works = xyes; then -+ enable_crtbeginTS=yes -+ fi -+ ;; -+ *) enable_crtbeginTS=no ;; -+ esac -+fi -+ -+fi -+echo "$as_me:$LINENO: result: $enable_crtbeginTS" >&5 -+echo "${ECHO_T}$enable_crtbeginTS" >&6 -+ -+if test x$enable_crtbeginTS = xyes; then -+ -+cat >>confdefs.h <<_ACEOF -+#define ENABLE_CRTBEGINTS 1 -+_ACEOF -+ -+fi -+ - # Check if TFmode long double should be used by default or not. - # Some glibc targets used DFmode long double, but with glibc 2.4 - # and later they can use TFmode. -diff -Nur gcc-4.5.1-vanilla/gcc/cp/lang-specs.h gcc-4.5.1/gcc/cp/lang-specs.h ---- gcc-4.5.1-vanilla/gcc/cp/lang-specs.h 2007-08-06 13:10:19.000000000 +0200 -+++ gcc-4.5.1/gcc/cp/lang-specs.h 2010-10-30 15:13:15.849979777 +0200 -@@ -47,7 +47,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@c++", -@@ -57,11 +57,11 @@ - %(cpp_options) %2 -o %{save-temps:%b.ii} %{!save-temps:%g.ii} \n}\ - cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".ii", "@c++-cpp-output", 0, 0, 0}, - {"@c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1plus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1plus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.1-vanilla/gcc/doc/invoke.texi gcc-4.5.1/gcc/doc/invoke.texi ---- gcc-4.5.1-vanilla/gcc/doc/invoke.texi 2010-04-06 16:02:22.000000000 +0200 -+++ gcc-4.5.1/gcc/doc/invoke.texi 2010-10-30 15:13:15.864979490 +0200 -@@ -7856,6 +7856,11 @@ - @opindex fstack-protector-all - Like @option{-fstack-protector} except that all functions are protected. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-stack-protector} -+or @option{-nostdlib} or @option{-nodefaultlibs} or -+@option{-fstack-protector} are found. -+ - @item -fsection-anchors - @opindex fsection-anchors - Try to reduce the number of symbolic address calculations by using -@@ -8705,6 +8710,12 @@ - that were used to generate code (@option{-fpie}, @option{-fPIE}, - or model suboptions) when you specify this option. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} or @option{-pg} or @option{-p} -+are found. -+ - @item -rdynamic - @opindex rdynamic - Pass the flag @option{-export-dynamic} to the ELF linker, on targets -@@ -17251,6 +17262,11 @@ - @code{__pie__} and @code{__PIE__}. The macros have the value 1 - for @option{-fpie} and 2 for @option{-fPIE}. - -+NOTE: When --enable-esp this option is enabled by default -+for C, C++, ObjC, ObjC++, if neither @option{-fno-pie} or @option{-fno-PIE} -+or @option{-fno-pic} or @option{-fno-PIC} or @option{-nostdlib} or -+@option{-nostartfiles} or @option{-shared} are found. -+ - @item -fno-jump-tables - @opindex fno-jump-tables - Do not use jump tables for switch statements even where it would be -diff -Nur gcc-4.5.1-vanilla/gcc/esp.h gcc-4.5.1/gcc/esp.h ---- gcc-4.5.1-vanilla/gcc/esp.h 1970-01-01 01:00:00.000000000 +0100 -+++ gcc-4.5.1/gcc/esp.h 2010-10-30 15:13:15.841979565 +0200 -@@ -0,0 +1,145 @@ -+/* License terms see GNU GENERAL PUBLIC LICENSE Version 3. -+ * Version 20100527.1 -+ * Magnus Granberg (Zorry) zorry@gentoo.org */ -+#ifndef GCC_ESP_H -+#define GCC_ESP_H -+ -+/* This file will add -fstack-protector-all, -fPIE, -pie and -z now -+ as default if the defines and the spec allow it. -+ Added a hack for gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass -+ to support older hardened GCC patches and we don't need to change the code on gcc-specs-* and _filter-hardened. -+ This will add some unsupported upstream commands options as -nopie and -nonow. -+ -D__KERNEL__ is added so we don't have -fPIE, -pie and -fstack-protector-all when building kernels. -+ ESP_CC1_SPEC is added to CC1_SPEC. -+ ESP_CC1_STRICT_OVERFLOW_SPEC is added so we don't disable the strict-overflow check. -+ ESP_LINK_PIE_CHECK_SPEC check for -pie, -p, -pg, -profile and -static. -+ ENABLE_CRTBEGINTS add support for crtbeginTS.o, build -static with -fPIE or -fpie. -+*/ -+#ifdef ENABLE_ESP -+ -+ /* Hack to support gcc-specs-* in toolchain-funcs.eclass and _filter-hardened in flag-o-matic.eclass */ -+ #define ESP_CC1_SPEC " %(esp_cc1_ssp) %(esp_cc1_pie) %(esp_cc1_strict_overflow)" -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_SSP_SPEC "%{!fno-stack-protector: %{!fno-stack-protector-all: }}" -+ #else -+ #define ESP_CC1_SSP_SPEC "" -+ #endif -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_CC1_PIE_SPEC "%{!nopie: }" -+ #else -+ #define ESP_CC1_PIE_SPEC "" -+ #endif -+ #define ESP_CC1_STRICT_OVERFLOW_SPEC "%{!fstrict-overflow:%{!fno-strict-overflow: -fno-strict-overflow}}" -+ -+ /* ESP_LINK_SPEC is added to LINK_PIE_SPEC if esp is enable -+ -z now will be added if we don't have -vanilla spec. We do a -pie incompatible check -+ Don't remove the specs in the end */ -+ #define ESP_LINK_SPEC "%(esp_link_now) %(esp_link_pie_check) " -+ #define ESP_LINK_NOW_SPEC "%{!nonow:-z now}" -+ -+ /* We use ESP_COMMAND_OPTIONS_SPEC to add pie command-line options. */ -+ #define ESP_COMMAND_OPTIONS_SPEC "%{!D__KERNEL__:%{!nopie:%(esp_options_pie) %(esp_link_pie)}}" -+ -+ /* ESP_OPTIONS_SPEC is added to the compiler spec in gcc/gcc.c */ -+ #define ESP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* ESP_CPP_OPTIONS_SPEC is added to the cpp_options spec in gcc/gcc.c -+ For precompiling headers. */ -+ #define ESP_CPP_OPTIONS_SPEC "%(esp_options_ssp)" -+ -+ /* This will add -fstack-protector-all if we don't have -nostdlib -nodefaultlibs -fno-stack-protector -fstack-protector -+ -fstack-protector-all and we have EFAULT_SSP or EFAULT_PIE_SSP defined. */ -+ #if defined ( EFAULT_SSP ) || defined ( EFAULT_PIE_SSP ) -+ #define ESP_OPTIONS_SSP_SPEC \ -+ "%{!D__KERNEL__:%{!nostdlib:%{!nodefaultlibs: %{!fno-stack-protector: \ -+ %{!fstack-protector:%{!fstack-protector-all:-fstack-protector-all}}}}}}" -+ #else -+ #define ESP_OPTIONS_SSP_SPEC "" -+ #endif -+ -+ /* If EFAULT_PIE or EFAULT_PIE_SSP is defined we will add -fPIE -pie */ -+ #if defined ( EFAULT_PIE ) || defined ( EFAULT_PIE_SSP ) -+ -+ /* This will add -fPIE if we don't have -pie -fpic -fPIC -fpie -fPIE -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -+ -nostdlib -nostartfiles. */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }" -+ #else -+ #define ESP_OPTIONS_PIE_SPEC \ -+ "%{!pie: %{!fpic:%{!fPIC:%{!fpie:%{!fPIE: %{!fno-pic:%{!fno-PIC:%{!fno-pie:%{!fno-PIE: \ -+ %{!shared: %{!static: %{!nostdlib: %{!nostartfiles:-fPIE}} } }}}} }}}} }}" -+ #endif -+ -+ /* This will add -pie if we don't have -pie -A -fno-pic -fno-PIC -fno-pie -fno-PIE -shared -static -r -nostdlib -+ -nostartfiles */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static -+ and we add -pie only to get the start and endfiles. -pie will not go to the linker. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}" -+ #else -+ #define ESP_LINK_PIE_SPEC \ -+ "%{!pie:%{!A:%{!fno-pie:%{!fno-PIE:%{!fno-pic:%{!fno-PIC:%{!shared:%{!static:%{!r: \ -+ %{!nostdlib:%{!nostartfiles:-pie}}}}}}}}}}}" -+ #endif -+ -+ /* This will check if -pie is set when (-static) -pg -p -profile. If set it will make gcc print out -+ "-pie and (static)|pg|p|profile are incompatible when linking" */ -+ /* With ENABLE_CRTBEGINTS we don't need to check for -static */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{pg|p|profile:%e-pie and -pg|p|profile are incompatible when linking}}" -+ #else -+ #define ESP_LINK_PIE_CHECK_SPEC \ -+ "%{pie:%{static|pg|p|profile:%e-pie and -static|pg|p|profile are incompatible when linking}}" -+ #endif -+ -+ /* We don't pass -pie to the linker when -static. */ -+ #ifdef ENABLE_CRTBEGINTS -+ #define LINK_PIE_SPEC "%{!static:%{pie:-pie}} %(esp_link)" -+ #else -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ #else -+ #define ESP_OPTIONS_PIE_SPEC "" -+ #define ESP_LINK_PIE_CHECK_SPEC "" -+ #define ESP_LINK_PIE_SPEC "" -+ #define LINK_PIE_SPEC "%{pie:-pie} %(esp_link)" -+ #endif -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_cc1", ESP_CC1_SPEC }, \ -+ { "esp_cc1_pie", ESP_CC1_PIE_SPEC }, \ -+ { "esp_cc1_ssp", ESP_CC1_SSP_SPEC }, \ -+ { "esp_cc1_strict_overflow", ESP_CC1_STRICT_OVERFLOW_SPEC }, \ -+ { "esp_link", ESP_LINK_SPEC }, \ -+ { "esp_link_now", ESP_LINK_NOW_SPEC }, \ -+ { "esp_link_pie", ESP_LINK_PIE_SPEC }, \ -+ { "esp_link_pie_check", ESP_LINK_PIE_CHECK_SPEC }, \ -+ { "esp_command_options", ESP_COMMAND_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC }, \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_options_pie", ESP_OPTIONS_PIE_SPEC }, \ -+ { "esp_options_ssp", ESP_OPTIONS_SSP_SPEC } -+ -+ static const char *esp_command_options_spec = ESP_COMMAND_OPTIONS_SPEC; -+ static const char *cc1_spec = CC1_SPEC ESP_CC1_SPEC; -+ -+#else /* If not ESP_ENABLE defined do this. */ -+ -+ #define ESP_OPTIONS_SPEC "" -+ #define ESP_CPP_OPTIONS_SPEC "" -+ -+ /* We add extra spec name's to the EXTRA_SPECS list */ -+ #define ESP_EXTRA_SPECS \ -+ { "esp_options", ESP_OPTIONS_SPEC }, \ -+ { "esp_cpp_options", ESP_CPP_OPTIONS_SPEC } -+ -+#endif -+#endif /* End GCC_ESP_H */ -diff -Nur gcc-4.5.1-vanilla/gcc/gcc.c gcc-4.5.1/gcc/gcc.c ---- gcc-4.5.1-vanilla/gcc/gcc.c 2010-04-18 19:46:08.000000000 +0200 -+++ gcc-4.5.1/gcc/gcc.c 2010-10-30 15:13:15.834979921 +0200 -@@ -84,6 +84,7 @@ - #include "gcc.h" - #include "flags.h" - #include "opts.h" -+#include "esp.h" /* for --enable-esp support */ - - #ifdef HAVE_MMAP_FILE - # include <sys/mman.h> -@@ -822,7 +823,9 @@ - - static const char *asm_debug; - static const char *cpp_spec = CPP_SPEC; -+#ifndef ENABLE_ESP - static const char *cc1_spec = CC1_SPEC; -+#endif - static const char *cc1plus_spec = CC1PLUS_SPEC; - static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; - static const char *link_ssp_spec = LINK_SSP_SPEC; -@@ -885,7 +888,7 @@ - static const char *cpp_options = - "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ - %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\ -- %{undef} %{save-temps*:-fpch-preprocess}"; -+ %{undef} %{save-temps*:-fpch-preprocess} %(esp_cpp_options)"; - - /* This contains cpp options which are not passed when the preprocessor - output will be used by another program. */ -@@ -1075,15 +1078,15 @@ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\ - cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \ -- %(cc1_options)}\ -+ %(cc1_options) %(esp_options)}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}}\ - %{!fsyntax-only:%(invoke_as)}} \ - %{combine:\ - %{save-temps*|traditional-cpp|no-integrated-cpp:%(trad_capable_cpp) \ - %(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i}}\ - %{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\ -- cc1 %(cpp_unique_options) %(cc1_options)}}\ -+ cc1 %(cpp_unique_options) %(cc1_options) %(esp_options)}}\ - %{!fsyntax-only:%(invoke_as)}}}}}}", 0, 1, 1}, - {"-", - "%{!E:%e-E or -x required when input is from standard input}\ -@@ -1106,7 +1109,7 @@ - %W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0}, - {".i", "@cpp-output", 0, 1, 0}, - {"@cpp-output", -- "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, -+ "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %(esp_options) %{!fsyntax-only:%(invoke_as)}}}}", 0, 1, 0}, - {".s", "@assembler", 0, 1, 0}, - {"@assembler", - "%{!M:%{!MM:%{!E:%{!S:as %(asm_debug) %(asm_options) %i %A }}}}", 0, 1, 0}, -@@ -1699,18 +1702,23 @@ - INIT_STATIC_SPEC ("sysroot_hdrs_suffix_spec", &sysroot_hdrs_suffix_spec), - }; - --#ifdef EXTRA_SPECS /* additional specs needed */ -+/* EXTRA_SPECS needs to be defined */ -+#ifndef EXTRA_SPECS -+#define EXTRA_SPECS -+#endif -+ -+/* EXTRA_SPECS and ESP_EXTRA_SPECS add additional specs */ - /* Structure to keep track of just the first two args of a spec_list. -- That is all that the EXTRA_SPECS macro gives us. */ -+ That is all that the EXTRA_SPECS and ESP_EXTRA_SPECS macro gives us. */ - struct spec_list_1 - { - const char *const name; - const char *const ptr; - }; - --static const struct spec_list_1 extra_specs_1[] = { EXTRA_SPECS }; -+/* ESP_EXTRA_SPECS before EXTRA_SPECS */ -+static const struct spec_list_1 extra_specs_1[] = { ESP_EXTRA_SPECS, EXTRA_SPECS }; - static struct spec_list *extra_specs = (struct spec_list *) 0; --#endif - - /* List of dynamically allocates specs that have been defined so far. */ - -@@ -1798,7 +1806,6 @@ - if (verbose_flag) - notice ("Using built-in specs.\n"); - --#ifdef EXTRA_SPECS - extra_specs = XCNEWVEC (struct spec_list, ARRAY_SIZE (extra_specs_1)); - - for (i = ARRAY_SIZE (extra_specs_1) - 1; i >= 0; i--) -@@ -1811,7 +1818,6 @@ - sl->ptr_spec = &sl->ptr; - next = sl; - } --#endif - - for (i = ARRAY_SIZE (static_specs) - 1; i >= 0; i--) - { -@@ -7111,6 +7117,12 @@ - gcc_exec_prefix = concat (gcc_exec_prefix, spec_machine, dir_separator_str, - spec_version, dir_separator_str, NULL); - -+#ifdef ENABLE_ESP -+ /* Process ESP_COMMAND_OPTIONS_SPEC, adding any new options to the end -+ of the command line. */ -+ do_self_spec (esp_command_options_spec); -+#endif -+ - /* Now we have the specs. - Set the `valid' bits for switches that match anything in any spec. */ - -diff -Nur gcc-4.5.1-vanilla/gcc/Makefile.in gcc-4.5.1/gcc/Makefile.in ---- gcc-4.5.1-vanilla/gcc/Makefile.in 2010-06-30 15:26:17.000000000 +0200 -+++ gcc-4.5.1/gcc/Makefile.in 2010-10-30 15:13:15.822979675 +0200 -@@ -640,13 +640,24 @@ - INHIBIT_LIBC_CFLAGS = -Dinhibit_libc - endif - -+# We don't want __stack_chk_fail in crt* and libgcc2.a. -+# We don't want to compile crtbegin, crtend and crtbeginT with -fPIE. -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOPIE_CFLAGS = -fno-PIE -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOPIE_CFLAGS= -+ESP_NOSSP_CFLAGS= -+endif -+ - # Options to use when compiling libgcc2.a. - # - LIBGCC2_DEBUG_CFLAGS = -g - LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \ - $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \ - -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional options to use when compiling libgcc2.a. - # Some targets override this to -isystem include -@@ -659,7 +670,7 @@ - CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ - -finhibit-size-directive -fno-inline -fno-exceptions \ - -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \ -- $(INHIBIT_LIBC_CFLAGS) -+ $(INHIBIT_LIBC_CFLAGS) $(ESP_NOSSP_CFLAGS) - - # Additional sources to handle exceptions; overridden by targets as needed. - LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ -@@ -689,6 +700,12 @@ - # The rules for compiling them should be in the t-* file for the machine. - EXTRA_PARTS = @extra_parts@ - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_crtbeginTS = @enable_crtbeginTS@ -+ifeq ($(enable_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - # List of extra object files that should be compiled and linked with - # compiler proper (cc1, cc1obj, cc1plus). - EXTRA_OBJS = @extra_objs@ -@@ -1867,9 +1884,10 @@ - echo LIBGCC_SYNC = '$(LIBGCC_SYNC)' >> tmp-libgcc.mvars - echo LIBGCC_SYNC_CFLAGS = '$(LIBGCC_SYNC_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_CFLAGS = '$(CRTSTUFF_CFLAGS)' >> tmp-libgcc.mvars -- echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS)' >> tmp-libgcc.mvars -+ echo CRTSTUFF_T_CFLAGS = '$(CRTSTUFF_T_CFLAGS) $(ESP_NOPIE_CFLAGS)' >> tmp-libgcc.mvars - echo CRTSTUFF_T_CFLAGS_S = '$(CRTSTUFF_T_CFLAGS_S)' >> tmp-libgcc.mvars - echo TARGET_SYSTEM_ROOT = '$(TARGET_SYSTEM_ROOT)' >> tmp-libgcc.mvars -+ echo enable_crtbeginTS = '$(enable_crtbeginTS)' >> tmp-libgcc.mvars - - mv tmp-libgcc.mvars libgcc.mvars - -@@ -1903,12 +1921,14 @@ - $(T)crtbegin.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN \ - -o $(T)crtbegin$(objext) - - $(T)crtend.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_END \ - -o $(T)crtend$(objext) - -@@ -1929,9 +1949,19 @@ - $(T)crtbeginT.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ - gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) - $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS) \ -+ $(ESP_NOPIE_CFLAGS) \ - -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ - -o $(T)crtbeginT$(objext) - -+# This is a version of crtbegin for -static -fPIE links if esp is enable. -+ifeq ($(enable_crtbeginTS),yes) -+$(T)crtbeginTS.o: crtstuff.c $(GCC_PASSES) $(TCONFIG_H) auto-host.h \ -+ gbl-ctors.h stmp-int-hdrs tsystem.h coretypes.h $(TM_H) -+ $(GCC_FOR_TARGET) $(CRTSTUFF_CFLAGS) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O \ -+ -o $(T)crtbeginTS$(objext) -+endif -+ - # Compile the start modules crt0.o and mcrt0.o that are linked with - # every program - $(T)crt0.o: s-crt0 ; @true -diff -Nur gcc-4.5.1-vanilla/gcc/objc/lang-specs.h gcc-4.5.1/gcc/objc/lang-specs.h ---- gcc-4.5.1-vanilla/gcc/objc/lang-specs.h 2007-08-02 12:37:36.000000000 +0200 -+++ gcc-4.5.1/gcc/objc/lang-specs.h 2010-10-30 15:13:15.851989223 +0200 -@@ -30,13 +30,13 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}\ -+ cc1obj -fpreprocessed %{save-temps:%b.mi} %{!save-temps:%g.mi} %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}}}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}}}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {".mi", "@objc-cpp-output", 0, 0, 0}, - {"@objc-cpp-output", -- "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ "%{!M:%{!MM:%{!E:cc1obj -fpreprocessed %i %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objective-c-header", - "%{E|M|MM:cc1obj -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}\ -@@ -45,10 +45,10 @@ - %{traditional|ftraditional|traditional-cpp:\ - %eGNU Objective C no longer supports traditional compilation}\ - %{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\ -- cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj -fpreprocessed %b.mi %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}\ - %{!save-temps:%{!no-integrated-cpp:\ -- cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\ -+ cc1obj %(cpp_unique_options) %(cc1_options) %(esp_options) %{print-objc-runtime-info} %{gen-decls}\ - -o %g.s %{!o*:--output-pch=%i.gch}\ - %W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.1-vanilla/gcc/objcp/lang-specs.h gcc-4.5.1/gcc/objcp/lang-specs.h ---- gcc-4.5.1-vanilla/gcc/objcp/lang-specs.h 2007-08-02 12:38:44.000000000 +0200 -+++ gcc-4.5.1/gcc/objcp/lang-specs.h 2010-10-30 15:13:15.852989302 +0200 -@@ -36,7 +36,7 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {"@objective-c++", -@@ -46,15 +46,15 @@ - %(cpp_options) %2 -o %{save-temps:%b.mii} %{!save-temps:%g.mii} \n}\ - cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\ - %{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\ -- %(cc1_options) %2 %{+e1*}\ -+ %(cc1_options) %(esp_options) %2 %{+e1*}\ - %{!fsyntax-only:%(invoke_as)}}}}", - CPLUSPLUS_CPP_SPEC, 0, 0}, - {".mii", "@objective-c++-cpp-output", 0, 0, 0}, - {"@objective-c++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, - {"@objc++-cpp-output", - "%{!M:%{!MM:%{!E:\ -- cc1objplus -fpreprocessed %i %(cc1_options) %2 %{+e*}\ -+ cc1objplus -fpreprocessed %i %(cc1_options) %(esp_options) %2 %{+e*}\ - %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, -diff -Nur gcc-4.5.1-vanilla/gcc/varasm.c gcc-4.5.1/gcc/varasm.c ---- gcc-4.5.1-vanilla/gcc/varasm.c 2010-03-27 12:56:30.000000000 +0100 -+++ gcc-4.5.1/gcc/varasm.c 2010-10-30 15:13:15.839995541 +0200 -@@ -5961,7 +5961,11 @@ - bool is_local; - - is_local = targetm.binds_local_p (decl); -- if (!flag_shlib) -+ #ifdef ENABLE_ESP -+ if (!flag_pic) -+ #else -+ if (!flag_shlib) -+ #endif - { - if (is_local) - kind = TLS_MODEL_LOCAL_EXEC; -diff -Nur gcc-4.5.1-vanilla/libgcc/Makefile.in gcc-4.5.1/libgcc/Makefile.in ---- gcc-4.5.1-vanilla/libgcc/Makefile.in 2010-03-30 15:08:52.000000000 +0200 -+++ gcc-4.5.1/libgcc/Makefile.in 2010-10-30 15:13:15.824991986 +0200 -@@ -291,6 +291,12 @@ - gen-hide-list = echo > $@ - endif - -+# We add crtbeginTS.o to the EXTRA_PARTS list if enable_crtbeginTS = yes -+enable_libgcc_crtbeginTS = $(enable_crtbeginTS) -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+EXTRA_PARTS += crtbeginTS.o -+endif -+ - ifneq ($(EXTRA_PARTS),) - extra-parts = libgcc-extra-parts - INSTALL_PARTS = $(EXTRA_PARTS) -@@ -842,6 +848,13 @@ - crtbeginT.o: $(gcc_srcdir)/crtstuff.c - $(crt_compile) $(CRTSTUFF_T_CFLAGS) \ - -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -+ -+# This is a version of crtbegin for -static -fPIE links. -+ifeq ($(enable_libgcc_crtbeginTS),yes) -+crtbeginTS.o: $(gcc_srcdir)/crtstuff.c -+ $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) \ -+ -c $(gcc_srcdir)/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O -DCRTSTUFFS_O -+endif - endif - - # Build extra startfiles in the libgcc directory. -diff -Nur gcc-4.5.1-vanilla/libmudflap/configure gcc-4.5.1/libmudflap/configure ---- gcc-4.5.1-vanilla/libmudflap/configure 2010-06-10 10:58:13.000000000 +0200 -+++ gcc-4.5.1/libmudflap/configure 2010-10-30 15:13:15.768230485 +0200 -@@ -652,6 +652,7 @@ - MAINTAINER_MODE_FALSE - MAINTAINER_MODE_TRUE - am__untar -+enable_esp - am__tar - AMTAR - am__leading_dot -diff -Nur gcc-4.5.1-vanilla/libmudflap/Makefile.in gcc-4.5.1/libmudflap/Makefile.in ---- gcc-4.5.1-vanilla/libmudflap/Makefile.in 2010-04-02 20:18:06.000000000 +0200 -+++ gcc-4.5.1/libmudflap/Makefile.in 2010-10-30 15:13:15.826989769 +0200 -@@ -304,9 +304,17 @@ - MAINT_CHARSET = latin1 - SUBDIRS = testsuite - -+# Some stuff don't compile with SSP and FORTIFY_SOURCE -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ NO_ESP_CFLAGS = -fno-stack-protector -U_FORTIFY_SOURCE -+else -+ NO_ESP_CFLAGS = -+endif -+ - # May be used by various substitution variables. - gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) --AM_CFLAGS = -Wall $(SECTION_FLAGS) -+AM_CFLAGS = -Wall $(SECTION_FLAGS) $(NO_ESP_CFLAGS) - @LIBMUDFLAPTH_FALSE@libmudflapth = - @LIBMUDFLAPTH_TRUE@libmudflapth = libmudflapth.la - toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth) -diff -Nur gcc-4.5.1-vanilla/Makefile.in gcc-4.5.1/Makefile.in ---- gcc-4.5.1-vanilla/Makefile.in 2010-06-10 19:05:59.000000000 +0200 -+++ gcc-4.5.1/Makefile.in 2010-10-30 15:13:15.816979901 +0200 -@@ -350,9 +350,17 @@ - BUILD_PREFIX = @BUILD_PREFIX@ - BUILD_PREFIX_1 = @BUILD_PREFIX_1@ - -+# Some stuff don't compile with SSP -+enable_esp = @enable_esp@ -+ifeq ($(enable_esp),yes) -+ESP_NOSSP_CFLAGS = -fno-stack-protector -+else -+ESP_NOSSP_CFLAGS= -+endif -+ - # Flags to pass to stage2 and later makes. They are defined - # here so that they can be overridden by Makefile fragments. --BOOT_CFLAGS= -g -O2 -+BOOT_CFLAGS= -g -O2 $(ESP_NOSSP_CFLAGS) - BOOT_LDFLAGS= - BOOT_ADAFLAGS=-gnatpg -gnata - -@@ -397,9 +405,9 @@ - - CFLAGS = @CFLAGS@ - LDFLAGS = @LDFLAGS@ --LIBCFLAGS = $(CFLAGS) -+LIBCFLAGS = $(CFLAGS) $(ESP_NOSSP_CFLAGS) - CXXFLAGS = @CXXFLAGS@ --LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates -+LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates $(ESP_NOSSP_CFLAGS) - - TFLAGS = - diff --git a/pkgs/core/gcc/patches/gcc45-libtool-no-rpath.patch b/pkgs/core/gcc/patches/gcc45-libtool-no-rpath.patch new file mode 100644 index 0000000..1382a1b --- /dev/null +++ b/pkgs/core/gcc/patches/gcc45-libtool-no-rpath.patch @@ -0,0 +1,27 @@ +libtool sucks. +--- a/ltmain.sh.jj 2007-12-07 14:53:21.000000000 +0100 ++++ b/ltmain.sh 2008-09-05 21:51:48.000000000 +0200 +@@ -5394,6 +5394,7 @@ EOF + rpath="$finalize_rpath" + test "$mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then +@@ -6071,6 +6072,7 @@ EOF + rpath= + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then +@@ -6120,6 +6122,7 @@ EOF + rpath= + hardcode_libdirs= + for libdir in $finalize_rpath; do ++ case "$libdir" in /usr/lib|/usr/lib64|/usr/lib/../lib|/usr/lib/../lib64) continue;; esac + if test -n "$hardcode_libdir_flag_spec"; then + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then diff --git a/pkgs/core/openssh/openssh.nm b/pkgs/core/openssh/openssh.nm index cd197af..1176202 100644 --- a/pkgs/core/openssh/openssh.nm +++ b/pkgs/core/openssh/openssh.nm @@ -35,6 +35,7 @@ PKG_LICENSE = MIT PKG_SUMMARY = An open source implementation of SSH protocol versions 1 and 2.
PKG_BUILD_DEPS+= openssl-devel pam-devel +PKG_DEPS-openssh = openssh-clients=$(THISVER) openssh-server=$(THISVER)
define PKG_DESCRIPTION SH (Secure SHell) is a program for logging into and executing \ @@ -45,6 +46,32 @@ endef
PKG_TARBALL = $(THISAPP).tar.gz
+PKG_PACKAGES += openssh-clients openssh-server + +PKG_SUMMARY-openssh-server = OpenSSH server applications. +PKG_DESCRIPTION-openssh-server = $(PKG_SUMMARY-openssh-server) +PKG_FILES-openssh-server = \ + /etc/init/ \ + /etc/pam.d/ \ + /etc/ssh/moduli \ + /etc/ssh/sshd_config \ + /usr/lib/openssh/sftp-server \ + /usr/sbin/ \ + /usr/share/man/cat5/sshd_config.5* \ + /usr/share/man/cat5/moduli.5* \ + /usr/share/man/cat8/sshd.8* \ + /usr/share/man/cat8/sftp-server.8* \ + /usr/share/sshd/ \ + /var/ + +PKG_SUMMARY-openssh-clients = OpenSSH client applications. +PKG_DESCRIPTION-openssh-clients = $(PKG_SUMMARY-openssh-clients) +PKG_FILES-openssh-clients = \ + /etc/ \ + /usr/bin/ \ + /usr/lib/ \ + /usr/share/ + CONFIGURE_OPTIONS += \ --sysconfdir=/etc/ssh \ --datadir=/usr/share/sshd \ diff --git a/pkgs/core/pyQt/pyQt.nm b/pkgs/core/pyQt/pyQt.nm index b885b92..7659194 100644 --- a/pkgs/core/pyQt/pyQt.nm +++ b/pkgs/core/pyQt/pyQt.nm @@ -25,9 +25,9 @@ include $(PKGROOT)/Include
PKG_NAME = pyQt -PKG_VER = 4.8 +PKG_VER = 4.8.1 PKG_REL = 0 -PKG_EPOCH = 1 +PKG_EPOCH = 0
PKG_MAINTAINER = PKG_GROUP = Development/Languages @@ -57,6 +57,7 @@ DIR_APP = $(DIR_SRC)/PyQt-x11-gpl-$(PKG_VER)
define STAGE_BUILD cd $(DIR_APP) && python configure.py \ + --assume-shared \ --confirm-license \ --verbose
diff --git a/pkgs/core/qt/patches/0002-This-patch-makes-override-redirect-windows-popup-men.patch b/pkgs/core/qt/patches/0002-This-patch-makes-override-redirect-windows-popup-men.patch new file mode 100644 index 0000000..bb2588d --- /dev/null +++ b/pkgs/core/qt/patches/0002-This-patch-makes-override-redirect-windows-popup-men.patch @@ -0,0 +1,67 @@ +From 339e220e29ff39b86705438b4be6f90e5618d27b Mon Sep 17 00:00:00 2001 +From: Lubos Lunak l.lunak@kde.org +Date: Tue, 2 Oct 2007 16:08:32 +0200 +Subject: [PATCH 02/13] This patch makes override-redirect windows (popup menu, dropdown menu, + tooltip, combobox, etc.) also have more window properties like WM_CLASS, + so they can be used when compositing. + +qt-bugs@ issue : none +bugs.kde.org number : none +--- + src/gui/kernel/qwidget_x11.cpp | 21 +++++++++++++++------ + 1 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index 79ee8c9..a74a849 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -719,6 +719,11 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + Q_ASSERT(id); + XChangeWindowAttributes(dpy, id, CWOverrideRedirect | CWSaveUnder, + &wsa); ++ XClassHint class_hint; ++ QByteArray appName = qAppName().toLatin1(); ++ class_hint.res_name = appName.data(); // application name ++ class_hint.res_class = const_cast<char *>(QX11Info::appClass()); // application class ++ XSetWMProperties(dpy, id, 0, 0, 0, 0, 0, 0, &class_hint); + } else if (topLevel && !desktop) { // top-level widget + if (!X11->wm_client_leader) + create_wm_client_leader(); +@@ -769,13 +774,21 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + // set EWMH window types + setNetWmWindowTypes(); + ++ // when we create a toplevel widget, the frame strut should be dirty ++ data.fstrut_dirty = 1; ++ ++ } else { ++ // non-toplevel widgets don't have a frame, so no need to ++ // update the strut ++ data.fstrut_dirty = 0; ++ } ++ ++ if (initializeWindow && (popup || (topLevel && !desktop))) { // properties set on all toplevel windows + // set _NET_WM_PID + long curr_pid = getpid(); + XChangeProperty(dpy, id, ATOM(_NET_WM_PID), XA_CARDINAL, 32, PropModeReplace, + (unsigned char *) &curr_pid, 1); + +- // when we create a toplevel widget, the frame strut should be dirty +- data.fstrut_dirty = 1; + + // declare the widget's window role + if (QTLWExtra *topData = maybeTopData()) { +@@ -791,10 +804,6 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + XChangeProperty(dpy, id, ATOM(WM_CLIENT_LEADER), + XA_WINDOW, 32, PropModeReplace, + (unsigned char *)&X11->wm_client_leader, 1); +- } else { +- // non-toplevel widgets don't have a frame, so no need to +- // update the strut +- data.fstrut_dirty = 0; + } + + if (initializeWindow && q->internalWinId()) { +-- +1.6.5.1 + diff --git a/pkgs/core/qt/patches/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch b/pkgs/core/qt/patches/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch new file mode 100644 index 0000000..4005734 --- /dev/null +++ b/pkgs/core/qt/patches/0004-This-patch-adds-support-for-using-isystem-to-allow-p.patch @@ -0,0 +1,56 @@ +From 86fc0d43cdcf3232ae0e4e6f4f28cf8f1a45ede5 Mon Sep 17 00:00:00 2001 +From: Benjamin Reed rangerrick@befunk.com +Date: Tue, 19 Feb 2008 17:37:37 +0100 +Subject: [PATCH 04/13] This patch adds support for using -isystem to allow putting an include + directory at the end of the compiler's header search path. + +I don't have the exact output anymore (I've since patched Qt's configure) but +essentially, since I have pcre.h in /opt/kde4-deps/include, it was +conflicting with Qt's (modified) pcre.h in the WebKit bits, since +-I /opt/kde4-deps/include ends up in CXXFLAGS in the generated makefiles, it +comes *before* the specific locations in INCPATH on the compile line, and you +end up with a conflict with the system-installed pcre.h. + +Presumably, if your pcre.h is in /usr/include as on most Linux systems, you +wouldn't notice this issue since /usr/include's already in your include path +and people likely don't pass -I /usr/include to configure. I suspect that on +any platform with a regular, system-installed pcre.h (or clucene headers), +adding -I /usr/include would exhibit this bug, just as a custom-installed +pcre/clucene in another root would. + +qt-bugs@ issue : 199610 +Trolltech task ID : +bugs.kde.org number : +--- + configure | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/configure b/configure +index 2c108ad..610a201 100755 +--- a/configure ++++ b/configure +@@ -927,6 +927,11 @@ while [ "$#" -gt 0 ]; do + VAL=`echo $1 | sed 's,-D,,'` + fi + ;; ++ -isystem) ++ VAR="add_isystempath" ++ shift ++ VAL="$1" ++ ;; + -I?*|-I) + VAR="add_ipath" + if [ "$1" = "-I" ]; then +@@ -1890,6 +1895,9 @@ while [ "$#" -gt 0 ]; do + add_ipath) + I_FLAGS="$I_FLAGS -I"${VAL}"" + ;; ++ add_isystempath) ++ I_FLAGS="$I_FLAGS -isystem "${VAL}"" ++ ;; + add_lpath) + L_FLAGS="$L_FLAGS -L"${VAL}"" + ;; +-- +1.6.5.1 + diff --git a/pkgs/core/qt/patches/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch b/pkgs/core/qt/patches/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch new file mode 100644 index 0000000..0386a47 --- /dev/null +++ b/pkgs/core/qt/patches/0005-When-tabs-are-inserted-or-removed-in-a-QTabBar.patch @@ -0,0 +1,47 @@ +From 733d1afd03908d695aa8a6518f453b9ff0e5b8a2 Mon Sep 17 00:00:00 2001 +From: Robert Knight robertknight@gmail.com +Date: Sun, 20 Apr 2008 16:28:31 +0200 +Subject: [PATCH 05/13] When tabs are inserted or removed in a QTabBar, + QTabBarPrivate::refresh() is called to update the layout. If the + tabbar widget is hidden, this just sets a boolean variable + (layoutDirty) and returns, so the parent widget's layout is not + notified about the possible geometry change. + +Prior to Qt 4.4 this was not a problem because the geometry was +recalculated in QTabBar::sizeHint() if the layoutDirty variable was +set. In Qt 4.4 however the layout caches size hint information in +QWidgetItemV2. Since the cache information is not invalidated, the +layout may end up using out-of-date size hint information to compute +the widget size. + +If the QTabBar is empty when QTabBar::sizeHint() is called, it will +return a size with a height of 0, which will be kept in the cache and +so the tab bar will never be shown. + +This patch fixes the problem by calling updateGeometry() whenever the +tab bar's layout is refreshed. + +qt-bugs@ issue : 208185 +Trolltech task ID : 208349 +bugs.kde.org number : 159014 +--- + src/gui/widgets/qtabbar.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp +index 419d456..41107a0 100644 +--- a/src/gui/widgets/qtabbar.cpp ++++ b/src/gui/widgets/qtabbar.cpp +@@ -678,8 +678,8 @@ void QTabBarPrivate::refresh() + layoutTabs(); + makeVisible(currentIndex); + q->update(); +- q->updateGeometry(); + } ++ q->updateGeometry(); + } + + /*! +-- +1.6.5.1 + diff --git a/pkgs/core/qt/patches/0012-Add-context-to-tr-calls-in-QShortcut.patch b/pkgs/core/qt/patches/0012-Add-context-to-tr-calls-in-QShortcut.patch new file mode 100644 index 0000000..2b552d3 --- /dev/null +++ b/pkgs/core/qt/patches/0012-Add-context-to-tr-calls-in-QShortcut.patch @@ -0,0 +1,70 @@ +From 9eb3560cfd5cd0bc9c7bf79f2c27657ee07b8f95 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid aacid@kde.org +Date: Sat, 8 Aug 2009 14:40:25 +0200 +Subject: [PATCH 12/13] Add context to tr calls in QShortcut + +Some languages have special rules for using "+" to concatenate strings and +for example it needs to be Ctrl + Shift instead of Ctrl+Shift, adding +context to these strings helps creating a more correct translation +--- + src/gui/kernel/qkeysequence.cpp | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp +index 894f663..c17f253 100644 +--- a/src/gui/kernel/qkeysequence.cpp ++++ b/src/gui/kernel/qkeysequence.cpp +@@ -991,10 +991,10 @@ int QKeySequencePrivate::decodeString(const QString &str, QKeySequence::Sequence + + QList<QModifKeyName> modifs; + if (nativeText) { +- modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::ALT, QShortcut::tr("Alt").toLower().append(QLatin1Char('+'))) +- << QModifKeyName(Qt::META, QShortcut::tr("Meta").toLower().append(QLatin1Char('+'))); ++ modifs << QModifKeyName(Qt::CTRL, QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::SHIFT, QShortcut::tr("Shift", "Shift key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::ALT, QShortcut::tr("Alt", "Alt key, used for shortcuts").toLower().append(QLatin1Char('+'))) ++ << QModifKeyName(Qt::META, QShortcut::tr("Meta", "Meta key, used for shortcuts").toLower().append(QLatin1Char('+'))); + } + modifs += *gmodifs; // Test non-translated ones last + +@@ -1086,7 +1086,7 @@ QString QKeySequence::encodeString(int key) + static inline void addKey(QString &str, const QString &theKey, QKeySequence::SequenceFormat format) + { + if (!str.isEmpty()) +- str += (format == QKeySequence::NativeText) ? QShortcut::tr("+") ++ str += (format == QKeySequence::NativeText) ? QShortcut::tr("+", "Symbol used to concatenate keys in shortcuts") + : QString::fromLatin1("+"); + str += theKey; + } +@@ -1111,13 +1111,13 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat + { + // On other systems the order is Meta, Control, Alt, Shift + if ((key & Qt::META) == Qt::META) +- s = nativeText ? QShortcut::tr("Meta") : QString::fromLatin1("Meta"); ++ s = nativeText ? QShortcut::tr("Meta", "Meta key, used for shortcuts") : QString::fromLatin1("Meta"); + if ((key & Qt::CTRL) == Qt::CTRL) +- addKey(s, nativeText ? QShortcut::tr("Ctrl") : QString::fromLatin1("Ctrl"), format); ++ addKey(s, nativeText ? QShortcut::tr("Ctrl", "Ctrl key, used for shortcuts") : QString::fromLatin1("Ctrl"), format); + if ((key & Qt::ALT) == Qt::ALT) +- addKey(s, nativeText ? QShortcut::tr("Alt") : QString::fromLatin1("Alt"), format); ++ addKey(s, nativeText ? QShortcut::tr("Alt", "Alt key, used for shortcuts") : QString::fromLatin1("Alt"), format); + if ((key & Qt::SHIFT) == Qt::SHIFT) +- addKey(s, nativeText ? QShortcut::tr("Shift") : QString::fromLatin1("Shift"), format); ++ addKey(s, nativeText ? QShortcut::tr("Shift", "Shift key, used for shortcuts") : QString::fromLatin1("Shift"), format); + } + + +@@ -1132,7 +1132,7 @@ QString QKeySequencePrivate::encodeString(int key, QKeySequence::SequenceFormat + p += QChar((key-0x10000)%400+0xdc00); + } + } else if (key >= Qt::Key_F1 && key <= Qt::Key_F35) { +- p = nativeText ? QShortcut::tr("F%1").arg(key - Qt::Key_F1 + 1) ++ p = nativeText ? QShortcut::tr("F%1", "Fx key, used for shortcuts").arg(key - Qt::Key_F1 + 1) + : QString::fromLatin1("F%1").arg(key - Qt::Key_F1 + 1); + } else if (key) { + int i=0; +-- +1.6.5.1 + diff --git a/pkgs/core/qt/patches/qt b/pkgs/core/qt/patches/qt new file mode 160000 index 0000000..76078ae --- /dev/null +++ b/pkgs/core/qt/patches/qt @@ -0,0 +1 @@ +Subproject commit 76078aea2e778defe516b39bd4367dedd4a71ca5 diff --git a/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562049.patch b/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562049.patch new file mode 100644 index 0000000..0e562e4 --- /dev/null +++ b/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562049.patch @@ -0,0 +1,15 @@ +diff -rup qt-everywhere-opensource-src-4.6.3/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-everywhere-opensource-src-4.6.3_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-06-02 07:33:13.000000000 +0530 ++++ qt-everywhere-opensource-src-4.6.3_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-09-04 13:27:33.000000000 +0530 +@@ -1741,6 +1741,11 @@ static int indic_nextSyllableBoundary(HB + if (state == Halant && uc[pos] == 0x200d /* ZWJ */) + break; + // the control character should be the last char in the item ++ if (state == Consonant && script == HB_Script_Bengali && uc[pos-1] == 0x09B0 && uc[pos] == 0x200d /* ZWJ */) ++ break; ++ if (state == Consonant && script == HB_Script_Kannada && uc[pos-1] == 0x0CB0 && uc[pos] == 0x200d /* ZWJ */) ++ break; ++ // Bengali and Kannada has a special exception for rendering yaphala with ra (to avoid reph) see http://www.unicode.org/faq/indic.html#15 + ++pos; + goto finish; + case Consonant: diff --git a/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562058.patch b/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562058.patch new file mode 100644 index 0000000..ee76927 --- /dev/null +++ b/pkgs/core/qt/patches/qt-4.6.3-bn-rendering-bz562058.patch @@ -0,0 +1,12 @@ +diff -rup qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-everywhere-opensource-src-4.7.0-beta2_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-06-30 07:23:12.000000000 +0530 ++++ qt-everywhere-opensource-src-4.7.0-beta2_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-09-22 14:33:33.000000000 +0530 +@@ -37,7 +37,7 @@ static HB_Bool isLetter(HB_UChar16 ucs) + FLAG(HB_Letter_Titlecase) | + FLAG(HB_Letter_Modifier) | + FLAG(HB_Letter_Other); +- return FLAG(HB_GetUnicodeCharCategory(ucs)) & test; ++ return (FLAG(HB_GetUnicodeCharCategory(ucs)) & test) != 0; + } + + static HB_Bool isMark(HB_UChar16 ucs) diff --git a/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz631732.patch b/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz631732.patch new file mode 100644 index 0000000..507f876 --- /dev/null +++ b/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz631732.patch @@ -0,0 +1,14 @@ +diff -rup qt-everywhere-opensource-src-4.6.3/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-everywhere-opensource-src-4.6.3_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +--- qt-everywhere-opensource-src-4.6.3/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-06-02 07:33:13.000000000 +0530 ++++ qt-everywhere-opensource-src-4.6.3_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-09-10 18:37:23.000000000 +0530 +@@ -1779,10 +1779,6 @@ static int indic_nextSyllableBoundary(HB + case Matra: + if (state == Consonant || state == Nukta) + break; +- if (state == Matra) { +- // ### needs proper testing for correct two/three part matras +- break; +- } + // ### not sure if this is correct. If it is, does it apply only to Bengali or should + // it work for all Indic languages? + // the combination Independent_A + Vowel Sign AA is allowed. diff --git a/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz636399.patch b/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz636399.patch new file mode 100644 index 0000000..bf49f30 --- /dev/null +++ b/pkgs/core/qt/patches/qt-4.6.3-indic-rendering-bz636399.patch @@ -0,0 +1,30 @@ +diff -rup qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp qt-everywhere-opensource-src-4.7.0-beta2_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-06-30 07:23:12.000000000 +0530 ++++ qt-everywhere-opensource-src-4.7.0-beta2_mod/src/3rdparty/harfbuzz/src/harfbuzz-indic.cpp 2010-09-20 11:40:58.000000000 +0530 +@@ -660,18 +660,18 @@ static const unsigned char indicPosition + None, None, None, None, + + None, None, None, None, +- None, None, None, None, +- None, None, None, None, +- None, None, None, None, ++ None, Below, Below, Below, ++ Below, Below, Below, Below, ++ Below, Below, None, Below, + +- None, None, None, None, +- Below, None, None, None, +- Below, None, None, None, ++ Below, Below, Below, Below, ++ Below, Below, Below, Below, ++ Below, None, Below, Below, + Below, Below, Below, Post, + + Below, None, Below, Below, +- None, None, None, None, +- None, None, None, None, ++ None, Below, Below, Below, ++ Below, Below, None, None, + None, None, Post, Above, + + Post, Below, Below, Below, diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.2-cups.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.2-cups.patch new file mode 100644 index 0000000..e0305e1 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.2-cups.patch @@ -0,0 +1,84 @@ +diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp +--- qt-everywhere-opensource-src-4.6.2/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-11 16:55:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/dialogs/qprintdialog_unix.cpp 2010-02-28 04:34:16.000000000 +0100 +@@ -569,6 +569,32 @@ + void QPrintDialogPrivate::selectPrinter(QCUPSSupport *cups) + { + options.duplex->setEnabled(cups && cups->ppdOption("Duplex")); ++ ++ if (cups) { ++ const ppd_option_t* duplex = cups->ppdOption("Duplex"); ++ if (duplex) { ++ // copy default ppd duplex to qt dialog ++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) ++ options.duplexShort->setChecked(true); ++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) ++ options.duplexLong->setChecked(true); ++ else ++ options.noDuplex->setChecked(true); ++ } ++ ++ if (cups->currentPPD()) { ++ // set default color ++ if (cups->currentPPD()->color_device) ++ options.color->setChecked(true); ++ else ++ options.grayscale->setChecked(true); ++ } ++ ++ // set collation ++ const ppd_option_t *collate = cups->ppdOption("Collate"); ++ if (collate) ++ options.collate->setChecked(qstrcmp(collate->defchoice, "True")==0); ++ } + } + #endif + +diff -ur qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp +--- qt-everywhere-opensource-src-4.6.2/src/gui/painting/qprinter.cpp 2010-02-11 16:55:22.000000000 +0100 ++++ qt-everywhere-opensource-src-4.6.2-cups/src/gui/painting/qprinter.cpp 2010-02-28 04:55:15.000000000 +0100 +@@ -627,6 +627,44 @@ + && d_ptr->paintEngine->type() != QPaintEngine::MacPrinter) { + setOutputFormat(QPrinter::PdfFormat); + } ++ ++#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) ++ // fill in defaults from ppd file ++ QCUPSSupport cups; ++ ++ int printernum = -1; ++ for (int i = 0; i < cups.availablePrintersCount(); i++) { ++ if (printerName().toLocal8Bit() == cups.availablePrinters()[i].name) ++ printernum = i; ++ } ++ if (printernum >= 0) { ++ cups.setCurrentPrinter(printernum); ++ ++ const ppd_option_t* duplex = cups.ppdOption("Duplex"); ++ if (duplex) { ++ // copy default ppd duplex to qt dialog ++ if (qstrcmp(duplex->defchoice, "DuplexTumble") == 0) ++ setDuplex(DuplexShortSide); ++ else if (qstrcmp(duplex->defchoice, "DuplexNoTumble") == 0) ++ setDuplex(DuplexLongSide); ++ else ++ setDuplex(DuplexNone); ++ } ++ ++ if (cups.currentPPD()) { ++ // set default color ++ if (cups.currentPPD()->color_device) ++ setColorMode(Color); ++ else ++ setColorMode(GrayScale); ++ } ++ ++ // set collation ++ const ppd_option_t *collate = cups.ppdOption("Collate"); ++ if (collate) ++ setCollateCopies(qstrcmp(collate->defchoice, "True")==0); ++ } ++#endif + } + + /*! diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch new file mode 100644 index 0000000..f0c9eaa --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.6.3-glib_eventloop_nullcheck.patch @@ -0,0 +1,21 @@ +diff -up qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp +--- qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp.glib_eventloop_nullcheck 2010-06-01 21:03:15.000000000 -0500 ++++ qt-everywhere-opensource-src-4.6.3/src/gui/kernel/qguieventdispatcher_glib.cpp 2010-06-29 14:58:12.299073784 -0500 +@@ -76,7 +76,7 @@ static gboolean x11EventSourcePrepare(GS + GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s); + return (XEventsQueued(X11->display, QueuedAfterFlush) + || (!(source->flags & QEventLoop::ExcludeUserInputEvents) +- && !source->d->queuedUserInputEvents.isEmpty())); ++ && source->d && !source->d->queuedUserInputEvents.isEmpty())); + } + + static gboolean x11EventSourceCheck(GSource *s) +@@ -84,7 +84,7 @@ static gboolean x11EventSourceCheck(GSou + GX11EventSource *source = reinterpret_cast<GX11EventSource *>(s); + return (XEventsQueued(X11->display, QueuedAfterFlush) + || (!(source->flags & QEventLoop::ExcludeUserInputEvents) +- && !source->d->queuedUserInputEvents.isEmpty())); ++ && source->d && !source->d->queuedUserInputEvents.isEmpty())); + } + + static gboolean x11EventSourceDispatch(GSource *s, GSourceFunc callback, gpointer user_data) diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-CVE-2010-1822-crash-svg-image.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-CVE-2010-1822-crash-svg-image.patch new file mode 100644 index 0000000..32b9713 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-CVE-2010-1822-crash-svg-image.patch @@ -0,0 +1,26 @@ +diff -up qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp.CVE-2010-1822-crash-svg-image qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp +--- qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp.CVE-2010-1822-crash-svg-image 2010-09-10 11:05:20.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.cpp 2010-10-25 14:22:06.542771102 +0200 +@@ -86,6 +86,11 @@ RenderObject* SVGGElement::createRendere + return new (arena) RenderSVGTransformableContainer(this); + } + ++bool SVGGElement::rendererIsNeeded(RenderStyle*) ++{ ++ return parentNode() && parentNode()->isSVGElement(); ++} ++ + } + + #endif // ENABLE(SVG) +diff -up qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.h.CVE-2010-1822-crash-svg-image qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.h +--- qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.h.CVE-2010-1822-crash-svg-image 2010-09-10 11:05:21.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0/src/3rdparty/webkit/WebCore/svg/SVGGElement.h 2010-10-25 14:28:37.467854695 +0200 +@@ -43,6 +43,7 @@ namespace WebCore { + virtual void parseMappedAttribute(MappedAttribute*); + virtual void svgAttributeChanged(const QualifiedName&); + virtual void synchronizeProperty(const QualifiedName&); ++ virtual bool rendererIsNeeded(RenderStyle*); + virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0); + + virtual RenderObject* createRenderer(RenderArena*, RenderStyle*); diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-13567-QTreeView.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-13567-QTreeView.patch new file mode 100644 index 0000000..d517de5 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-13567-QTreeView.patch @@ -0,0 +1,31 @@ +From 6da6b7099d4e0b49329793e4b90703ec3d868048 Mon Sep 17 00:00:00 2001 +From: Frank Reininghaus frank78ac@googlemail.com +Date: Wed, 22 Sep 2010 10:19:59 +0200 +Subject: [PATCH] QTreeView: do not scroll to top if last item is removed + +When the last item is the current item and is removed, +QTreeViewPrivate::updateScrollBars() is called after QTreeViewPrivate's +viewItems member is cleared. This commit makes sure that viewItems is +restored by calling QTreeView::doItemsLayout() in this case, preventing +that the scroll bar range is set to zero temporarily and the view is +scrolled to the top unexpectedly (this was a regression in 4.7.0: +QTBUG-13567). + +Merge-request: 2481 +Reviewed-by: Olivier Goffart olivier.goffart@nokia.com + +diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp +index b797776..40b51fe 100644 +--- a/src/gui/itemviews/qtreeview.cpp ++++ b/src/gui/itemviews/qtreeview.cpp +@@ -3435,6 +3435,10 @@ void QTreeViewPrivate::updateScrollBars() + if (!viewportSize.isValid()) + viewportSize = QSize(0, 0); + ++ if (viewItems.isEmpty()) { ++ q->doItemsLayout(); ++ } ++ + int itemsInViewport = 0; + if (uniformRowHeights) { + if (defaultItemHeight <= 0) diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch new file mode 100644 index 0000000..0b99d08 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-QTBUG-6185.patch @@ -0,0 +1,34 @@ +From 9e9a7bc29319d52c3e563bc2c5282cb7e6890eba Mon Sep 17 00:00:00 2001 +From: Denis Dzyubenko denis.dzyubenko@nokia.com +Date: Wed, 29 Sep 2010 14:02:10 +0200 +Subject: [PATCH] Fixes cursor shape when widget becomes native on X11. + +When a native window handle is created for a widget that has override +cursor set, we should reset the cursor on the parent and set the cursor +on the new window handle. + +Task-number: QTBUG-6185 +Reviewed-by: Olivier Goffart +--- + src/gui/kernel/qwidget_x11.cpp | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp +index e01489f..8d80e10 100644 +--- a/src/gui/kernel/qwidget_x11.cpp ++++ b/src/gui/kernel/qwidget_x11.cpp +@@ -889,8 +889,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO + q->setWindowOpacity(maybeTopData()->opacity/255.); + + } +- } else if (q->testAttribute(Qt::WA_SetCursor) && q->internalWinId()) { ++ } else if (q->internalWinId()) { + qt_x11_enforce_cursor(q); ++ if (QWidget *p = q->parentWidget()) // reset the cursor on the native parent ++ qt_x11_enforce_cursor(p); + } + + if (extra && !extra->mask.isEmpty() && q->internalWinId()) +-- +1.6.1 + diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch new file mode 100644 index 0000000..016b3b4 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-qtwebkit_pluginpath.patch @@ -0,0 +1,19 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp.pluginpath 2010-05-03 19:43:20.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/WebCore/plugins/PluginDatabase.cpp 2010-06-18 10:02:37.004788646 -0500 +@@ -345,6 +345,7 @@ Vector<String> PluginDatabase::defaultPl + paths.append("/usr/lib/firefox/plugins"); + paths.append("/usr/lib64/browser-plugins"); + paths.append("/usr/lib/browser-plugins"); ++ paths.append("/usr/lib/mozilla/plugins-wrapped"); + paths.append("/usr/lib/mozilla/plugins"); + paths.append("/usr/local/netscape/plugins"); + paths.append("/opt/mozilla/plugins"); +@@ -355,6 +356,7 @@ Vector<String> PluginDatabase::defaultPl + paths.append("/usr/lib/netscape/plugins-libc5"); + paths.append("/usr/lib/netscape/plugins-libc6"); + paths.append("/usr/lib64/netscape/plugins"); ++ paths.append("/usr/lib64/mozilla/plugins-wrapped"); + paths.append("/usr/lib64/mozilla/plugins"); + paths.append("/usr/lib/nsbrowser/plugins"); + paths.append("/usr/lib64/nsbrowser/plugins"); diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-s390x.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-s390x.patch new file mode 100644 index 0000000..1eedf83 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-s390x.patch @@ -0,0 +1,61 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390x qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h +--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.s390x 2010-06-16 13:54:50.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2010-06-16 13:53:43.000000000 +0200 +@@ -179,6 +179,18 @@ + #define WTF_CPU_SPARC 1 + #endif + ++/* CPU(S390X) - S390 64-bit */ ++#if defined(__s390x__) ++#define WTF_CPU_S390X 1 ++#define WTF_CPU_BIG_ENDIAN 1 ++#endif ++ ++/* CPU(S390) - S390 32-bit */ ++#if defined(__s390__) ++#define WTF_CPU_S390 1 ++#define WTF_CPU_BIG_ENDIAN 1 ++#endif ++ + /* CPU(X86) - i386 / x86 32-bit */ + #if defined(__i386__) \ + || defined(i386) \ +@@ -860,7 +872,7 @@ + #endif + + #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) +-#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) ++#if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS) || OS(SOLARIS) || OS(HPUX))) || (CPU(IA64) && !CPU(IA64_32)) || CPU(ALPHA) || CPU(AIX64) || CPU(SPARC64) || CPU(S390X) + #define WTF_USE_JSVALUE64 1 + #elif CPU(ARM) || CPU(PPC64) + #define WTF_USE_JSVALUE32 1 +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.s390x qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +--- qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.s390x 2010-06-16 13:49:00.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2010-06-16 13:50:01.000000000 +0200 +@@ -169,6 +169,18 @@ + #define WTF_CPU_SPARC 1 + #endif + ++/* CPU(S390X) - S390 64-bit */ ++#if defined(__s390x__) ++#define WTF_CPU_S390X 1 ++#define WTF_CPU_BIG_ENDIAN 1 ++#endif ++ ++/* CPU(S390) - S390 32-bit */ ++#if defined(__s390__) ++#define WTF_CPU_S390 1 ++#define WTF_CPU_BIG_ENDIAN 1 ++#endif ++ + /* CPU(X86) - i386 / x86 32-bit */ + #if defined(__i386__) \ + || defined(i386) \ +@@ -874,6 +886,7 @@ + #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \ + || (CPU(IA64) && !CPU(IA64_32)) \ + || CPU(ALPHA) \ ++ || CPU(S390X) \ + || CPU(SPARC64) + #define WTF_USE_JSVALUE64 1 + #elif CPU(ARM) || CPU(PPC64) || CPU(MIPS) diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch new file mode 100644 index 0000000..09670c1 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta1-uic_multilib.patch @@ -0,0 +1,36 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/embed.cpp 2010-06-25 14:11:21.815474310 -0500 +@@ -152,7 +152,7 @@ void Ui3Reader::embed(const char *projec + for ( it = images.begin(); it != images.end(); ++it ) + out << "** " << *it << "\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** by: The User Interface Compiler for Qt version " << QT_VERSION_STR << "\n"; + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost!\n"; +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic3/uic.cpp 2010-06-25 14:11:32.910460623 -0500 +@@ -146,7 +146,7 @@ void Uic::writeCopyrightHeader(DomUI *ui + out << "/********************************************************************************\n"; + out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR)); + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; +diff -up qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp +--- qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp.uic_multilib 2010-05-03 19:43:25.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta1/src/tools/uic/uic.cpp 2010-06-25 14:10:45.360711498 -0500 +@@ -139,7 +139,7 @@ void Uic::writeCopyrightHeader(DomUI *ui + out << "/********************************************************************************\n"; + out << "** Form generated from reading UI file '" << QFileInfo(opt.inputFile).fileName() << "'\n"; + out << "**\n"; +- out << "** Created: " << QDateTime::currentDateTime().toString() << "\n"; ++ out << "** Created: " << "\n"; + out << "** " << QString::fromLatin1("by: Qt User Interface Compiler version %1\n").arg(QLatin1String(QT_VERSION_STR)); + out << "**\n"; + out << "** WARNING! All changes made in this file will be lost when recompiling UI file!\n"; diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-kde4_plugins.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-kde4_plugins.patch new file mode 100644 index 0000000..822ace8 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-kde4_plugins.patch @@ -0,0 +1,19 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/kernel/qcoreapplication.cpp.kde4_plugins qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/kernel/qcoreapplication.cpp +--- qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/kernel/qcoreapplication.cpp.kde4_plugins 2010-06-29 20:53:15.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta2/src/corelib/kernel/qcoreapplication.cpp 2010-07-08 08:24:12.714604479 -0500 +@@ -2262,6 +2262,15 @@ QStringList QCoreApplication::libraryPat + if (!app_libpaths->contains(installPathPlugins)) + app_libpaths->append(installPathPlugins); + } ++ ++ // hack in support for kde4 plugin paths -- Rex ++ QString kde4PathPlugins = QLibraryInfo::location(QLibraryInfo::LibrariesPath) + QLatin1String("/kde4/plugins"); ++ if (QFile::exists(kde4PathPlugins)) { ++ // Make sure we convert from backslashes to slashes. ++ // kde4PathPlugins = QDir(kde4PathPlugins).canonicalPath(); ++ if (!app_libpaths->contains(kde4PathPlugins)) ++ app_libpaths->append(kde4PathPlugins); ++ } + #endif + + // If QCoreApplication is not yet instantiated, diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-mysql_config.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-mysql_config.patch new file mode 100644 index 0000000..47c066b --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-mysql_config.patch @@ -0,0 +1,19 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta2/configure.mysql_config qt-everywhere-opensource-src-4.7.0-beta2/configure +--- qt-everywhere-opensource-src-4.7.0-beta2/configure.mysql_config 2010-06-29 20:53:10.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta2/configure 2010-07-08 08:30:32.148864934 -0500 +@@ -4849,8 +4849,15 @@ for _SQLDR in $CFG_SQL_AVAILABLE; do + [ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config` + if [ -x "$CFG_MYSQL_CONFIG" ]; then + QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null` ++ $CFG_MYSQL_CONFIG --pkglibdir &>/dev/null && \ ++ QT_MYSQL_PKGLIBDIR=`$CFG_MYSQL_CONFIG --pkglibdir 2>/dev/null` ++ if [ -n "$QT_MYSQL_PKGLIBDIR" ]; then ++ QT_LFLAGS_MYSQL_R="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient_r" ++ QT_LFLAGS_MYSQL="-L$QT_MYSQL_PKGLIBDIR -lmysqlclient" ++ else + QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null` + QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null` ++ fi + QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null` + QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1` + fi diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-phonon_servicesfile.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-phonon_servicesfile.patch new file mode 100644 index 0000000..e5ef6a0 --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-beta2-phonon_servicesfile.patch @@ -0,0 +1,40 @@ +diff -up qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/phonon/gstreamer/gstreamer.desktop.servicesfile qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/phonon/gstreamer/gstreamer.desktop +--- qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/phonon/gstreamer/gstreamer.desktop.servicesfile 2010-06-29 20:53:12.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta2/src/3rdparty/phonon/gstreamer/gstreamer.desktop 2010-07-08 08:25:50.419855085 -0500 +@@ -2,7 +2,7 @@ + Type=Service + X-KDE-ServiceTypes=PhononBackend + MimeType=application/x-annodex;video/quicktime;video/x-quicktime;audio/x-m4a;application/x-quicktimeplayer;video/mkv;video/msvideo;video/x-msvideo;video/x-flic;audio/x-aiff;audio/aiff;audio/x-pn-aiff;audio/x-realaudio;audio/basic;audio/x-basic;audio/x-pn-au;audio/x-8svx;audio/8svx;audio/x-16sv;audio/168sv;image/x-ilbm;image/ilbm;video/x-anim;video/anim;image/png;image/x-png;video/mng;video/x-mng;audio/x-ogg;audio/x-speex+ogg;application/ogg;application/ogg;audio/vnd.rn-realaudio;audio/x-pn-realaudio-plugin;audio/x-real-audio;application/vnd.rn-realmedia;video/mpeg;video/x-mpeg;audio/x-wav;audio/wav;audio/x-pn-wav;audio/x-pn-windows-acm;audio/mpeg2;audio/x-mpeg2;audio/mpeg3;audio/x-mpeg3;audio/mpeg;audio/x-mpeg;x-mpegurl;audio/x-mpegurl;audio/mp3;audio/mpeg; +-X-KDE-Library=phonon_gstreamer ++X-KDE-Library=libphonon_gstreamer + X-KDE-PhononBackendInfo-InterfaceVersion=1 + X-KDE-PhononBackendInfo-Version=0.1 + X-KDE-PhononBackendInfo-Website=http://gstreamer.freedesktop.org/ +diff -up qt-everywhere-opensource-src-4.7.0-beta2/src/phonon/phonon.pro.servicesfile qt-everywhere-opensource-src-4.7.0-beta2/src/phonon/phonon.pro +--- qt-everywhere-opensource-src-4.7.0-beta2/src/phonon/phonon.pro.servicesfile 2010-06-29 20:53:13.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta2/src/phonon/phonon.pro 2010-07-08 08:26:58.307612257 -0500 +@@ -122,6 +122,11 @@ contains(QT_CONFIG, dbus) { + DEFINES += QT_NO_DBUS + } + ++# install dbus service file ++sources.files = $$PHONON_DIR/org.kde.Phonon.AudioOutput.xml ++sources.path = /usr/share/dbus-1/interfaces ++INSTALLS += sources ++ + contains(QT_CONFIG, reduce_exports): CONFIG += hide_symbols + + unix:!isEmpty(QT_CFLAGS_PULSEAUDIO) { +diff -up qt-everywhere-opensource-src-4.7.0-beta2/src/plugins/phonon/gstreamer/gstreamer.pro.servicesfile qt-everywhere-opensource-src-4.7.0-beta2/src/plugins/phonon/gstreamer/gstreamer.pro +--- qt-everywhere-opensource-src-4.7.0-beta2/src/plugins/phonon/gstreamer/gstreamer.pro.servicesfile 2010-06-29 20:53:14.000000000 -0500 ++++ qt-everywhere-opensource-src-4.7.0-beta2/src/plugins/phonon/gstreamer/gstreamer.pro 2010-07-08 08:25:50.387854526 -0500 +@@ -64,6 +64,8 @@ SOURCES += $$PHONON_GSTREAMER_DIR/abstra + } + + target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend +-INSTALLS += target ++services.files = $$PHONON_GSTREAMER_DIR/gstreamer.desktop ++services.path = /usr/share/kde4/services/phononbackends ++INSTALLS += target services + + include(../../qpluginbase.pri) diff --git a/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-bpp24.patch b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-bpp24.patch new file mode 100644 index 0000000..910e15f --- /dev/null +++ b/pkgs/core/qt/patches/qt-everywhere-opensource-src-4.7.0-bpp24.patch @@ -0,0 +1,15 @@ +diff -up qt-everywhere-opensource-src-4.7.0/src/gui/image/qpixmap_x11.cpp.me qt-everywhere-opensource-src-4.7.0/src/gui/image/qpixmap_x11.cpp +--- qt-everywhere-opensource-src-4.7.0/src/gui/image/qpixmap_x11.cpp.me 2010-10-15 22:04:09.000000000 +0200 ++++ qt-everywhere-opensource-src-4.7.0/src/gui/image/qpixmap_x11.cpp 2010-10-15 22:04:18.000000000 +0200 +@@ -900,9 +900,9 @@ void QX11PixmapData::fromImage(const QIm + case BPP24_888: // 24 bit MSB + CYCLE( + for (int x=0; x<w; x++) { +- *dst++ = qRed (*p); ++ *dst++ = qBlue (*p); + *dst++ = qGreen(*p); +- *dst++ = qBlue (*p++); ++ *dst++ = qRed (*p++); + } + ) + break; diff --git a/pkgs/core/qt/patches/qt-x11-opensource-src-4.2.2-multilib-optflags.patch b/pkgs/core/qt/patches/qt-x11-opensource-src-4.2.2-multilib-optflags.patch new file mode 100644 index 0000000..099a8a2 --- /dev/null +++ b/pkgs/core/qt/patches/qt-x11-opensource-src-4.2.2-multilib-optflags.patch @@ -0,0 +1,33 @@ +--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600 ++++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-64/qmake.conf 2007-02-26 15:01:02.000000000 -0600 +@@ -14,6 +14,8 @@ + QMAKE_CFLAGS = -m64 + QMAKE_LFLAGS = -m64 + ++QMAKE_CFLAGS_RELEASE += -O2 ++ + include(../common/g++.conf) + include(../common/linux.conf) + +--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600 ++++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++-32/qmake.conf 2007-02-26 15:01:34.000000000 -0600 +@@ -11,6 +11,8 @@ + QMAKE_CFLAGS = -m32 + QMAKE_LFLAGS = -m32 + ++QMAKE_CFLAGS_RELEASE += -O2 ++ + include(../common/g++.conf) + include(../common/linux.conf) + load(qt_config) +--- qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf.multilib 2006-11-27 11:26:42.000000000 -0600 ++++ qt-x11-opensource-src-4.2.2/mkspecs/linux-g++/qmake.conf 2007-02-26 15:01:26.000000000 -0600 +@@ -8,6 +8,8 @@ + QT += core gui + QMAKE_INCREMENTAL_STYLE = sublib + ++QMAKE_CFLAGS_RELEASE += -O2 ++ + include(../common/g++.conf) + include(../common/linux.conf) + load(qt_config) diff --git a/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch b/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch new file mode 100644 index 0000000..e5ab4ba --- /dev/null +++ b/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch @@ -0,0 +1,50 @@ +diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h +--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_i386.h 2009-02-25 22:09:21.000000000 +0100 ++++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_i386.h 2009-04-01 17:54:21.000000000 +0200 +@@ -115,8 +115,8 @@ + asm volatile("lock\n" + "incl %0\n" + "setne %1" +- : "=m" (_q_value), "=qm" (ret) +- : "m" (_q_value) ++ : "+m" (_q_value), "=qm" (ret) ++ : + : "memory"); + return ret != 0; + } +@@ -127,8 +127,8 @@ + asm volatile("lock\n" + "decl %0\n" + "setne %1" +- : "=m" (_q_value), "=qm" (ret) +- : "m" (_q_value) ++ : "+m" (_q_value), "=qm" (ret) ++ : + : "memory"); + return ret != 0; + } +diff -ur qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h +--- qt-x11-opensource-src-4.5.0/src/corelib/arch/qatomic_x86_64.h 2009-02-25 22:09:21.000000000 +0100 ++++ qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm/src/corelib/arch/qatomic_x86_64.h 2009-04-01 17:54:32.000000000 +0200 +@@ -116,8 +116,8 @@ + asm volatile("lock\n" + "incl %0\n" + "setne %1" +- : "=m" (_q_value), "=qm" (ret) +- : "m" (_q_value) ++ : "+m" (_q_value), "=qm" (ret) ++ : + : "memory"); + return ret != 0; + } +@@ -128,8 +128,8 @@ + asm volatile("lock\n" + "decl %0\n" + "setne %1" +- : "=m" (_q_value), "=qm" (ret) +- : "m" (_q_value) ++ : "+m" (_q_value), "=qm" (ret) ++ : + : "memory"); + return ret != 0; + } diff --git a/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch b/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch new file mode 100644 index 0000000..4ab3ea4 --- /dev/null +++ b/pkgs/core/qt/patches/qt-x11-opensource-src-4.5.1-enable_ft_lcdfilter.patch @@ -0,0 +1,12 @@ +diff -up qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp.enable_ft_lcdfilter qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp +--- qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp.enable_ft_lcdfilter 2009-04-21 18:57:41.000000000 -0500 ++++ qt-x11-opensource-src-4.5.1/src/gui/text/qfontengine_ft.cpp 2009-04-24 11:17:49.562695405 -0500 +@@ -72,7 +72,7 @@ + #include FT_CONFIG_OPTIONS_H + #endif + +-#if defined(FT_LCD_FILTER_H) && defined(FT_CONFIG_OPTION_SUBPIXEL_RENDERING) ++#if defined(FT_LCD_FILTER_H) + #define QT_USE_FREETYPE_LCDFILTER + #endif + diff --git a/pkgs/core/qt/qt.nm b/pkgs/core/qt/qt.nm index 1629bdc..287121c 100644 --- a/pkgs/core/qt/qt.nm +++ b/pkgs/core/qt/qt.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include
PKG_NAME = qt PKG_VER = 4.7.0 -PKG_REL = 1 +PKG_REL = 3
PKG_MAINTAINER = PKG_GROUP = System/Libraries @@ -125,11 +125,4 @@ endef
define STAGE_INSTALL cd $(DIR_APP) && make install INSTALL_ROOT=$(BUILDROOT) - - # Remove libs for Qt designer - rm -rvf $(BUILDROOT)/usr/lib/libQtDesigner* - - # Remove translations for Qt assistant and designer - rm -rvf $(BUILDROOT)/usr/share/qt4/translations/assistant* - rm -rvf $(BUILDROOT)/usr/share/qt4/translations/designer* endef diff --git a/pkgs/core/sip/sip.nm b/pkgs/core/sip/sip.nm index 3b3ac15..489905e 100644 --- a/pkgs/core/sip/sip.nm +++ b/pkgs/core/sip/sip.nm @@ -25,8 +25,8 @@ include $(PKGROOT)/Include
PKG_NAME = sip -PKG_VER = 4.11.2 -PKG_REL = 1 +PKG_VER = 4.12-snapshot-12acbffd0085 +PKG_REL = 0 PKG_EPOCH = 1
PKG_MAINTAINER =
hooks/post-receive -- IPFire 3.x development tree