[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: (re)compiling debian packages with ccc



As usual, I forgot the patch...

Bob McElrath [bob+debian-alpha@mcelrath.org] wrote:
> I'm trying to recompile several packages with Compaq's C Compiler (ccc),
> and would like input from the rest of you as to making this as smooth as
> possible.  (For those that don't know, ccc generates vastly superior
> code on the alpha, and should be the compiler of choice unless it is
> known that it can't compile a given package)
> 
> I want to be able to:
>     apt-get source <package>
>     cd <package>
>     CC=ccc CFLAGS=-O3 dpkg-buildpackage
> for any package in debian.
> 
> The main problem I've run into so far is that libtool does not recognize
> ccc.  Specifically, it does not recognize that ccc can create shared
> libraries.  For packages that use aclocal to generate an aclocal.m4
> file, this can be fixed by patching /usr/share/aclocal/libtool.m4 (patch
> attached against debian unstable libtool)  For packages that use
> aclocal, aclocal *must* be run to re-generate this file or the changes
> won't be seen.  For packages that include an ltconfig file it must be
> patched by hand in the same way (look at the patch -- the change is the
> same).
> 
> Could this be done in an automated way?
> 
> Does anyone else have any experience doing this?
> 
> Would there be any legal or technical trouble with putting ccc-compiled
> packes in the debian repository?
> 
> Cheers,
> Bob McElrath [Univ. of Wisconsin at Madison, Department of Physics]
> 
>     "You measure democracy by the freedom it gives its dissidents, not the
>     freedom it gives its assimilated conformists." -- Abbie Hoffman
> 



Cheers,
Bob McElrath [Univ. of Wisconsin at Madison, Department of Physics]

    "You measure democracy by the freedom it gives its dissidents, not the
    freedom it gives its assimilated conformists." -- Abbie Hoffman

--- ../libtool-1.4.3/libtool.m4	Tue Feb  4 22:06:40 2003
+++ /usr/share/aclocal/libtool.m4	Tue Feb  4 22:05:13 2003
@@ -972,6 +972,21 @@
       fi
       ;;
 
+    linux*)
+      $rm conftest.c
+      cat > conftest.c <<EOF
+  #if defined(__DECC) || defined(__DECCXX)
+    yes;
+  #endif
+  EOF
+      if { ac_try='${CC-cc} -E conftest.c'; { (eval echo $progname:@LINENO@: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+        # All DEC C code is PIC.
+        wl='-Wl,'
+        link_static_flag='-non_shared'
+      fi
+      $rm conftest.c
+      ;;
+
     *)
       lt_cv_prog_cc_can_build_shared=no
       ;;

Attachment: pgp6t6Ydpq2Oy.pgp
Description: PGP signature


Reply to: