* Gimp/ccc patches
@ 1999-11-14 22:23 Bibek Sahu
1999-11-15 17:13 ` Tuff Guy
0 siblings, 1 reply; 2+ messages in thread
From: Bibek Sahu @ 1999-11-14 22:23 UTC (permalink / raw)
To: axp-list
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1847 bytes --]
_Compiling Gimp 1.1.10 with ccc_
(I submitted some of these a while ago, but there was some error and
SmartList decided I didn't exist and kicked me off the list.)
In case anyone was wondering, here are some patches to gimp,
ltconfig, bison.simple and /usr/include/alloca.h(*) to allow things to
better compile with ccc. In particular, they let me compile gimp with
ccc... which is nice & fast. ;-)
Actually, the patches to ltconfig and alloca.h are applicable to
anything you want to compile with ccc.
Few programs that uses alloca will correctly compile under ccc
without the alloca.h and bison.simple patches(*).
The ltconfig patch tells ltconfig that yes, shared libraries /do/
work if we compile them with ccc. You can compile programs without this
patch, but all internal libraries will be linked statically... this would
cause a big memory (and, consequently, often performance) hit in gimp.
The patch to gimp just applies the ltconfig patch to the files that
are already there. For various technical reasons (relating to versions of
ltconfig), this is easier than replacing files.
I've also included a [gzip'd] spec file, for those of you who'd like
to make rpms. I've had issues with RedHat's contrib area in the past, so I
didn't want to deal with it here. I'm currently arguing with
ftp.alphalinux.org about uploading these files there and src/binary rpms.
I'm getting permission denied, so I wouldn't count on much.
- Bob
(*) If you don't want to change the default alloca.h for gcc, you /may/ be
able to put alloca.h in /usr/lib/compaq/ccc-6.2/alpha-linux/include/ and
apply the patch, or symlink
/usr/lib/compaq/ccc-6.2/alpha-linux/include/alloca.h -> alpha/builtins.h.
I've not tried either of these, and whether or not they work depends on the
include path search order. I think they'll both work. YMMV.
[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 2520 bytes --]
[-- Attachment #3: Type: TEXT/PLAIN, Size: 1388 bytes --]
--- gimp-1.1.10/plug-ins/imagemap/imap_cern_parse.c.orig Mon Sep 6 19:03:20 1999
+++ gimp-1.1.10/plug-ins/imagemap/imap_cern_parse.c Mon Oct 18 00:27:51 1999
@@ -244,6 +244,9 @@
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
+#ifdef __DECC
+#define alloca(x) __ALLOCA(x)
+#else /* not DEC C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
@@ -266,6 +269,7 @@
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
+#endif /* not DEC C. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
--- gimp-1.1.10/plug-ins/imagemap/imap_ncsa_parse.c.orig Mon Sep 6 19:03:20 1999
+++ gimp-1.1.10/plug-ins/imagemap/imap_ncsa_parse.c Mon Oct 18 00:33:18 1999
@@ -242,6 +242,9 @@
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C. */
+#ifdef __DECC
+#define alloca(x) __ALLOCA(x)
+#else /* not DEC C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
@@ -264,6 +267,7 @@
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc. */
+#endif /* not DEC C. */
#endif /* not GNU C. */
#endif /* alloca not defined. */
[-- Attachment #4: Type: TEXT/PLAIN, Size: 365 bytes --]
--- usr/include/alloca.h.orig Tue Apr 27 06:55:31 1999
+++ usr/include/alloca.h Mon Oct 18 00:50:11 1999
@@ -34,7 +34,11 @@
#ifdef __GNUC__
# define alloca(size) __builtin_alloca (size)
-#endif /* GCC. */
+#else /* not GCC. */
+#ifdef __DECC
+# define alloca(size) __ALLOCA (size)
+#endif /* DEC C. */
+#endif /* __GNUC__ */
__END_DECLS
[-- Attachment #5: Type: TEXT/PLAIN, Size: 645 bytes --]
--- gimp-1.1.10/ltconfig.orig Tue Jun 29 17:48:11 1999
+++ gimp-1.1.10/ltconfig Mon Oct 18 22:43:03 1999
@@ -758,6 +758,22 @@
link_static_flag='-Bstatic'
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
+ ;;
+
*)
can_build_shared=no
;;
[-- Attachment #6: Type: TEXT/PLAIN, Size: 753 bytes --]
--- usr/lib/bison.simple.orig Sun Nov 14 15:59:31 1999
+++ usr/lib/bison.simple Mon Oct 18 07:44:43 1999
@@ -38,6 +38,10 @@
#define YYSTACK_USE_ALLOCA
#define alloca __builtin_alloca
#else /* not GNU C. */
+#ifdef __DECC
+#define YYSTACK_USE_ALLOCA
+#define alloca __ALLOCA
+#else /* not DEC C. */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
#define YYSTACK_USE_ALLOCA
#include <alloca.h>
@@ -68,6 +72,7 @@
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc */
+#endif /* not DEC C */
#endif /* not GNU C */
#endif /* alloca not defined */
#endif /* YYSTACK_USE_ALLOCA not defined */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Gimp/ccc patches
1999-11-14 22:23 Gimp/ccc patches Bibek Sahu
@ 1999-11-15 17:13 ` Tuff Guy
0 siblings, 0 replies; 2+ messages in thread
From: Tuff Guy @ 1999-11-15 17:13 UTC (permalink / raw)
To: axp-list
You wouldn't happen to use xmame? I am tryin to compile it w/ ccc and it has
problems with "inline" declarations. Any ideas?
--
---Tuff Guy....
I'm as Tuff as they come!!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-11-15 17:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-11-14 22:23 Gimp/ccc patches Bibek Sahu
1999-11-15 17:13 ` Tuff Guy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox