pkgsrc-Users archive

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

FYI: Building parrot on Solaris/i86 with GCC and native assembler



Just for the record, in case somebody else has the same problem:
lang/parrot currently does not build on Solaris/i86, if you use GCC in
combination with the native assembler (/usr/ccs/bin/as). The same
problem is hit both in lang/parrot and in the prerequisite
textproc/icu: Conditional assembler code is selected by checking the
compiler, probably assuming that only the combinations "gcc/gas" and
"cc/as" are possible.

I use these local patches (which will break the build for other
combinations) to get a working parrot interpreter:

for textproc/icu:

--- configure.orig      2009-04-21 13:36:00.465669000 +0200
+++ configure
@@ -4614,11 +4614,8 @@ i*86-*-linux*|x86_64-*-linux*|powerpc*-*
                 GENCCODE_ASSEMBLY="-a gcc"
     fi ;;
 i*86-*-solaris*)
-    if test "$GCC" = yes; then
-                GENCCODE_ASSEMBLY="-a gcc"
-    else
-        GENCCODE_ASSEMBLY="-a sun-x86"
-    fi ;;
+    GENCCODE_ASSEMBLY="-a sun-x86"
+    ;;
 sparc-*-solaris*)
     GENCCODE_ASSEMBLY="-a sun"
     ;;

and for lang/parrot itself:

--- src/ops/experimental.ops.orig       2009-03-12 02:43:57.000000000 +0100
+++ src/ops/experimental.ops
@@ -204,7 +204,7 @@ For other architectures, this is a C<noo
 =cut

 op trap() :deprecated {
-#if defined(__GNUC__) && defined(i386)
+#if defined(__GNUC__) && defined(i386) && !defined(__sun__)
     __asm__("int3");       /* opcode 0xcc */
 #endif
 #if defined(__GNUC__) && defined(PPC)


Both problems were reported upstream:

http://bugs.icu-project.org/trac/ticket/6865
http://lists.parrot.org/pipermail/parrot-dev/2009-March/001909.html

Any suggestions how to tackle this general problem in a portable way
are welcome. There are several other packages that make the mistake of
checking for the compiler to guess the assembler or linker.

--
Joern Clausen
joernc%gmail.com@localhost
http://www.oe-files.de/oefiles/
http://thebloeg.blogspot.com/


Home | Main Index | Thread Index | Old Index