From e67a28521323a97aa39d47e605fb2a29134f482f Mon Sep 17 00:00:00 2001
From: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Date: Wed, 28 Oct 2009 23:13:01 +0100
Subject: [PATCH 2/2] Add support for parallel make and distcc


Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
---
 Config.in                                          |   43 ++++
 include/host-build.mk                              |    1 +
 include/kernel-defaults.mk                         |   19 ++
 include/package-defaults.mk                        |   20 ++
 rules.mk                                           |    9 +
 tools/Makefile                                     |    3 +
 tools/distcc/Makefile                              |   49 ++++
 .../patches/010-distcc-3.0-fix-fortify.patch       |   11 +
 tools/distcc/patches/020-distcc-3.1-python.patch   |  258 ++++++++++++++++++++
 9 files changed, 413 insertions(+), 0 deletions(-)
 create mode 100644 tools/distcc/Makefile
 create mode 100644 tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
 create mode 100644 tools/distcc/patches/020-distcc-3.1-python.patch

diff --git a/Config.in b/Config.in
index ae1ba9f..e6a99af 100644
--- a/Config.in
+++ b/Config.in
@@ -276,6 +276,49 @@ config CCACHE
 	help
 		Compiler cache; see http://ccache.samba.org/
 
+config DISTCC
+	bool
+	prompt "Use distcc" if DEVEL
+	default n
+	help
+		Distributed C/C++ compiler; see http://distcc.org
+
+config DISTCC_PUMP
+	bool
+	prompt "Enable 'pump' mode" if DISTCC && DEVEL
+	default n
+	help
+		The 'pump' mode accelerates remote compilation with distcc buth it's not compatibile with ccache
+
+config DISTCC_POTENTIAL_HOSTS
+	string
+	prompt "Distcc potential servers" if DISTCC && DISTCC_PUMP && DEVEL
+	default "localhost"
+	help
+		Available Distcc servers in your network. See distcc man page for better description.
+
+config DISTCC_HOSTS
+	string
+	prompt "Distcc servers" if DISTCC && DEVEL
+	default "localhost"
+	help
+		Available Distcc servers in your network. See distcc man page for better description.
+
+config DISTCC_VERBOSE
+	bool
+	prompt "Show more distcc message" if DISTCC && DEVEL
+	default n
+	help
+		Enabling this option distcc produces explanatory messages on the standard error stream or in the log file.
+                This can be helpful in debugging problems.  Bug reports should include verbose output.
+
+config JOBS
+	int
+	prompt "Number  of jobs to run simultaneously" if DEVEL
+	default 0
+	help
+		Specifies the  number  of jobs (commands) to run simultaneously. The value 0 means "unspecified".
+
 config EXTERNAL_KERNEL_TREE
 	string
 	prompt "Use external kernel tree" if DEVEL
diff --git a/include/host-build.mk b/include/host-build.mk
index 2da41cc..8eb49c8 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -36,6 +36,7 @@ define Host/Prepare
 endef
 
 HOST_CONFIGURE_VARS = \
+	CFLAGS="$(HOST_CFLAGS)" \
 	CPPFLAGS="$(HOST_CFLAGS)" \
 	LDFLAGS="$(HOST_LDFLAGS)" \
 	SHELL="$(BASH)"
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index cf3eb31..7a2c22f 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -16,12 +16,31 @@ ifneq (,$(findstring avr32,$(BOARD)))
   KERNELNAME="uImage"
 endif
 
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	DISTCC_PUMP=pump
+endif
+
+ifneq ($(CONFIG_DISTCC),)
+	MAKE:= \
+		DISTCC_VERBOSE="$(if $(CONFIG_DISTCC_VERBOSE),1,)" \
+		DISTCC_POTENTIAL_HOSTS="$(call qstrip,$(CONFIG_DISTCC_POTENTIAL_HOSTS))" \
+		DISTCC_HOSTS="$(call qstrip,$(CONFIG_DISTCC_HOSTS))" \
+			$(DISTCC_PUMP) $(MAKE)
+endif
+
 KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
 	CROSS_COMPILE="$(KERNEL_CROSS)" \
 	ARCH="$(LINUX_KARCH)" \
 	KBUILD_HAVE_NLS=no \
 	CONFIG_SHELL="$(BASH)"
 
