mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-01-24 18:42:14 +08:00
gcc changes to include ppl and cloog-ppl
This commit is contained in:
parent
5d0cfe5ab7
commit
1679302a28
59
gcc/PKGBUILD
59
gcc/PKGBUILD
@ -3,6 +3,7 @@
|
||||
#
|
||||
# maintainer (i686): Phil Miller <philm[at]chakra-project[dog]org>
|
||||
# maintainer (x86_64): Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
# helper: Allan McRae <allan@archlinux.org>
|
||||
|
||||
# include global config
|
||||
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
@ -12,30 +13,30 @@ source ../_buildscripts/${current_repo}-${_arch}-cfg.conf
|
||||
|
||||
pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-ada')
|
||||
pkgver=4.5.1
|
||||
pkgrel=3
|
||||
#_snapshot=4.5-20100520
|
||||
pkgrel=4
|
||||
#_snapshot=4.5-20100610
|
||||
_libstdcppmanver=20100719 # Note: check source directory name when updating this
|
||||
pkgdesc="The GNU Compiler Collection"
|
||||
arch=('i686' 'x86_64')
|
||||
license=('GPL' 'LGPL' 'custom')
|
||||
url="http://gcc.gnu.org"
|
||||
makedepends=('binutils>=2.20.1' 'libmpc>=0.8.1-2' 'cloog-ppl>=0.15.9-2' 'elfutils' 'gcc-ada')
|
||||
makedepends=('binutils>=2.20.1' 'libmpc>=0.8.2-2' 'cloog-ppl>=0.15.9-2' 'elfutils' 'gcc-ada')
|
||||
options=('!libtool' '!emptydirs')
|
||||
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,ada}-${pkgver}.tar.bz2
|
||||
#ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc,ada}-${_snapshot}.tar.bz2
|
||||
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
|
||||
gcc_pure64.patch
|
||||
gcc-hash-style-both.patch)
|
||||
md5sums=('dc8959e31b01a65ce10d269614815054' # ../_sources/gcc-core-4.5.1.tar.bz2
|
||||
'b294953ff0bb2f20c7acb2bf005d832a' # ../_sources/gcc-g++-4.5.1.tar.bz2
|
||||
'7567c2f8df8a8bf61b48fe414b88de65' # ../_sources/gcc-fortran-4.5.1.tar.bz2
|
||||
'3c11b7037896e967eddf8178af2ddd98' # ../_sources/gcc-objc-4.5.1.tar.bz2
|
||||
'c92111e2e22fc60d1e0adb1b5c7fa4f9' # ../_sources/gcc-ada-4.5.1.tar.bz2
|
||||
'226ae0c6364cfe2c1f7ac88d06088d5a' # ../_sources/libstdc++-api.20100719.man.tar.bz2
|
||||
|
||||
md5sums=('dc8959e31b01a65ce10d269614815054'
|
||||
'b294953ff0bb2f20c7acb2bf005d832a'
|
||||
'7567c2f8df8a8bf61b48fe414b88de65'
|
||||
'3c11b7037896e967eddf8178af2ddd98'
|
||||
'c92111e2e22fc60d1e0adb1b5c7fa4f9'
|
||||
'226ae0c6364cfe2c1f7ac88d06088d5a'
|
||||
'4030ee1c08dd1e843c0225b772360e76'
|
||||
'6fd395bacbd7b6e47c7b74854b478363')
|
||||
|
||||
|
||||
if [ -n "${_snapshot}" ]; then
|
||||
_basedir="${srcdir}/gcc-${_snapshot}"
|
||||
else
|
||||
@ -45,16 +46,14 @@ fi
|
||||
build() {
|
||||
if ! locale -a | grep ^de_DE > /dev/null; then
|
||||
echo "You need the de_DE locale to build gcc."
|
||||
echo "Enable followed locales in /etc/locale.gen"
|
||||
echo " de_DE.UTF-8"
|
||||
echo " de_DE.ISO-8859-1"
|
||||
echo " de_DE.ISO-8859-15@euro"
|
||||
echo "and run > sudo locale-gen"
|
||||
return 1
|
||||
fi
|
||||
|
||||
cd ${_basedir}
|
||||
|
||||
# "Add" ppl-0.11 compatibility
|
||||
sed -i "/ppl_minor_version=/s#10#11#" configure
|
||||
|
||||
# Do not install libiberty
|
||||
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
|
||||
|
||||
@ -62,13 +61,13 @@ build() {
|
||||
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
|
||||
|
||||
if [ "${CARCH}" = "x86_64" ]; then
|
||||
patch -Np1 -i ../gcc_pure64.patch || return 1
|
||||
patch -Np1 -i ../gcc_pure64.patch
|
||||
fi
|
||||
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch || return 1
|
||||
patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
|
||||
|
||||
echo ${pkgver} > gcc/BASE-VER
|
||||
|
||||
mkdir build -p && cd build
|
||||
mkdir build && cd build
|
||||
../configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada \
|
||||
--enable-shared --enable-threads=posix --enable-__cxa_atexit \
|
||||
--enable-clocale=gnu --enable-gnu-unique-object \
|
||||
@ -77,7 +76,7 @@ build() {
|
||||
--with-system-zlib --with-ppl --with-cloog \
|
||||
--libdir=/usr/lib --libexecdir=/usr/lib \
|
||||
--mandir=/usr/share/man --infodir=/usr/share/info
|
||||
make || return 1
|
||||
make
|
||||
}
|
||||
|
||||
package_gcc-libs()
|
||||
@ -118,14 +117,14 @@ package_gcc()
|
||||
cd ${_basedir}/build
|
||||
|
||||
# much, much easier to install the lot and clean-up the mess
|
||||
make -j1 DESTDIR=${pkgdir} install || return 1
|
||||
rm -rf $pkgdir/usr/bin/{*gfortran,gnat*}
|
||||
rm -rf $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}/*
|
||||
rm -rf $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,libgfortranbegin.a,gnat1}
|
||||
rm -rf $pkgdir/usr/lib/{*.so*,lib{gfortran,objc}.a}
|
||||
rm -rf $pkgdir/usr/share/info/{gfortran,gnat*,libgomp}.info
|
||||
rm -rf $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
|
||||
rm -rf $pkgdir/usr/share/man/man1/gfortran.1
|
||||
make -j1 DESTDIR=${pkgdir} install
|
||||
rm $pkgdir/usr/bin/{*gfortran,gnat*}
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{ada{include,lib},finclude,include/objc}/*
|
||||
rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,libgfortranbegin.a}
|
||||
rm $pkgdir/usr/lib/{*.so*,lib{gfortran,objc}.a}
|
||||
rm $pkgdir/usr/share/info/{gfortran,gnat*,libgomp}.info
|
||||
rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
|
||||
rm $pkgdir/usr/share/man/man1/gfortran.1
|
||||
|
||||
# many packages require these symlinks
|
||||
install -dm755 ${pkgdir}/lib
|
||||
@ -167,7 +166,7 @@ EOF
|
||||
install -m644 ${srcdir}/libstdc++-api-${_libstdcppmanver}.man/man3/* \
|
||||
${pkgdir}/usr/share/man/man3/
|
||||
# deal with conflicts...
|
||||
rm -rf ${pkgdir}/usr/share/man/man3/{ctime,queue,random,regex,string}.3
|
||||
rm -f ${pkgdir}/usr/share/man/man3/{ctime,queue,random,regex,string}.3
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
@ -187,7 +186,7 @@ package_gcc-fortran()
|
||||
install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
|
||||
|
||||
# remove libraries included in gcc-libs
|
||||
rm -rf ${pkgdir}/usr/lib/libgfortran.so*
|
||||
rm -f ${pkgdir}/usr/lib/libgfortran.so*
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
@ -205,7 +204,7 @@ package_gcc-objc()
|
||||
install -m755 gcc/cc1obj{,plus} $pkgdir/usr/lib/gcc/$CHOST/$pkgver/
|
||||
|
||||
# remove libraries included in gcc-libs
|
||||
rm -rf ${pkgdir}/usr/lib/libobjc.so*
|
||||
rm -f ${pkgdir}/usr/lib/libobjc.so*
|
||||
|
||||
# Install Runtime Library Exception
|
||||
install -Dm644 ${_basedir}/COPYING.RUNTIME \
|
||||
|
@ -1,117 +0,0 @@
|
||||
--- branches/gcc-4_5-branch/gcc/tree-sra.c 2010/04/23 16:15:39 158674
|
||||
+++ branches/gcc-4_5-branch/gcc/tree-sra.c 2010/04/28 13:09:56 158826
|
||||
@@ -182,6 +182,10 @@
|
||||
access tree. */
|
||||
unsigned grp_read : 1;
|
||||
|
||||
+ /* Does this group contain a read access that comes from an assignment
|
||||
+ statement? This flag is propagated down the access tree. */
|
||||
+ unsigned grp_assignment_read : 1;
|
||||
+
|
||||
/* Other passes of the analysis use this bit to make function
|
||||
analyze_access_subtree create scalar replacements for this group if
|
||||
possible. */
|
||||
@@ -1031,9 +1035,13 @@
|
||||
racc = build_access_from_expr_1 (rhs_ptr, stmt, false);
|
||||
lacc = build_access_from_expr_1 (lhs_ptr, stmt, true);
|
||||
|
||||
- if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
|
||||
- && racc && !is_gimple_reg_type (racc->type))
|
||||
- bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base));
|
||||
+ if (racc)
|
||||
+ {
|
||||
+ racc->grp_assignment_read = 1;
|
||||
+ if (should_scalarize_away_bitmap && !gimple_has_volatile_ops (stmt)
|
||||
+ && !is_gimple_reg_type (racc->type))
|
||||
+ bitmap_set_bit (should_scalarize_away_bitmap, DECL_UID (racc->base));
|
||||
+ }
|
||||
|
||||
if (lacc && racc
|
||||
&& (sra_mode == SRA_MODE_EARLY_INTRA || sra_mode == SRA_MODE_INTRA)
|
||||
@@ -1578,6 +1586,7 @@
|
||||
struct access *access = VEC_index (access_p, access_vec, i);
|
||||
bool grp_write = access->write;
|
||||
bool grp_read = !access->write;
|
||||
+ bool grp_assignment_read = access->grp_assignment_read;
|
||||
bool multiple_reads = false;
|
||||
bool total_scalarization = access->total_scalarization;
|
||||
bool grp_partial_lhs = access->grp_partial_lhs;
|
||||
@@ -1611,6 +1620,7 @@
|
||||
else
|
||||
grp_read = true;
|
||||
}
|
||||
+ grp_assignment_read |= ac2->grp_assignment_read;
|
||||
grp_partial_lhs |= ac2->grp_partial_lhs;
|
||||
unscalarizable_region |= ac2->grp_unscalarizable_region;
|
||||
total_scalarization |= ac2->total_scalarization;
|
||||
@@ -1629,6 +1639,7 @@
|
||||
access->group_representative = access;
|
||||
access->grp_write = grp_write;
|
||||
access->grp_read = grp_read;
|
||||
+ access->grp_assignment_read = grp_assignment_read;
|
||||
access->grp_hint = multiple_reads || total_scalarization;
|
||||
access->grp_partial_lhs = grp_partial_lhs;
|
||||
access->grp_unscalarizable_region = unscalarizable_region;
|
||||
@@ -1763,14 +1774,17 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
+enum mark_read_status { SRA_MR_NOT_READ, SRA_MR_READ, SRA_MR_ASSIGN_READ};
|
||||
+
|
||||
/* Analyze the subtree of accesses rooted in ROOT, scheduling replacements when
|
||||
- both seeming beneficial and when ALLOW_REPLACEMENTS allows it. Also set
|
||||
- all sorts of access flags appropriately along the way, notably always ser
|
||||
- grp_read when MARK_READ is true and grp_write when MARK_WRITE is true. */
|
||||
+ both seeming beneficial and when ALLOW_REPLACEMENTS allows it. Also set all
|
||||
+ sorts of access flags appropriately along the way, notably always set
|
||||
+ grp_read and grp_assign_read according to MARK_READ and grp_write when
|
||||
+ MARK_WRITE is true. */
|
||||
|
||||
static bool
|
||||
analyze_access_subtree (struct access *root, bool allow_replacements,
|
||||
- bool mark_read, bool mark_write)
|
||||
+ enum mark_read_status mark_read, bool mark_write)
|
||||
{
|
||||
struct access *child;
|
||||
HOST_WIDE_INT limit = root->offset + root->size;
|
||||
@@ -1779,10 +1793,17 @@
|
||||
bool hole = false, sth_created = false;
|
||||
bool direct_read = root->grp_read;
|
||||
|
||||
- if (mark_read)
|
||||
- root->grp_read = true;
|
||||
+ if (mark_read == SRA_MR_ASSIGN_READ)
|
||||
+ {
|
||||
+ root->grp_read = 1;
|
||||
+ root->grp_assignment_read = 1;
|
||||
+ }
|
||||
+ if (mark_read == SRA_MR_READ)
|
||||
+ root->grp_read = 1;
|
||||
+ else if (root->grp_assignment_read)
|
||||
+ mark_read = SRA_MR_ASSIGN_READ;
|
||||
else if (root->grp_read)
|
||||
- mark_read = true;
|
||||
+ mark_read = SRA_MR_READ;
|
||||
|
||||
if (mark_write)
|
||||
root->grp_write = true;
|
||||
@@ -1811,7 +1832,7 @@
|
||||
|
||||
if (allow_replacements && scalar && !root->first_child
|
||||
&& (root->grp_hint
|
||||
- || (direct_read && root->grp_write))
|
||||
+ || (root->grp_write && (direct_read || root->grp_assignment_read)))
|
||||
/* We must not ICE later on when trying to build an access to the
|
||||
original data within the aggregate even when it is impossible to do in
|
||||
a defined way like in the PR 42703 testcase. Therefore we check
|
||||
@@ -1856,7 +1877,7 @@
|
||||
|
||||
while (access)
|
||||
{
|
||||
- if (analyze_access_subtree (access, true, false, false))
|
||||
+ if (analyze_access_subtree (access, true, SRA_MR_NOT_READ, false))
|
||||
ret = true;
|
||||
access = access->next_grp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user