On Fri, Aug 23, 2013 at 12:45:56AM +0200, Jonathan Worthington wrote:
> On 8/22/2013 20:00, Andy Dougherty wrote:
> >I have attached an updated set of patches I used to build MoarVM.
> >These worked on both Solaris11/x64 and on OpenBSD 5.3.  They also
> >seemed to cause no harm under Linux.
> >
> >The patches were made with git format-patch, but to avoid possible
> >corruption through the mail, I am attaching them.  The subjects are:
> >
> >     [PATCH 1/5] Remove nonportable conditional commands from Makefile.in
> >     [PATCH 2/5] Make the endianness tests more robust.
> >     [PATCH 3/5] Fix mismatched types in sprintf in src/core/exceptions.c
> >     [PATCH 4/5] Add build/setup.pm section for Solaris with Solaris cc.
> >     [PATCH 5/5] Avoid 'make -C'.  Use a simple cd instead.
> >
> >Additional details are in the commit messages.
> Thanks for the patches. I've applied all but [PATCH 2/5] (the
> endianness handling was changed more radically; hopefully what was
> done works out OK on Solaris also). Builds fine on Windows with
> these applied.

Thanks.  (I suspect my endianness patch would have been more useful for
cross-compiling, but I'm certainly not likely to complain about using
perl 5's Configure value :-). 

A fresh pull no longer builds because the linenoise directory is empty.
I suspect some git incantations are needed but just haven't made it into
the README yet.  Nearly-random guessing on my part led to

        git submodule init
        git submodule update

which seemed to work, but git offers so many ways to do things wrong that
I hesitate to make any uninformed recommendations.

Also, the new 'mknoisy' stuff incorrectly kicks in whenever I specify a
compiler, so I still have to manually delete it from the generated Makefile.

Anyway, with those problems avoided, today's version built fine on Solaris
11/amd64.

I also got it to build on Solaris/SPARC (big-endian) with gcc.  Most of
the issues were configuration issues with apr, which I didn't bother
trying to solve in any portable way.

The only significant patch I have from this is that the old Solaris assembler
required a space between -o and the output argument.  I think that's pretty
portable for the gcc toolchain overall, so I propose the following patch:

diff --git a/build/setup.pm b/build/setup.pm
index 987671e..e400dab 100755
--- a/build/setup.pm
+++ b/build/setup.pm
@@ -111,7 +111,7 @@ our %GNU = (
     ar   => 'ar',
 
     ccswitch => '-c',
-    ccout    => '-o',
+    ccout    => '-o ',
     ccinc    => '-I',
     ccdef    => '-D',
 


Thanks again,

-- 
    Andy Dougherty              dough...@lafayette.edu

Reply via email to