+ifneq ($(CONFIG_JOBS),)
+ifneq ($(CONFIG_JOBS),0)
+	MAKE += \
+		-j$(CONFIG_JOBS)
+endif
+endif
+
 ifdef CONFIG_STRIP_KERNEL_EXPORTS
   KERNEL_MAKEOPTS += \
 	EXTRA_LDSFLAGS="-I$(KERNEL_BUILD_DIR) -include symtab.h"
diff --git a/include/package-defaults.mk b/include/package-defaults.mk
index 2b5cb86..1ff588e 100644
--- a/include/package-defaults.mk
+++ b/include/package-defaults.mk
@@ -94,6 +94,18 @@ define Build/Configure/Default
 	)
 endef
 
+ifneq ($(CONFIG_DISTCC_PUMP),)
+	DISTCC_PUMP=pump
+endif
+
+ifneq ($(CONFIG_DISTCC),)
+	MAKE:= \
+		DISTCC_VERBOSE="$(if $(CONFIG_DISTCC_VERBOSE),1,)" \
+		DISTCC_POTENTIAL_HOSTS="$(call qstrip,$(CONFIG_DISTCC_POTENTIAL_HOSTS))" \
+		DISTCC_HOSTS="$(call qstrip,$(CONFIG_DISTCC_HOSTS))" \
+			$(DISTCC_PUMP) $(MAKE)
+endif
+
 MAKE_VARS = \
 	CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
 	CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
@@ -104,6 +116,14 @@ MAKE_FLAGS = \
 	CROSS="$(TARGET_CROSS)" \
 	ARCH="$(ARCH)"
 
+MAKEJ1:=$(MAKE)
+ifneq ($(strip $(CONFIG_JOBS)),)
+ifneq ($(strip $(CONFIG_JOBS)),0)
+	MAKE += \
+		-j$(CONFIG_JOBS)
+endif
+endif
+
 MAKE_INSTALL_FLAGS = \
 	$(MAKE_FLAGS) \
 	DESTDIR="$(PKG_INSTALL_DIR)"
diff --git a/rules.mk b/rules.mk
index 0ee8d56..dd9b370 100644
--- a/rules.mk
+++ b/rules.mk
@@ -113,6 +113,9 @@ ifndef DUMP
       ifneq ($(TOOLCHAIN_LIB_DIRS),)
         TARGET_LDFLAGS+= $(patsubst %,-L%,$(TOOLCHAIN_LIB_DIRS))
       endif
+      ifneq ($(CONFIG_HONOUR_COPTS_SUPPORT),)
+        TARGET_CFLAGS+= -fhonour-copts
+      endif
     endif
   endif
 endif
@@ -148,6 +151,12 @@ INSTALL_DIR:=install -d -m0755
 INSTALL_DATA:=install -m0644
 INSTALL_CONF:=install -m0600
 
+ifneq ($(CONFIG_DISTCC),)
+  # FIXME: move this variable to a better location
+  TARGET_CC:= distcc $(TARGET_CC)
+  TARGET_CXX:= distcc $(TARGET_CXX)
+endif
+
 ifneq ($(CONFIG_CCACHE),)
   # FIXME: move this variable to a better location
   export CCACHE_DIR=$(STAGING_DIR)/ccache
diff --git a/tools/Makefile b/tools/Makefile
index 0d91b1f..59e92e0 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -10,12 +10,15 @@ curdir:=tools
 
 # subdirectories to descend into
 tools-y :=
+ifeq  ($(CONFIG_EXTERNAL_TOOLCHAIN),)
 tools-$(CONFIG_GCC_VERSION_4_3)$(CONFIG_GCC_VERSION_4_4) += gmp mpfr
+endif
 tools-y += m4 autoconf automake bison pkg-config sed mklibs
 tools-y += sstrip ipkg-utils genext2fs squashfs squashfs4 mtd-utils lzma-old mkimage
 tools-y += firmware-utils patch-cmdline quilt yaffs2
 
 tools-$(CONFIG_CCACHE) += ccache
+tools-$(CONFIG_DISTCC) += distcc
 tools-$(CONFIG_powerpc) += dtc
 tools-dep += lzma
 
diff --git a/tools/distcc/Makefile b/tools/distcc/Makefile
new file mode 100644
index 0000000..daf31c4
--- /dev/null
+++ b/tools/distcc/Makefile
@@ -0,0 +1,49 @@
+# 
+# Copyright (C) 2009 Industrie Dial Face S.p.A.
+# Copyright (C) 2009  OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/target.mk
+
+PKG_NAME:=distcc
+PKG_VERSION:=3.1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://distcc.googlecode.com/files/
+PKG_MD5SUM:=2f6be779869648f2d211ebf09f694715
+PKG_CAT:=zcat
+
+include $(INCLUDE_DIR)/host-build.mk
+
+ifneq ($(strip $(shell which distcc >/dev/null && echo found)),found)
+  HOST_CONFIGURE_ARGS += --disable-Werror
+
+  define Host/Compile
+	$(MAKE) CC="$(HOSTCC)" -C $(HOST_BUILD_DIR)
+  endef
+
+  define Host/Install
+	$(MAKE) -C $(HOST_BUILD_DIR) install
+  endef
+
+  define Host/Clean
+	-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+	$(call Host/Clean/Default)
+  endef
+else
+  define Host/Prepare
+  endef
+  define Host/Configure
+  endef
+  define Host/Compile
+  endef
+  define Host/Install
+  endef
+  define Host/Clean
+  endef
+endif
+
+$(eval $(call HostBuild))
diff --git a/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch b/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
new file mode 100644
index 0000000..8edc330
--- /dev/null
+++ b/tools/distcc/patches/010-distcc-3.0-fix-fortify.patch
@@ -0,0 +1,11 @@
+diff -ru a/src/snprintf.h b/src/snprintf.h
+--- a/src/snprintf.h	2008-08-06 15:52:06.000000000 -0500
++++ b/src/snprintf.h	2009-01-04 15:19:22.000000000 -0600
+@@ -7,6 +7,7 @@
+  */
+ 
+ #include <stdarg.h>
++#include "config.h"
+ 
+ #ifdef __GNUC__
+ /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
diff --git a/tools/distcc/patches/020-distcc-3.1-python.patch b/tools/distcc/patches/020-distcc-3.1-python.patch
new file mode 100644
index 0000000..733357a
--- /dev/null
+++ b/tools/distcc/patches/020-distcc-3.1-python.patch
@@ -0,0 +1,258 @@
+diff -Naur distcc-3.1.orig/bench/statistics.py distcc-3.1/bench/statistics.py
+--- distcc-3.1.orig/bench/statistics.py	2008-12-03 06:50:21.000000000 +0900
++++ distcc-3.1/bench/statistics.py	2009-03-17 01:29:26.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python2.2
++#! /usr/bin/env python
+ 
+ # benchmark -- automated system for testing distcc correctness
+ # and performance on various source trees.
+diff -Naur distcc-3.1.orig/configure distcc-3.1/configure
+--- distcc-3.1.orig/configure	2008-12-03 06:50:34.000000000 +0900
++++ distcc-3.1/configure	2009-03-17 01:31:09.000000000 +0900
+@@ -3629,7 +3629,7 @@
+ #
+ # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present
+ # in autoconf 2.53.
+-for ac_prog in python2.5 python-2.5 python2.4 python-2.4 python
++for ac_prog in python
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+diff -Naur distcc-3.1.orig/configure.ac distcc-3.1/configure.ac
+--- distcc-3.1.orig/configure.ac	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/configure.ac	2009-03-17 01:29:04.000000000 +0900
+@@ -243,7 +243,7 @@
+ #
+ # NB: Cannot use AC_CONFIG_LIBOBJ_DIR here, because it's not present
+ # in autoconf 2.53.
+-AC_PATH_PROGS(PYTHON, [python2.5 python-2.5 python2.4 python-2.4 python])
++AC_PATH_PROGS(PYTHON, [python])
+ AC_ARG_VAR(PYTHON, [Python interpreter])
+ # Python 1 doesn't even support -V
+ if ! "$PYTHON" -V 2>&1 | grep "^Python" >/dev/null; then
+diff -Naur distcc-3.1.orig/include_server/basics.py distcc-3.1/include_server/basics.py
+--- distcc-3.1.orig/include_server/basics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/basics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/basics_test.py distcc-3.1/include_server/basics_test.py
+--- distcc-3.1.orig/include_server/basics_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/basics_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/c_extensions_test.py distcc-3.1/include_server/c_extensions_test.py
+--- distcc-3.1.orig/include_server/c_extensions_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/c_extensions_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/cache_basics.py distcc-3.1/include_server/cache_basics.py
+--- distcc-3.1.orig/include_server/cache_basics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/cache_basics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/compiler_defaults.py distcc-3.1/include_server/compiler_defaults.py
+--- distcc-3.1.orig/include_server/compiler_defaults.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/compiler_defaults.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/compress_files.py distcc-3.1/include_server/compress_files.py
+--- distcc-3.1.orig/include_server/compress_files.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/compress_files.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer.py distcc-3.1/include_server/include_analyzer.py
+--- distcc-3.1.orig/include_server/include_analyzer.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py distcc-3.1/include_server/include_analyzer_memoizing_node.py
+--- distcc-3.1.orig/include_server/include_analyzer_memoizing_node.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_memoizing_node.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py distcc-3.1/include_server/include_analyzer_memoizing_node_test.py
+--- distcc-3.1.orig/include_server/include_analyzer_memoizing_node_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_memoizing_node_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_analyzer_test.py distcc-3.1/include_server/include_analyzer_test.py
+--- distcc-3.1.orig/include_server/include_analyzer_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_analyzer_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_server.py distcc-3.1/include_server/include_server.py
+--- distcc-3.1.orig/include_server/include_server.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_server.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/include_server_test.py distcc-3.1/include_server/include_server_test.py
+--- distcc-3.1.orig/include_server/include_server_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/include_server_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/macro_eval.py distcc-3.1/include_server/macro_eval.py
+--- distcc-3.1.orig/include_server/macro_eval.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/macro_eval.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/macro_eval_test.py distcc-3.1/include_server/macro_eval_test.py
+--- distcc-3.1.orig/include_server/macro_eval_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/macro_eval_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/mirror_path.py distcc-3.1/include_server/mirror_path.py
+--- distcc-3.1.orig/include_server/mirror_path.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/mirror_path.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/mirror_path_test.py distcc-3.1/include_server/mirror_path_test.py
+--- distcc-3.1.orig/include_server/mirror_path_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/mirror_path_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_command.py distcc-3.1/include_server/parse_command.py
+--- distcc-3.1.orig/include_server/parse_command.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_command.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_command_test.py distcc-3.1/include_server/parse_command_test.py
+--- distcc-3.1.orig/include_server/parse_command_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_command_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_file.py distcc-3.1/include_server/parse_file.py
+--- distcc-3.1.orig/include_server/parse_file.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_file.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/parse_file_test.py distcc-3.1/include_server/parse_file_test.py
+--- distcc-3.1.orig/include_server/parse_file_test.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/parse_file_test.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4
++#! /usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/run.py distcc-3.1/include_server/run.py
+--- distcc-3.1.orig/include_server/run.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/run.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/setup.py distcc-3.1/include_server/setup.py
+--- distcc-3.1.orig/include_server/setup.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/setup.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ 
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/include_server/statistics.py distcc-3.1/include_server/statistics.py
+--- distcc-3.1.orig/include_server/statistics.py	2008-12-03 06:50:31.000000000 +0900
++++ distcc-3.1/include_server/statistics.py	2009-03-17 01:30:46.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/python2.4 
++#! /usr/bin/python 
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/test/onetest.py distcc-3.1/test/onetest.py
+--- distcc-3.1.orig/test/onetest.py	2008-12-03 06:50:22.000000000 +0900
++++ distcc-3.1/test/onetest.py	2009-03-17 01:29:44.000000000 +0900
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python2.4
++#!/usr/bin/python
+ #
+ # Copyright 2007 Google Inc.
+ #
+diff -Naur distcc-3.1.orig/test/testdistcc.py distcc-3.1/test/testdistcc.py
+--- distcc-3.1.orig/test/testdistcc.py	2008-12-03 06:50:22.000000000 +0900
++++ distcc-3.1/test/testdistcc.py	2009-03-17 01:29:36.000000000 +0900
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python2.2
++#! /usr/bin/env python
+ 
+ # Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org>
+ # Copyright 2007 Google Inc.
-- 
1.6.5

