summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Brindle <method@gentoo.org>2003-03-26 20:42:20 +0000
committerJoshua Brindle <method@gentoo.org>2003-03-26 20:42:20 +0000
commit3978ff74a86f55b49582fbb848a547d51aa8d691 (patch)
tree3584f292c615974ffceb692ef4eff84153445615 /sys-devel
parentlooks for gentoo-${PV}.patch now (diff)
downloadgentoo-2-3978ff74a86f55b49582fbb848a547d51aa8d691.tar.gz
gentoo-2-3978ff74a86f55b49582fbb848a547d51aa8d691.tar.bz2
gentoo-2-3978ff74a86f55b49582fbb848a547d51aa8d691.zip
froggers propolice patches
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gcc/ChangeLog12
-rw-r--r--sys-devel/gcc/files/3.2/gcc-322-r3-propolice-version.patch17
-rw-r--r--sys-devel/gcc/files/3.2/protector.patch37
-rw-r--r--sys-devel/gcc/files/digest-gcc-3.2.2-r33
-rw-r--r--sys-devel/gcc/gcc-3.2.2-r3.ebuild10
5 files changed, 56 insertions, 23 deletions
diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog
index 6792d2473e43..4f31d287ee1e 100644
--- a/sys-devel/gcc/ChangeLog
+++ b/sys-devel/gcc/ChangeLog
@@ -1,6 +1,6 @@
# ChangeLog for sys-devel/gcc
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.82 2003/03/24 21:31:26 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/ChangeLog,v 1.83 2003/03/26 20:42:20 method Exp $
24 Mar 2003; Martin Schlemmer <azarah@gentoo.org> :
- Fix latest ebuild to only build static if we are just building the C
@@ -36,8 +36,14 @@
*gcc-3.2.2-r3 (03 Mar 2003)
- 23 Mar 2003; Joshua Brindle <method@gentoo.org> gcc-3.2.2-r3.ebuild:
- Added propolice support, to enable use -fstack-protector
+ 26 Mar 2003; Matthew Rickard <frogger@gentoo.org> gcc-3.2.2-r3.ebuild,
+ files/3.2/protector.patch:
+ - Updated ProPolice patch to protector-3.2.2-4.tar.gz
+ - Removed unneeded comments in ebuild about a patch we aren't applying anymore.
+ - Added gcc-322-r3-propolice-version.patch which will add propolice to the
+ gcc version string. This is necessary for xfree to build correctly with
+ stack protection.
+ - Added -fstack-protector to the list of known good CFLAGS
05 Mar 2003; Joshua Brindle <method@gentoo.org> gcc-3.2.2-r3.ebuild :
replace-flags for pentium4 for bug #16867, add optimizations for x86 only
diff --git a/sys-devel/gcc/files/3.2/gcc-322-r3-propolice-version.patch b/sys-devel/gcc/files/3.2/gcc-322-r3-propolice-version.patch
new file mode 100644
index 000000000000..26f157b01acb
--- /dev/null
+++ b/sys-devel/gcc/files/3.2/gcc-322-r3-propolice-version.patch
@@ -0,0 +1,17 @@
+--- gcc/version.c.old 2003-03-26 10:43:47.000000000 -0500
++++ gcc/version.c 2003-03-26 10:44:13.000000000 -0500
+@@ -1,4 +1,4 @@
+ #include "ansidecl.h"
+ #include "version.h"
+
+-const char *const version_string = "3.2.2 20030322 (Gentoo Linux 1.4 3.2.2-r2)";
++const char *const version_string = "3.2.2 20030322 (Gentoo Linux 1.4 3.2.2-r3, propolice)";
+
+--- gcc/f/version.c.old 2003-03-26 10:43:54.000000000 -0500
++++ gcc/f/version.c 2003-03-26 10:44:27.000000000 -0500
+@@ -1,4 +1,4 @@
+ #include "ansidecl.h"
+ #include "f/version.h"
+
+-const char *const ffe_version_string = "3.2.2 20030322 (Gentoo Linux 1.4 3.2.2-r2)";
++const char *const ffe_version_string = "3.2.2 20030322 (Gentoo Linux 1.4 3.2.2-r3, propolice)";
diff --git a/sys-devel/gcc/files/3.2/protector.patch b/sys-devel/gcc/files/3.2/protector.patch
index 3f02e80cf4d0..dba0941458e3 100644
--- a/sys-devel/gcc/files/3.2/protector.patch
+++ b/sys-devel/gcc/files/3.2/protector.patch
@@ -640,13 +640,13 @@ Index: gcc/libgcc2.c
===================================================================
RCS file: /home/cvsroot/gcc/gcc/libgcc2.c,v
retrieving revision 1.1.1.7
-retrieving revision 1.1.1.7.4.1
-diff -c -3 -p -r1.1.1.7 -r1.1.1.7.4.1
+retrieving revision 1.1.1.7.4.2
+diff -c -3 -p -r1.1.1.7 -r1.1.1.7.4.2
*** gcc/libgcc2.c 2002/12/18 00:55:44 1.1.1.7
---- gcc/libgcc2.c 2003/02/26 08:01:02 1.1.1.7.4.1
+--- gcc/libgcc2.c 2003/03/17 13:22:49 1.1.1.7.4.2
*************** atexit (func_ptr func)
*** 2050,2052 ****
---- 2050,2138 ----
+--- 2050,2151 ----
#endif /* NEED_ATEXIT */
#endif /* L_exit */
@@ -694,20 +694,28 @@ diff -c -3 -p -r1.1.1.7 -r1.1.1.7.4.1
+ #if defined (__GNU_LIBRARY__)
+ extern char * __progname;
+ #endif
-+ char message[] = ": stack smashing attack in function ";
++ const char message[] = ": stack smashing attack in function ";
+ int bufsz = 256, len;
+ char buf[bufsz];
+ #if defined(HAVE_SYSLOG)
+ int LogFile;
+ struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
+ #endif
++ #ifdef _POSIX_SOURCE
++ {
++ sigset_t mask;
++ sigfillset(&mask);
++ sigdelset(&mask, SIGABRT); /* Block all signal handlers */
++ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
++ }
++ #endif
+
+ strcpy(buf, "<2>"); len=3; /* send LOG_CRIT */
+ #if defined (__GNU_LIBRARY__)
+ strncat(buf, __progname, bufsz-len-1); len = strlen(buf);
+ #endif
-+ if (bufsz>len) strncat(buf, message, bufsz-len-1); len = strlen(buf);
-+ if (bufsz>len) strncat(buf, func, bufsz-len-1); len = strlen(buf);
++ if (bufsz>len) {strncat(buf, message, bufsz-len-1); len = strlen(buf);}
++ if (bufsz>len) strncat(buf, func, bufsz-len-1);
+
+ /* print error message */
+ write (STDERR_FILENO, buf+3, len-3);
@@ -721,15 +729,20 @@ diff -c -3 -p -r1.1.1.7 -r1.1.1.7.4.1
+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
+ sizeof(SyslogAddr.sun_path) - 1);
+ SyslogAddr.sun_path[sizeof(SyslogAddr.sun_path) - 1] = '\0';
-+ sendto(LogFile, buf, strlen(buf), 0, (struct sockaddr *)&SyslogAddr, sizeof(SyslogAddr));
++ sendto(LogFile, buf, strlen(buf), 0, (struct sockaddr *)&SyslogAddr,
++ sizeof(SyslogAddr));
+ }
+ #endif
+
+ #ifdef _POSIX_SOURCE
-+ {
-+ sigset_t mask;
-+ sigfillset(&mask);
-+ sigdelset(&mask, SIGABRT);
++ { /* Make sure the default handler is associated with SIGABRT */
++ struct sigaction sa;
++
++ memset(&sa, 0, sizeof(struct sigaction));
++ sigfillset(&sa.sa_mask); /* Block all signals */
++ sa.sa_flags = 0;
++ sa.sa_handler = SIG_DFL;
++ sigaction(SIGABRT, &sa, NULL);
+ (void)kill(getpid(), SIGABRT);
+ }
+ #endif
diff --git a/sys-devel/gcc/files/digest-gcc-3.2.2-r3 b/sys-devel/gcc/files/digest-gcc-3.2.2-r3
index 7d38323148b9..cb247aa4b1d0 100644
--- a/sys-devel/gcc/files/digest-gcc-3.2.2-r3
+++ b/sys-devel/gcc/files/digest-gcc-3.2.2-r3
@@ -1,3 +1,2 @@
MD5 962a2057a2572226bc99aaeba4255e9b gcc-3.2.2.tar.bz2 20311217
-MD5 c71dd70b642cde15c96adaf87a429e3a gcc-3.2.2-branch-update-20030322.patch.bz2 72073
-MD5 232534e6fbe25667b95c7f668f0d11ef gcc-3.2.2-tls-update2.patch.bz2 595649
+MD5 74f9a0e9572b2ad94aebfc2540f93c39 gcc-3.2.2-tls-update.patch.bz2 603111
diff --git a/sys-devel/gcc/gcc-3.2.2-r3.ebuild b/sys-devel/gcc/gcc-3.2.2-r3.ebuild
index 4eb5da04111f..b9a0f616c898 100644
--- a/sys-devel/gcc/gcc-3.2.2-r3.ebuild
+++ b/sys-devel/gcc/gcc-3.2.2-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r3.ebuild,v 1.8 2003/03/24 22:07:22 method Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.2.2-r3.ebuild,v 1.9 2003/03/26 20:42:20 method Exp $
IUSE="static nls bootstrap java build"
@@ -34,7 +34,7 @@ inherit eutils flag-o-matic libtool
# We allow known good gcc optimizations now (only for x86)
# Joshua Brindle <method@gentoo.org> (04 Mar 2003)
if [ "${ARCH}" = "x86" ]; then
- ALLOWED_FLAGS="-O -O1 -O2 -Os -O3 -mcpu -march -pipe -g -freorder-blocks -fprefetch-loop-arrays"
+ ALLOWED_FLAGS="-O -O1 -O2 -Os -O3 -mcpu -march -pipe -g -freorder-blocks -fprefetch-loop-arrays -fstack-protector"
#Bug #16867, -march=pentium4 does not work, we'll replace it with -march=pentium3
replace-flags "-march=pentium4" "-march=pentium3"
fi
@@ -184,12 +184,10 @@ src_unpack() {
epatch ${FILESDIR}/3.2.1/gcc32-athlon-alignment.patch
# ProPolice Stack Smashing protection
- epatch ${FILESDIR}/3.2/protector.patch || die "propolice patch failed"
- # The following patch enables protection by default. We don't
- # want this as it causes problems with things like the kernel
- # (among others).
+ epatch ${FILESDIR}/3.2/protector.patch
cp ${FILESDIR}/3.2/protector.c ${WORKDIR}/${P}/gcc/ || die "protector.c not found"
cp ${FILESDIR}/3.2/protector.h ${WORKDIR}/${P}/gcc/ || die "protector.h not found"
+ epatch ${FILESDIR}/3.2/gcc-322-r3-propolice-version.patch
# GCC bugfixes ...