gcc: added patch to fix http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21304. Thanks Daniel.
This commit is contained in:
parent
8538898507
commit
cb53a9a96b
@ -1 +1,2 @@
|
||||
31e541f9ac2c8613bc92b91db453f0a9 gcc-4.0.3-latentbug-addrefvars.patch
|
||||
6ff1af12c53cbb3f79b27f2d6a9a3d50 gcc-4.0.3.tar.bz2
|
||||
|
15
gcc/Pkgfile
15
gcc/Pkgfile
@ -4,10 +4,15 @@
|
||||
|
||||
name=gcc
|
||||
version=4.0.3
|
||||
release=1
|
||||
source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-$version.tar.bz2)
|
||||
|
||||
release=2
|
||||
source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-$version.tar.bz2 \
|
||||
$name-$version-latentbug-addrefvars.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
patch -p1 < $SRC/$name-$version-latentbug-addrefvars.patch
|
||||
cd ..
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
../$name-$version/configure --prefix=/usr \
|
||||
@ -19,9 +24,11 @@ build() {
|
||||
--enable-shared \
|
||||
--disable-nls \
|
||||
--with-x=no
|
||||
|
||||
make bootstrap
|
||||
make check | tee ~/gcc-${version}_make_test_resul
|
||||
make check
|
||||
make DESTDIR=$PKG install
|
||||
|
||||
mkdir $PKG/lib
|
||||
ln -sf ../usr/bin/cpp $PKG/lib/cpp
|
||||
ln -sf gcc $PKG/usr/bin/cc
|
||||
|
25
gcc/gcc-4.0.3-latentbug-addrefvars.patch
Normal file
25
gcc/gcc-4.0.3-latentbug-addrefvars.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -Nru gcc-4.0.3-old/gcc/tree-dfa.c gcc-4.0.3/gcc/tree-dfa.c
|
||||
--- gcc-4.0.3-old/gcc/tree-dfa.c 2006-03-14 03:13:30.000000000 +0100
|
||||
+++ gcc-4.0.3/gcc/tree-dfa.c 2006-03-14 03:16:56.000000000 +0100
|
||||
@@ -898,10 +898,18 @@
|
||||
if (is_global_var (var))
|
||||
mark_call_clobbered (var);
|
||||
|
||||
+
|
||||
/* Scan DECL_INITIAL for pointer variables as they may contain
|
||||
- address arithmetic referencing the address of other
|
||||
- variables. */
|
||||
- if (DECL_INITIAL (var))
|
||||
+ address arithmetic referencing the address of other
|
||||
+ variables. */
|
||||
+ if (DECL_INITIAL (var)
|
||||
+ /* Initializers of external variables are not useful to the
|
||||
+ optimizers. */
|
||||
+ && !DECL_EXTERNAL (var)
|
||||
+ /* It's not necessary to walk the initial value of non-constant
|
||||
+ variables because it cannot be propagated by the
|
||||
+ optimizers. */
|
||||
+ && (TREE_CONSTANT (var) || TREE_READONLY (var)))
|
||||
walk_tree (&DECL_INITIAL (var), find_vars_r, walk_state, 0);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user