gcc7-talimat

This commit is contained in:
milisbir 2018-11-08 16:13:06 +02:00
parent 987cde0e53
commit e3e22770c2
2 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,27 @@
Index: gcc/testsuite/g++.dg/cpp1y/auto-fn47.C
===================================================================
--- gcc/testsuite/g++.dg/cpp1y/auto-fn47.C (nonexistent)
+++ gcc/testsuite/g++.dg/cpp1y/auto-fn47.C (revision 257630)
@@ -0,0 +1,6 @@
+// PR c++/84080
+// { dg-do compile { target c++14 } }
+
+template <int i, typename T> T foo();
+
+template <> auto foo<0>() { return 42; } // { dg-error "does not match" }
Index: gcc/cp/pt.c
===================================================================
--- gcc/cp/pt.c (revision 257629)
+++ gcc/cp/pt.c (revision 257630)
@@ -2203,6 +2203,11 @@
specialize TMPL will produce DECL. */
continue;
+ if (uses_template_parms (targs))
+ /* We deduced something involving 'auto', which isn't a valid
+ template argument. */
+ continue;
+
/* Remove, from the set of candidates, all those functions
whose constraints are not satisfied. */
if (flag_concepts && !constraints_satisfied_p (fn, targs))

View File

@ -0,0 +1,79 @@
# Tanım: GNU C Derleyici Araçları
# URL: http://gcc.gnu.org
# Paketçi: milisarge
# Gerekler:
# Grup: sistem
isim=gcc7
surum=7.3.0
devir=1
kaynak=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$surum/gcc-$surum.tar.xz
http://isl.gforge.inria.fr/isl-0.18.tar.bz2
bz84080.patch)
derle() {
cd gcc-$surum
patch -p0 -i "$SRC/bz84080.patch"
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
ln -s ../isl-0.18 isl
_surum=7
comphost="x86_64-pc-linux-gnu"
_libdir=usr/lib/gcc/$comphost/${surum}
mkdir build
cd build
CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/}
#ln -s /usr/lib64/* /usr/lib/
../configure --prefix=/usr \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--enable-languages=c,c++,lto \
--enable-shared \
--enable-threads=posix \
--enable-libmpx \
--with-system-zlib \
--with-isl \
--enable-__cxa_atexit \
--disable-libunwind-exceptions \
--enable-clocale=gnu \
--disable-libstdcxx-pch \
--disable-libssp \
--enable-gnu-unique-object \
--enable-linker-build-id \
--enable-lto \
--enable-plugin \
--enable-install-libiberty \
--with-linker-hash-style=gnu \
--enable-gnu-indirect-function \
--disable-werror \
--enable-checking=release \
--enable-default-pie \
--enable-default-ssp \
--program-suffix=-${_surum} \
--enable-version-specific-runtime-libs \
--disable-multilib
make
make -j2 DESTDIR=$PKG install
mv "$PKG"/usr/lib/libcc1.so* "$PKG"/${_libdir}
rm -rf "$PKG"/usr/lib/libcc1.la
mv $PKG/${_libdir}/include-fixed/{limits.h,syslimits.h} $PKG/${_libdir}/include/
rm -rf $PKG/usr/share/{info,locale,man}
rm -rf $PKG/usr/include
rm -rf $PKG/usr/lib64
rm -rf $PKG/usr/bin/*-linux-gnu-*
rm -rf $PKG/${_libdir}/{install-tools,include-fixed}
rm -rf $PKG/${_libdir}/*.la
rm -rf $PKG/${_libdir}/plugin/libcp1plugin.la
rm -rf $PKG/${_libdir}/plugin/libcc1plugin.la
mv "$PKG"/usr/lib/gcc/$comphost/lib/libgcc_s.so* "$PKG"/$_libdir
rm -rf "$PKG"/usr/lib/gcc/$comphost/lib
ln -s gcc-7 "$PKG"/usr/bin/cc-7
}