pentium-builder-0.20/0002755000000000000000000000000012626707053011440 5ustar pentium-builder-0.20/builder-cc.10000644000000000000000000000273210476725712013540 0ustar .TH BUILDER-CC 1 "2002-03-02" "Debian Project" "Debian GNU/Linux" .SH NAME builder-cc \- gcc wrapper to facilitate pentium-optimizations .SH SYNOPSIS .BI "export DEBIAN_BUILDARCH=" "architecture" .br .BI "export DEBIAN_BUILDGCCVER=" "gcc-version" .br .B gcc .I ... .SH "DESCRIPTION" The .B builder-cc wrapper is normally used by calling .B gcc as usual. If the environment variable .B DEBIAN_BUILDARCH is not set, .B builder-cc does nothing, and the real .B gcc is invoked with the specified arguments. When the .B DEBIAN_BUILDARCH environment variable is set, .B builder-cc invokes .B gcc with the specified arguments, plus .IB "-mcpu=" "DEBIAN_BUILDARCH" .IB "-march=" "DEBIAN_BUILDARCH" This has the effect of telling .B gcc to use architecture-specific optimizations without changing the command line. This is particularly useful for package builds. If .B DEBIAN_BUILDGCCVER is not set, .B builder-cc calls .BR gcc.real . If .B DEBIAN_BUILDGCCVER is set, .B builder-cc calls .B gcc-DEBIAN_BUILDGCCVER instead. .SH ENVIRONMENT .IP DEBIAN_BUILDARCH If set, the architecture to compile for. Useful values are .B pentium or .BR pentiumpro . .IP DEBIAN_BUILDGCCVER If set, the version of gcc to be invoked. Useful values are .B 3.0 or .BR 2.95 . .SH NOTES The real .B gcc is renamed .BR gcc.real , and a diversion is registered with .BR dpkg-divert (1). Thus .BR builder-cc 's idea of the default .B gcc is dictated by whatever package installed .IR /usr/bin/gcc . .SH "SEE ALSO" .BR gcc (1) pentium-builder-0.20/builder-c++.10000644000000000000000000000274410476725712013526 0ustar .TH BUILDER-C++ 1 "2002-03-02" "Debian Project" "Debian GNU/Linux" .SH NAME builder-c++ \- g++ wrapper to facilitate pentium-optimizations .SH SYNOPSIS .BI "export DEBIAN_BUILDARCH=" "architecture" .br .BI "export DEBIAN_BUILDGCCVER=" "gcc-version" .br .B g++ .I ... .SH "DESCRIPTION" The .B builder-c++ wrapper is normally used by calling .B g++ as usual. If the environment variable .B DEBIAN_BUILDARCH is not set, .B builder-c++ does nothing, and the real .B g++ is invoked with the specified arguments. When the .B DEBIAN_BUILDARCH environment variable is set, .B builder-c++ invokes .B g++ with the specified arguments, plus .IB "-mcpu=" "DEBIAN_BUILDARCH" .IB "-march=" "DEBIAN_BUILDARCH" This has the effect of telling .B g++ to use architecture-specific optimizations without changing the command line. This is particularly useful for package builds. If .B DEBIAN_BUILDGCCVER is not set, .B builder-c++ calls .BR g++.real . If .B DEBIAN_BUILDGCCVER is set, .B builder-c++ calls .B g++-DEBIAN_BUILDGCCVER instead. .SH ENVIRONMENT .IP DEBIAN_BUILDARCH If set, the architecture to compile for. Useful values are .B pentium or .BR pentiumpro . .IP DEBIAN_BUILDGCCVER If set, the version of g++ to be invoked. Useful values are .B 3.0 or .BR 2.95 . .SH NOTES The real .B g++ is renamed .BR g++.real , and a diversion is registered with .BR dpkg-divert (1). Thus .BR builder-c++ 's idea of the default .B g++ is dictated by whatever package installed .IR /usr/bin/g++ . .SH "SEE ALSO" .BR g++ (1) pentium-builder-0.20/debian/0002755000000000000000000000000012626707053012662 5ustar pentium-builder-0.20/debian/manpages0000644000000000000000000000003307324436744014377 0ustar builder-cc.1 builder-c++.1 pentium-builder-0.20/debian/rules0000755000000000000000000000243612626706540013745 0ustar #!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 build: build-stamp build-stamp: dh_testdir # Add here commands to compile the package. #$(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp # Add here commands to clean up after the build process. #-$(MAKE) clean #-$(MAKE) distclean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs usr/bin install builder-cc builder-c++ debian/pentium-builder/usr/bin dh_link usr/bin/builder-cc usr/bin/gcc \ usr/bin/builder-c++ usr/bin/g++ # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install # dh_testversion dh_perl dh_testdir dh_testroot dh_installdocs dh_installexamples dh_installmenu # dh_installinit dh_installcron dh_installman # dh_undocumented dh_installchangelogs dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol # dh_makeshlibs dh_md5sums dh_builddeb source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary pentium-builder-0.20/debian/prerm0000644000000000000000000000024607034737756013744 0ustar #!/bin/sh -e if [ $1 != "upgrade" ]; then update-alternatives --remove cc /usr/bin/builder-cc update-alternatives --remove c++ /usr/bin/builder-c++ fi #DEBHELPER# pentium-builder-0.20/debian/preinst0000644000000000000000000000061707036763226014276 0ustar #!/bin/sh -e if [ "install" = "$1" ] || [ "upgrade" = "$1" ]; then dpkg-divert --package pentium-builder --add --rename \ --divert /usr/bin/gcc.real /usr/bin/gcc dpkg-divert --package pentium-builder --add --rename \ --divert /usr/bin/g++.real /usr/bin/g++ # Clean up after an upgrade nightmare. if [ -f /usr/bin/c++ -a -e /usr/bin/c++.real ]; then rm -f /usr/bin/c++ fi fi #DEBHELPER# pentium-builder-0.20/debian/postrm0000644000000000000000000000022007251526776014132 0ustar #!/bin/sh -e if [ "$1" = remove ]; then dpkg-divert --rename --remove /usr/bin/gcc dpkg-divert --rename --remove /usr/bin/g++ fi #DEBHELPER# pentium-builder-0.20/debian/postinst0000644000000000000000000000111410476725712014466 0ustar #!/bin/sh -e if [ "$1" = "configure" ]; then if [ -d /usr/doc -a -h /usr/doc/pentium-builder -a -d /usr/share/doc/pentium-builder ]; then rm -f /usr/doc/pentium-builder fi fi #DEBHELPER# # Old cruft dpkg-divert --rename --remove /usr/bin/c++ update-alternatives --install /usr/bin/cc cc /usr/bin/builder-cc 100 \ --slave /usr/share/man/man1/cc.1.gz cc.1.gz /usr/share/man/man1/gcc.1.gz update-alternatives --install /usr/bin/c++ c++ /usr/bin/builder-c++ 100 \ --slave /usr/share/man/man1/c++.1.gz c++.1.gz /usr/share/man/man1/g++.1.gz #DEBHELPER# pentium-builder-0.20/debian/copyright0000644000000000000000000000167607522723507014626 0ustar pentium-builder - gcc/g++ wrapper for architecture-specific optimizations Copyright (C) 2001, 2002 by Alex Pennace Copyright (C) 2001 by Adrian Bunk Copyright (C) 1998-2001 by Joey Hess This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA On Debian systems, the GPL may be found at /usr/share/common-licenses/GPL. pentium-builder-0.20/debian/control0000644000000000000000000000114007324435617014262 0ustar Source: pentium-builder Section: devel Priority: extra Build-Depends: debhelper Maintainer: Alex Pennace Standards-Version: 3.5.5.0 Package: pentium-builder Architecture: all Depends: gcc | g++, ${perl:Depends} Description: force pentium optimized compilation Replaces gcc, cc, and g++ with scripts that build pentium optimized code. (Other processors can be optimized for as well.) . By default, after installing this package, the compilers will behave normally. However, if the environment variable DEBIAN_BUILDARCH=pentium is set, they will enter pentium optimized compile mode. pentium-builder-0.20/debian/changelog0000644000000000000000000001372312626706773014550 0ustar pentium-builder (0.20) unstable; urgency=low * Bump debhelper compat level (Closes: #800199). -- Alex Pennace Sun, 29 Nov 2015 18:44:57 -0500 pentium-builder (0.19) unstable; urgency=low * Not entirely sure about making this package non-native. * Acknowledge NMU, thanks Amaya Rodrigo Sastre (Closes: #359560, #169159). * Fixed bug where it doesn't handle DEBIAN_BUILDGCCVER being defined while DEBIAN_BUILDARCH is not, thanks Michael Blakeley (Closes: #322959). -- Alex Pennace Mon, 4 Sep 2006 23:38:17 -0400 pentium-builder (0.18-1.1) unstable; urgency=low * Non-maintainer upload. * Get rid of the /usr/doc link in postinst (Closes: #359560). * Change occurences of DEBAIN to DEBIAN in manpages (Closes: #169159). * Package switches from native to non-native -- Amaya Rodrigo Sastre Mon, 17 Jul 2006 20:03:49 +0200 pentium-builder (0.18) unstable; urgency=low * Horrible bug: the pentium-builder scripts fail silently and indicate success to the parent process if they are unable to execute the real compiler. Execution can fail due to a variety of temporary or permanent problems. In the case of pentium-builder, the chief problem was calling a binary that wasn't there. pentium-builder now prints a diagnostic and terminates with a non-zero exit code if execution fails. Thanks Francesco Potorti`. (closes: Bug#151077) * Updated copyright. -- Alex Pennace Sat, 3 Aug 2002 06:10:57 -0400 pentium-builder (0.17) unstable; urgency=low * Acknowledge NMU, thanks Junichi Uekawa. (closes: Bug#126243) * Cleaned up man pages. -- Alex Pennace Sat, 2 Mar 2002 16:14:44 -0500 pentium-builder (0.16.1) unstable; urgency=low * NMU at the request of maintainer. * merging athlon-builder to pentium-builder (closes: #122488, #95393) -- Junichi Uekawa Sun, 23 Dec 2001 15:04:24 +0900 pentium-builder (0.16) unstable; urgency=low * Removed --print-libgcc-file-name kludge because it causes problems when used as input to 'gcc -E'. (closes: Bug#106727) -- Alex Pennace Tue, 31 Jul 2001 00:51:16 -0400 pentium-builder (0.15) unstable; urgency=low * New maintainer. (closes: Bug#100372) * Fixed --print-libgcc-file-name kludge. Note that 'dpkg --print-architecture' warns about the strange gcc output but otherwise behaves as expected, and dpkg-architecture will return i386. This may cause other problems. (closes: Bug#92325) * Arranged for proper Perl dependency with dh_perl. * Changed debhelper build dependency from Build-Depends-Indep to Build-Depends, since dh_testdir is called from the build target in debian/rules, see Debian Policy Manual ver. 3.5.5.0 sec. 7.6. * Added dependency on 'gcc | g++'; the package is useless without either of those packages. * Added basic manual pages for builder-cc and builder-c++. * New copyright file. * Complies with Debian Policy ver. 3.5.5.0; updated Standards-Version control field accordingly. -- Alex Pennace Sun, 15 Jul 2001 21:34:07 -0400 pentium-builder (0.14) unstable; urgency=low * I forgot to change the maintainer field... * Standards-Version: 3.5.2 (no changes) -- Adrian Bunk Wed, 7 Mar 2001 22:51:44 +0100 pentium-builder (0.13) unstable; urgency=low * New maintainer. (closes: #82247) -- Adrian Bunk Wed, 7 Mar 2001 11:28:20 +0100 pentium-builder (0.12) unstable; urgency=low * Orphaned the package. -- Joey Hess Sat, 13 Jan 2001 21:15:44 -0800 pentium-builder (0.11) unstable; urgency=low * Wow. This package has not been touched in almost a year. I sorta forgot about it.. * Updated the extended description. -- Joey Hess Sun, 31 Dec 2000 17:48:07 -0800 pentium-builder (0.10) unstable; urgency=low * Documented that yes, you have to export variables before this package can see them. Closes: #56969 -- Joey Hess Mon, 7 Feb 2000 13:55:05 -0800 pentium-builder (0.9) unstable; urgency=low * I think this fixes an upgrade problem where dpkg-divert would not remove the c++ diversion because there was a file there. Closes: #54618 * Fixed typo that broke g++, Closes: #54992 -- Joey Hess Tue, 11 Jan 2000 18:06:04 -0800 pentium-builder (0.8) unstable; urgency=low * Fixed c++, which is now managed by alternatives. Closes: #54094 * Fixed doc symlink, Closes: #52974 -- Joey Hess Wed, 5 Jan 2000 13:41:25 -0800 pentium-builder (0.7) unstable; urgency=low * Build dep. -- Joey Hess Sat, 4 Dec 1999 15:17:28 -0800 pentium-builder (0.6) unstable; urgency=low * Removed install-stamp, which can do some bad things. -- Joey Hess Thu, 30 Sep 1999 13:23:40 -0700 pentium-builder (0.5) unstable; urgency=low * FHS * Changed priority to extra. You don't want to install this unless you nkow what you're doing. -- Joey Hess Thu, 16 Sep 1999 20:58:34 -0700 pentium-builder (0.4) unstable; urgency=low * Don't use egcc anymore, gcc in unstable is egcc and can optimize. -- Joey Hess Fri, 19 Mar 1999 20:37:59 -0800 pentium-builder (0.3) experimental; urgency=low * Fixed gcc wrapper so it will work if passed things like -Dfoo="bar baz" -- Joey Hess Thu, 18 Mar 1999 16:49:56 -0800 pentium-builder (0.2) experimental; urgency=low * Now uses an enviroment variable DPKG_BUILDARCH, instead of DPKG_OPTIMIZATION. * Now intercepts dpkg's call to gcc --print-libgcc-file-name and munges the result so dpkg builds a package in the wanted architecture. * Use -mcpu= and -march=, instead of just -m. -- Joey Hess Sat, 25 Jul 1998 16:44:09 -0700 pentium-builder (0.1) experimental; urgency=low * First release. -- Joey Hess Tue, 21 Jul 1998 23:13:04 -0700 pentium-builder-0.20/debian/README.Debian0000644000000000000000000000156507223761067014732 0ustar The way this package works is it diverts gcc, cc, g++, etc, with shell scripts that, if the environment variable DEBIAN_BUILDARCH is set and exported, call "gcc -m$DEBIAN_BUILDARCH". So with DEBIAN_BUILDARCH=pentium set and exported, you build pentium optimized binaries, without it set, you build normal i386 binaries. It also specially interecpts dpkg's call to gcc --print-libgcc-file-name and munges the result to that dpkg thinks the taget architecture is the value of $DEBIAN_BUILDARCH Why did I do it this way? There are alternatives after all. I could just set CFLAGS or GCC, or I could place the shell script wrappers in a separate directory and set the PATH to point to them when you want to build pentium optimized stuff. The problem with all these ideas is that I can imagine packages that would circumvent them. It's a hack, but it works. I welcome a cleaner solution. pentium-builder-0.20/debian/substvars0000644000000000000000000000002210477170510014623 0ustar perl:Depends=perl pentium-builder-0.20/debian/compat0000644000000000000000000000000212626706405014056 0ustar 9 pentium-builder-0.20/builder-cc0000755000000000000000000000110310476732036013370 0ustar #! /usr/bin/perl if ($ENV{DEBIAN_BUILDARCH} eq undef && $ENV{DEBIAN_BUILDGCCVER} eq undef) { @target = ("gcc.real", @ARGV); } elsif ($ENV{DEBIAN_BUILDARCH} eq undef) { @target = ("gcc-" . $ENV{DEBIAN_BUILDGCCVER}, @ARGV); } elsif ($ENV{DEBIAN_BUILDGCCVER} eq undef) { @target = ("gcc.real", "-mcpu=$ENV{DEBIAN_BUILDARCH}", "-march=$ENV{DEBIAN_BUILDARCH}", @ARGV); } else { @target = ("gcc-" . $ENV{DEBIAN_BUILDGCCVER}, "-mcpu=$ENV{DEBIAN_BUILDARCH}", "-march=$ENV{DEBIAN_BUILDARCH}", @ARGV); } exec @target or die "Unable to exec @target[0]: $!\n"; pentium-builder-0.20/builder-c++0000755000000000000000000000073507522726072013366 0ustar #! /usr/bin/perl if ($ENV{DEBIAN_BUILDARCH} eq undef && $ENV{DEBIAN_BUILDGCCVER} eq undef) { @target = ("g++.real", @ARGV); } elsif ($ENV{DEBIAN_BUILDGCCVER} eq undef) { @target = ("g++.real", "-mcpu=$ENV{DEBIAN_BUILDARCH}", "-march=$ENV{DEBIAN_BUILDARCH}", @ARGV); } else { @target = ("g++-" . $ENV{DEBIAN_BUILDGCCVER}, "-mcpu=$ENV{DEBIAN_BUILDARCH}", "-march=$ENV{DEBIAN_BUILDARCH}", @ARGV); } exec @target or die "Unable to exec @target[0]: $!\n";