[pure-lang] ANN: Pure 0.62

  • From: Albert Graef <aggraef@xxxxxxxxx>
  • To: pure-lang@xxxxxxxxxxxxxxxx
  • Date: Thu, 18 Sep 2014 14:07:54 +0200

Another maintenance release:

https://bitbucket.org/purelang/pure-lang/downloads/pure-0.62.tar.gz
https://bitbucket.org/purelang/pure-lang/downloads/pure-docs-0.62.tar.gz

The AUR has already been updated, and I finally got around updating the
Ubuntu packages as well, so you can now find a fresh and fairly complete
set of packages for the "Trusty Tahr" (14.04 LTS) version of Ubuntu here:

https://launchpad.net/~dr-graef/+archive/ubuntu/pure-lang.trusty

I also plan to update the Windows packages as soon as I find the time.

This release adds a -m option which the batch compiler passes right through
to llc, so that you can specify options like -march, -mcpu etc. when
batch-compiling. This requires LLVM 3.3 or later to work.

This option could conceivably be used for cross-compiling, but the main
reason I added this is that I can now use `pure -c -mcpu=generic` to create
binaries which provide better compatibility between different cpu variants.
A brief description of this facility can be found in the manual:
http://puredocs.bitbucket.org/pure.html#other-output-code-formats. Please
also check the llc manpage for a closer description of these options.

Note that in contrast to gcc and clang, llc seems to always make best use
of the available cpu variant when generating code. Pure's batch compiler
simply hands over the bitcode it creates to llc for native code generation.
Thus, batch-compiling Pure scripts may in some cases yield code which might
not run on other, lesser cpus in the same family. In particular, I noticed
this when creating binaries on my Lenovo and on Launchpad, which would then
spit out an "Illegal Instruction" error when run on my older AMD computer.
This issue should be fixed now, since I updated the AUR and Debian build
scripts for the relevant packages (pure-gen, gnumeric-pure, faust2pd and
pd-faust) and also released new versions of these packages which now allow
the compilation options to be adjusted with the PUREC_FLAGS make variable.

Note that nothing changes for normal usage; llc will still create the best
code that it can for the host platform at hand. The `-mpcu=generic` is
really only needed when creating binaries which you plan to deploy on
different cpu types, i.e., typically when building binary packages for
various systems. (However, one might discuss whether this option should
become the default in the future.)

I've been testing this on Linux and OS X for the better part of the past
week now and it seems to work fine and resolve the issues with binary
packages that I have been seeing. But, as usual, please report any issues
with the new release that you find so that I can fix them.

Enjoy! :)
Albert

-- 
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email:  aggraef@xxxxxxxxx
WWW:    https://plus.google.com/+AlbertGraef

Other related posts:

  • » [pure-lang] ANN: Pure 0.62 - Albert Graef