From 4e87e1ab8000d5bc256c2f68213c6abecbc42340 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 24 Dec 2005 14:54:19 +0000 Subject: [PATCH] Clifford Wolf: Updated gcc-3.4.5 and gcc-3.3.6 [2005121218122605896] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@6774 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/apply-protector.sh | 8 +++-- package/base/gcc/gcc.desc | 8 ++--- package/base/gcc/gcc33/protector-hotfix.diff | 35 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 package/base/gcc/gcc33/protector-hotfix.diff diff --git a/package/base/gcc/apply-protector.sh b/package/base/gcc/apply-protector.sh index 9dea51738..7ceefd303 100644 --- a/package/base/gcc/apply-protector.sh +++ b/package/base/gcc/apply-protector.sh @@ -4,19 +4,21 @@ pfile=$( echo "$3" | grep protector | tr ' ' '\t' | tr -s '\t' | cut -f2 ) if [ "$pfile" ] then tar='tar --use-compress-program=bzip2' - pdif=$($tar -tf $archdir/${pfile/.gz/.bz2} | \ - grep '\.dif$' | grep -v 'protectonly.dif') + pdif=$($tar -tf $archdir/${pfile/.gz/.bz2} | \ + grep '\.dif$' | grep -v 'protectonly\.dif'; ) $tar -xf $archdir/${pfile/.gz/.bz2} # Patch protector.dif a bit to apply against current gcc-3 if test -f $1/package/base/gcc/$2/protector-hotfix.diff; then - patch -p1 < $1/package/base/$2/protector-hotfix.diff + echo "Hotfixing the protector patch .." + patch -p1 < $1/package/base/gcc/$2/protector-hotfix.diff fi # be careful if you enable this, you have to respect $pkg. # Set -fstack-protector as default? # [ $ROCKCFG_PKG_GCC[23]_STACKPRO = 1 ] && patch -p0 < protectonly.dif + echo "Applying the protector patch .." patch -p0 < $pdif if [ $2 != gcc34 ]; then mv protector.{c,h} gcc/ diff --git a/package/base/gcc/gcc.desc b/package/base/gcc/gcc.desc index 412dd1f19..506934a29 100644 --- a/package/base/gcc/gcc.desc +++ b/package/base/gcc/gcc.desc @@ -59,14 +59,14 @@ #endif #if xpkg == gcc33.* -[V] 3.3.5 -[D] 1892323860 gcc-3.3.5.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.3.5/ +[V] 3.3.6 +[D] 3201207174 gcc-3.3.6.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.3.6/ [D] 3472291992 protector-3.3-7.tar.gz http://www.research.ibm.com/trl/projects/security/ssp/gcc3_3/ #endif #if xpkg == gcc34.* -[V] 3.4.4 -[D] 1929991607 gcc-3.4.4.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.4.4/ +[V] 3.4.5 +[D] 2687631868 gcc-3.4.5.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.4.5/ [D] 365541092 protector-3.4.4-1.tar.gz http://www.research.ibm.com/trl/projects/security/ssp/gcc3_4_4/ #endif diff --git a/package/base/gcc/gcc33/protector-hotfix.diff b/package/base/gcc/gcc33/protector-hotfix.diff new file mode 100644 index 000000000..c16a470a5 --- /dev/null +++ b/package/base/gcc/gcc33/protector-hotfix.diff @@ -0,0 +1,35 @@ +--- ./protector.dif.orig 2005-12-12 18:08:37.000000000 +0100 ++++ ./protector.dif 2005-12-12 18:09:04.000000000 +0100 +@@ -573,24 +573,23 @@ + /* P comes after Q; combine P into Q. */ + q->size += p->size; + *************** put_reg_into_stack (function, reg, type, +-*** 1497,1503 **** +- new = func->x_parm_reg_stack_loc[regno]; ++*** 1513,1518 **** + + if (new == 0) +-! new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func); ++! new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), ++! consecutive_p ? -2 : 0, func); + + PUT_CODE (reg, MEM); +- PUT_MODE (reg, decl_mode); +---- 1512,1520 ---- +- new = func->x_parm_reg_stack_loc[regno]; ++--- 1513,1521 ---- + + if (new == 0) + ! new = function ? +-! assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func): +-! assign_stack_local_for_pseudo_reg (decl_mode, GET_MODE_SIZE (decl_mode), 0); ++! assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), ++! consecutive_p ? -2 : 0, func) : ++! assign_stack_local_for_pseudo_reg (decl_mode, GET_MODE_SIZE (decl_mode), ++! consecutive_p ? -2 : 0); + + PUT_CODE (reg, MEM); +- PUT_MODE (reg, decl_mode); + *************** instantiate_virtual_regs_1 (loc, object, + *** 3961,3967 **** + constant with that register. */