[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: C++ Support for distcc
From: Ian Reinhart Geiser <geiseri () kde ! org>
Date: 2002-05-23 2:29:42
[Download RAW message or body]
Greetings,
There has been some buzz as of late about doing distributed builds for doing
KDE builds faster. Team Builder unfortunately is not a realistic option for
the masses of KDE developers out there and up until this patch neither was
distcc.
The attached patch allows distcc to compile most known C++ extentions
supported by gcc, these include cxx, cpp, cc, C and cp. There are also
attached two scripts that allow distcc to interact with libtool a little
better. For some reason libtool is not a fan of distcc g++ in some instances
in our build system. To use them, put them in your path and do an:
export CC='distc'
export CXX='distc++'
I have tested this with kdesupport, arts and kdelibs so far with mostly
success. There are a few problems with object files not being found, but I
am still trying to nail down why this is happening. They don't seem to
appear on my SMP system, but do when I am using distcc.
Please if you are interested test the following patches. I have also CCed the
author of distcc to have these patches merged in to the main source.
Cheers
-ian reinhart geiser
["distcc-c++-support.patch" (text/x-diff)]
--- distcc-0.2/src/arg.c Thu May 16 03:56:34 2002
+++ /mnt/network/home/geiseri/distcc-0.2/src/arg.c Wed May 22 17:37:28 2002
@@ -67,7 +67,7 @@
char *slash;
char *o;
int l;
-
+ char *s;
if ((slash = strrchr(sfile, '/')))
sfile = slash+1;
if ((l = strlen(sfile)) < 3) {
@@ -76,7 +76,8 @@
}
o = strdup(sfile);
- strcpy(&o[l - 2], ".o");
+ s = rindex(o,'.');
+ strcpy(s, ".o");
*ofile = o;
return 0;
@@ -134,8 +135,12 @@
goto GOT_OUTPUT;
}
} else {
- if (str_endswith(".i", a) || str_endswith(".c", a)) {
+ if (str_endswith(".i", a) || str_endswith(".c", a)
+ || str_endswith(".cpp",a) || str_endswith(".cc",a)
+ || str_endswith(".cxx",a) || str_endswith(".C",a)
+ || str_endswith(".cp", a) || str_endswith("c++",a)) {
rs_trace("found input file \"%s\"", a);
+ rs_log_notice("found input file \"%s\"", a);
if (*input_file) {
rs_log_notice("do we have two inputs? i give up");
return -1;
@@ -309,7 +314,10 @@
rs_trace("command before: %s", dcc_argv_tostr(a));
for (i =0; a[i]; i++)
- if (str_endswith(".c", a[i]) || str_endswith(".i", a[i])) {
+ if (str_endswith(".c", a[i]) || str_endswith(".i", a[i])
+ || str_endswith(".cpp",a[i]) || str_endswith(".cc",a[i])
+ || str_endswith(".cxx",a[i]) || str_endswith(".C",a[i])
+ || str_endswith(".cp", a[i]) || str_endswith("c++",a[i])) {
rs_trace("changed input from \"%s\" to \"%s\"", a[i], ifname);
a[i] = ifname;
rs_trace("command after: %s", dcc_argv_tostr(a));
["distc" (application/x-shellscript)]
#!/bin/sh
distcc gcc $*
["distc++" (text/plain)]
!/bin/sh
distcc g++ $*
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic