Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure should have an option to specify the assembler command and the host arch #4171

Closed
vicuna opened this issue Nov 27, 2006 · 3 comments
Assignees

Comments

@vicuna
Copy link

vicuna commented Nov 27, 2006

Original bug ID: 4171
Reporter: monniaux
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2009-03-31T11:08:53Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.11.0
Category: ~DO NOT USE (was: OCaml general)

Bug description

On Linux / x86_64, it is possible to have both 32-bit and 64-bit applications. 32-bit applications may sometimes be preferable (less memory is used, as experienced with Astrée).

This simply requires building OCaml for a i686 target instead of an amd64 target. I've done it, and here are the issues I've noticed:

  • there's no option to force arch to be i686-... instead of amd64-...; easy fix: the configure script should accept a -host command line option
  • there's no option to specify the assembler that ocamlopt uses:
    ./asmcomp/i386/proc.ml: Ccomp.command ("as -o " ^ F
    is hardwired. If one wants to compile in 32-bit mode on an x86_64 machine, one has to replace as by as -32 in that line.

Of course, seasoned programmers can patch OCaml's source by hand, but still...

@vicuna
Copy link
Author

vicuna commented Nov 27, 2006

Comment author: monniaux

This should also affect $(AS) and $(ASPP). Note that changing $(AS) does not affect the assembler that ocamlopt uses...

@vicuna
Copy link
Author

vicuna commented Feb 21, 2007

Comment author: @xavierleroy

configure does support the -host option. The ability to configure the assembler used by ocamlopt would be good, however. I keep this as a feature wish.

@vicuna
Copy link
Author

vicuna commented Oct 30, 2007

Comment author: @xavierleroy

Tentative implementation in CVS trunk. To be tested on platforms other than Linux/x86_64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants