--- /dev/null
+all: build
+
+CPUS=$(shell expr `cat /proc/cpuinfo |grep ^processor |tail -1|cut -f 2 -d :` + 1)
+JOPT=$(shell test $(CPUS) -gt 1 && expr $(CPUS) + 1 || echo $(CPUS))
+
+config:
+ ./configure
+
+build:
+ make -C gccbuild -j $(JOPT)
+
+install:
+ make -C gccbuild DESTDIR=`pwd`/debian/gcc-local install
+ mkdir -p debian/gcc-local-lib/usr/local/gcc/lib
+ mkdir -p debian/gcc-local-lib/etc/ld.so.conf.d
+ test -d debian/gcc-local/usr/local/gcc/lib64 && mkdir -p debian/gcc-local-lib/usr/local/gcc/lib64
+ -mv debian/gcc-local/usr/local/gcc/lib/lib*.so* debian/gcc-local-lib/usr/local/gcc/lib
+ -mv debian/gcc-local/usr/local/gcc/lib64/lib*.so* debian/gcc-local-lib/usr/local/gcc/lib64
+ echo '#part of gcc-local-lib package' >debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+ echo '/usr/local/gcc/lib' >>debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+ echo '/usr/local/gcc/lib64' >>debian/gcc-local-lib/etc/ld.so.conf.d/gcc-local.conf
+ mkdir -p debian/gcc-local/usr/local/bin
+ cd debian/gcc-local/usr/local/bin ; ln -sf ../gcc/bin/* .
+
+distclean clean:
+ -rm -rf gccbuild
+
+#distclean: clean
+
+
+%:
+ @echo "Making empty rule" $@
+ @echo 'Should I be worried?'
--- /dev/null
+#!/bin/bash
+
+set -e
+
+test $# -lt 1 && { echo "Usage: $0 tarfile" ; exit 1 ; }
+
+opt=x
+
+#ends in gz?
+test $1 != ${1%.gz} && opt=xz
+test $1 != ${1%.bz2} && opt=xj
+
+tgt=`basename $1`
+tgt=${tgt%.tar*}
+
+ver=${tgt#gcc-}
+
+echo -n "Version number of GCC [$ver]: "
+read v2
+test x$v2 != x && ver=$v2
+
+#unpack
+echo "Deleting old directories"
+fakeroot debian/rules clean
+rm -rf source $tgt gccbuild
+echo "Unpacking GCC $ver from file $1 into $tgt ..."
+cat $1 | ( cd `dirname $0` ; tar $opt ; )
+
+#debian changelog
+cd `dirname $0`
+echo "Creating changelog"
+CL=debian/changelog
+echo 'gcc-local ('$ver') unstable; urgency=low' >$CL
+echo >>$CL
+echo ' * packaging upstream GCC' $ver >>$CL
+echo ' * wrapper package by konrad@silmor.de' >>$CL
+echo >>$CL
+lnam="`logname`"
+test "x$lnam" == x && lnam="`whoami`"
+rnam="$(grep ^`logname`: </etc/passwd | cut -f 5 -d : | cut -f 1 -d ,)"
+test "x$rnam" == x && rnam="$lnam"
+echo ' --' $rnam '<'$lnam'@'`hostname -f`'> ' `date --rfc-822` >>$CL
+
+#build
+echo "Calling debhelper to build..."
+ln -s $tgt source
+fakeroot debian/rules binary
+
--- /dev/null
+#!/bin/bash
+
+echo "Preparing GCC"
+cd `dirname $0`
+mkdir -p gccbuild || true
+cd gccbuild
+arch="`uname -m`-debian-linux-gnu"
+../source/configure --prefix=/usr/local/gcc --disable-multilib --enable-threads --enable-tls --enable-languages=c,c++ --enable-targets=$arch --disable-nls
--- /dev/null
+gcc-local (4.7.0) unstable; urgency=low
+
+ * packaging upstream GCC 4.7.0
+ * wrapper package by konrad@silmor.de
+
+ -- Konrad Rosenbaum <konrad@devant.mine> Wed, 11 Apr 2012 09:05:14 +0200
--- /dev/null
+Source: gcc-local
+Section: unknown
+Priority: extra
+Maintainer: Konrad Rosenbaum <konrad@devant.devant.lan.local>
+Build-Depends: debhelper (>= 7.0.50~)
+Standards-Version: 3.8.4
+Homepage: http://gcc.gnu.org
+
+Package: gcc-local
+Architecture: any
+Depends: gcc-local-lib ${shlibs:Depends}, ${misc:Depends}
+Description: Upstream GCC in /usr/local
+ This package provides the upstream GCC in /usr/local.
+ The GCC version provides may be newer or older than the one provided directly.
+ .
+ It does not interfere much with the distributions' GCC, since it is
+ installed in /usr/local - you can control which one you use by including or
+ excluding /usr/local/bin from your PATH variable.
+ .
+ Only C and C++ are provided, no localization of compiler messages (NLS) is
+ provided.
+ .
+ This package is geared towards users of the newest C++ features.
+
+Package: gcc-local-lib
+Architecture: any
+Description: libraries for gcc-local
+ This package contains the libraries that are needed by programs compiled
+ with gcc-local, e.g. libstdc++.
+ .
+ If you package programs compiled with gcc-local, make them depend on this
+ package to provide the necessary libraries.
--- /dev/null
+This work was packaged for Debian by:
+
+ Konrad Rosenbaum <konrad@silmor.de> on Tue, 10 Apr 2012 18:06:13 +0200
+
+It was downloaded from:
+
+ http://gcc.gnu.org
+
+Copyright:
+
+ GCC is under the GNU GPLv3, see man gpl
+
+This Debian packaging is public domain.
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets by Bill Allombert 2001
+
+all: clean binary
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+
+%:
+ dh $@
--- /dev/null
+3.0 (quilt)
--- /dev/null
+GCC config:
+../gcc-4.7.0/configure --prefix=/usr/local/gcc --disable-multilib --enable-threads --enable-tls --enable-languages=c,c++ --enable-targets=x86_64-debian-linux-gnu --disable-nls
+make
+make DESTDIR=`pwd`/debian/... install
+
+
+ lib: lib*/lib*.so* /etc/ld.so.conf.d/gcc-local.conf
+ main: rest
+
+
+
+
+
+
+
+
+Qt config:
+PATH=/usr/local/gcc/bin:$PATH
+CXXFLAGS=-stdg++0x (mkspecs/
+./configure -nomake demos -nomake examples -opensource -confirm-license
+
+ lib: lib/lib*.so* bin/assistant bin/qtconfig bin/qml* plugins translations imports
+ dev: lib/* include