[m-dev.] 32-bit sources on 64-bit target
Julien Fischer
jfischer at opturion.com
Thu Mar 7 18:00:24 AEDT 2013
Hi,
On Thu, Mar 7, 2013 at 5:08 PM, Peter Wang <novalazy at gmail.com> wrote:
> Here's another idea: provide pre-generated C files from a special grade,
> e.g. `*.lcd' (lowest common denominator, to give it a name for now).
> The `.lcd' grade component would switch off those troublesome data
> representations that I mentioned.
I see you've fallen back to the traditional Mercury all-purpose solution
to all problems: add another grade component ;-)
> In addition, we provide settings for the pre-generated sources in
> DISTINCT files, e.g. COMP_FLAGS.lcd. The build system needs to use
> these files when building from the pre-generated sources, and only then.
> (easier said than done)
That's putting it mildly.
> When you configure on a 64-bit system, you get 64-bit settings
> in Mercury.config/COMP_FLAGS/LIB_FLAGS/etc. so the library grades will
> built and installed with 3 tag bits and unboxed floats. The library
> built from pre-generated sources (which is incompatible) will not be
> installed and used by accident.
An simpler alternative would be for the install_libgrades
target not to install the library that the compiler was bootstrapped
with, but to recompile the library in that grade and install the recompiled
version instead.
> The compiler built from pre-generated sources WILL be installed.
> For now, I can't think of why that would be a problem.
It wouldn't be at the moment since the compiler (and other tools)
are currently built with --mercury-linkage static. It would be a problem,
if that were not the case.
Cheers,
Julien.
More information about the developers
mailing list