[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Required -lstdc++ missing in some Makefile.ams?
From:       Stephan Kulow <coolo () kde ! org>
Date:       2003-04-15 8:55:18
[Download RAW message or body]

On Monday 14 April 2003 16:49, Ravikiran Rajagopal wrote:
> >Your distcc has a bug. It calls gcc no matter what you tell him what compiler
> >to use. And only if you call g++, libstc++ will linked into. Adding
> >-libstdc++ will help you to get around linkage problems, but linking using
> >g++ is adding more than that, so you still will have faulty binaries.
> 
> You are right. I forgot that I updated distcc two weeks ago.
> 
> >I sent Martin once a patch but it seems, he doesn't test g++ linkage, so
> >it broke again ;(
> >I could send you the patch I'm using (distcc 1.1suse) tomorrow.
> 
> Please send me the patch. Hopefully I can bug Martin Pool enough to get it
> included. Should we add this to the KDE compilation FAQ?
> 
It's actually pretty simple.

Greetings, Stephan


["distcc-1.0-g++.patch" (text/x-diff)]

--- configure.ac
+++ configure.ac	2003/03/31 07:57:48
@@ -11,7 +11,7 @@
 
 # As of 0.6cvs, distcc no longer uses automake, only autoconf.
 AC_PREREQ(2.53)
-AC_INIT(distcc, 2.0.1, [distcc@lists.samba.org])
+AC_INIT(distcc, 2.0.1coolo, [distcc@lists.samba.org])
 AC_CONFIG_HEADERS(src/config.h)
 AC_CANONICAL_HOST
 
--- src/implicit.c
+++ src/implicit.c	2003/03/31 07:57:22
@@ -109,12 +109,18 @@
 {
     if (argv[1][0] == '-'
         || dcc_is_source(argv[1])) {
+	char *compiler_name;
         dcc_shallowcopy_argv(argv, out_argv, 0);
         /* FIXME: Allow the command name to be specified by a
          * client-side environment variable */
 
-        /* change "distcc -c foo.c" -> "cc -c foo.c" */
-        (*out_argv)[0] = strdup("cc");
+        compiler_name = argv[0];
+        if (argv[0][strlen(compiler_name)-1] == '+' &&
+            argv[0][strlen(compiler_name)-2] == '+')
+                (*out_argv)[0] = "c++";
+        else
+                /* change "distcc -c foo.c" -> "cc -c foo.c" */
+                (*out_argv)[0] = "cc";
         return 0;
     } else {
         /* skip "distcc", point to "gcc -c foo.c"  */



>> 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