#
glibpth="/usr/sde/elf/usr/lib $glibpth"
-# Need to use Concurrent cc for most of these options to be meaningful (if you
-# want to get this to work with gcc, you're on your own :-). Passing
+# Need to use Concurrent cc for most of these options to be meaningful (if
+# you want to get this to work with gcc, you're on your own :-). Passing
# -Bexport to the linker when linking perl is important because it leaves
# the interpreter internal symbols visible to the shared libs that will be
-# loaded on demand (and will try to reference those symbols). The -u
-# option to drag 'sigaction' into the perl main program is to make sure
-# it gets defined for the posix shared library (for some reason sigaction
-# is static, rather than being defined in libc.so.1).
+# loaded on demand (and will try to reference those symbols). The -u option
+# to drag 'sigaction' into the perl main program is to make sure it gets
+# defined for the posix shared library (for some reason sigaction is static,
+# rather than being defined in libc.so.1). The 88110compat option makes sure
+# the code will run on both 88100 and 88110 machines. The define is added to
+# trigger a work around for a compiler bug which shows up in pp.c.
#
-cc='/bin/cc -Xa'
+cc='/bin/cc -Xa -Qtarget=M88110compat -DCXUX_BROKEN_CONSTANT_CONVERT'
cccdlflags='-Zelf -Zpic'
ccdlflags='-Zelf -Zlink=dynamic -Wl,-Bexport -u sigaction'
lddlflags='-Zlink=so'
#include "perl.h"
/*
+ * The compiler on Concurrent CX/UX systems has a subtle bug which only
+ * seems to show up when compiling pp.c - it generates the wrong double
+ * precision constant value for (double)UV_MAX when used inline in the body
+ * of the code below, so this makes a static variable up front (which the
+ * compiler seems to get correct) and uses it in place of UV_MAX below.
+ */
+#ifdef CXUX_BROKEN_CONSTANT_CONVERT
+static double UV_MAX_cxux = ((double)UV_MAX);
+#endif
+
+/*
* Types used in bitwise operations.
*
* Normally we'd just use IV and UV. However, some hardware and
#ifdef BW_BITS
adouble <= BW_MASK
#else
+#ifdef CXUX_BROKEN_CONSTANT_CONVERT
+ adouble <= UV_MAX_cxux
+#else
adouble <= UV_MAX
#endif
+#endif
)
{
char buf[1 + sizeof(UV)];