Skip to content

Compiler: -compat-32 flag when building cmo/cma.#896

Merged
mshinwell merged 2 commits intoocaml:trunkfrom
hhugo:compat32
May 5, 2017
Merged

Compiler: -compat-32 flag when building cmo/cma.#896
mshinwell merged 2 commits intoocaml:trunkfrom
hhugo:compat32

Conversation

@hhugo
Copy link
Contributor

@hhugo hhugo commented Nov 8, 2016

-compat-32 is currently only used when linking a bytecode executable.
It would make sense to use -compat-32 for any bytecode object (cmo/cma).

@alainfrisch
Copy link
Contributor

Good idea, but I'd propose to share this piece of code (and generalize the exception constructor to take a filename). At least Bytepackager and Bytelibrarian could call a function in Bytelink. For sharing with Emitcode, this is less clear.

@mshinwell
Copy link
Contributor

@hhugo Can you try to finish this one off?

@hhugo hhugo force-pushed the compat32 branch 3 times, most recently from e42a1b0 to 055e9c1 Compare January 23, 2017 11:41
@hhugo
Copy link
Contributor Author

hhugo commented Jan 25, 2017

@alainfrisch, do you prefer the current approach ?

@mshinwell
Copy link
Contributor

@alainfrisch Ping

@alainfrisch
Copy link
Contributor

Yes, I prefer the current approach. But introducing a new module just might be a bit too much. Isn't there a natural place to put this code in an existing module? If a new module must be created, don't forget the standard copyright/license header.

@damiendoligez damiendoligez changed the title Complier: -compat-32 flag when building cmo/cma. Compiler: -compat-32 flag when building cmo/cma. Mar 30, 2017
@hhugo hhugo force-pushed the compat32 branch 3 times, most recently from f22104f to 574e1bb Compare April 16, 2017 14:29
@hhugo
Copy link
Contributor Author

hhugo commented Apr 16, 2017

I've moved the code emitcode.ml and rebased on trunk

Compiler: refactor -compat-32 support

Update Changes

Complier: more -compat-32 checks in emitcode.
@hhugo
Copy link
Contributor Author

hhugo commented Apr 25, 2017

@alainfrisch, would you mind taking another look at this ?

@alainfrisch
Copy link
Contributor

LGTM. Perhaps add a test case?

@hhugo
Copy link
Contributor Author

hhugo commented May 4, 2017

test case added

@mshinwell mshinwell merged commit b14e6fe into ocaml:trunk May 5, 2017
@shindere
Copy link
Contributor

shindere commented May 5, 2017

This breaks CI becaue tests/tool-ocamlc-compat32 fails, on several machines,
e.g. linux-32 but not only.

@hhugo can you see why and provide a fix?

@mshinwell
Copy link
Contributor

@hhugo is going to work on a fix right now.

@damiendoligez The CI slave for ppc64 appears to have OCaml configured in 32-bit mode. Is that expected?

@mshinwell
Copy link
Contributor

(Please don't revert this, we will apply a patch on top)

@shindere
Copy link
Contributor

shindere commented May 5, 2017 via email

@dra27
Copy link
Member

dra27 commented May 6, 2017

The new test is also failing on Windows (I appreciate that AppVeyor results being unavailable for other reasons would have made this difficult to spot).

@hhugo
Copy link
Contributor Author

hhugo commented May 6, 2017

Can one have access to the test result? what the size of integers on windows 64 ?


compile:
printf " ... testing -compat-32"
@$(OCAMLC) -compat-32 -c a.ml 2>&1 | xargs echo ${} > test.result
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the basis that tests should be as simple as possible, why is the output piped to xargs?

@hhugo
Copy link
Contributor Author

hhugo commented May 7, 2017

#1161

@hhugo hhugo deleted the compat32 branch March 26, 2018 22:48
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Oct 25, 2022
…caml#896)

* Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t`

Also introduces the `Pgetpredef` primitive to cover the case where the original
`Pgetglobal` took a predefined `Ident.t`.

This is the first step toward having `Compilation_unit.t` take the place of
known-global `Ident.t`s. There have been about as few API changes as I can get
away with, which in many places means converting between `Ident.t` and
`Compilation_unit.t`, which we very much want to get away from in the long term,
since an `Ident.t` is ambiguous as to whether it has its proper prefix (usually
not, but occasionally so!).

Co-authored-by: Mark Shinwell <[email protected]>
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Feb 21, 2023
…ilation_unit.t` (ocaml#896)

* Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t`

Also introduces the `Pgetpredef` primitive to cover the case where the original
`Pgetglobal` took a predefined `Ident.t`.

This is the first step toward having `Compilation_unit.t` take the place of
known-global `Ident.t`s. There have been about as few API changes as I can get
away with, which in many places means converting between `Ident.t` and
`Compilation_unit.t`, which we very much want to get away from in the long term,
since an `Ident.t` is ambiguous as to whether it has its proper prefix (usually
not, but occasionally so!).

Co-authored-by: Mark Shinwell <[email protected]>
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Mar 21, 2023
b11eea1 flambda-backend: Introduce Import_info (ocaml#1036)
bc5b135 flambda-backend: Fix `ocamlobjinfo` on flambda2 .cmx files (ocaml#1029)
c8babbd flambda-backend: Compilation_unit optimisations (ocaml#1035)
e8d3e22 flambda-backend: Use 4.14.0 opam switch for building (includes upgrading ocamlformat to 0.24.1) (ocaml#1030)
eb14a86 flambda-backend: Port PR81 from ocaml-jst (ocaml#1024)
131bc12 flambda-backend: Merge ocaml-jst 2022-12-13 (ocaml#1022)
06c189a flambda-backend: Make stack allocation the default (ocaml#1013)
98debd5 flambda-backend: Initial support for value slots not of value kind (ocaml#946)
deb1714 flambda-backend: Add is_last flag to closinfo words (ocaml#938)
d07fce1 flambda-backend: Disable poll insertion in Configure (ocaml#967)
0f1ce0e flambda-backend: Regenerate ocaml/configure autoconf 2.69 (instead of 2.71) (ocaml#1012)
27132d8 flambda-backend: Fix for spurious typing error related to expanding through functor arguments (ocaml#997)
724fb68 flambda-backend: Use `Compilation_unit.t` instead of `Ident.t` for globals (ocaml#871)
396d5b8 flambda-backend: Add a test for frametable setup in natdynlinked libraries (ocaml#983)
b73ab12 flambda-backend: Fix invocation of `caml_shared_startup` in native dynlink (ocaml#980)
7c7d75a flambda-backend: Fix split_default_wrapper which did not trigger anymore with flambda2 (ocaml#970)
8fb75bd flambda-backend: Port ocaml#11727 and ocaml#11732 (ocaml#965)
fdb7987 flambda-backend: Fix include functor issue after 4.14 merge. (ocaml#948)
9745cdb flambda-backend: Print -dprofile/-dtimings output to stdout like 4.12 (ocaml#943)
5f51f21 flambda-backend: Merge pull request ocaml#932 from mshinwell/4.14-upgrade
841687d flambda-backend: Run make alldepend in ocaml/ (ocaml#936)
72a7658 flambda-backend: Remove reformatting changes only in dynlink/dune (preserving PR889 and adjusting to minimise diff)
6d758cd flambda-backend: Revert whitespace changes in dune files, to match upstream
c86bf6e flambda-backend: Remove duplicate tests for polling
971dbeb flambda-backend: Testsuite fixes
32f8356 flambda-backend: Topeval fix for symbols patch
befea01 flambda-backend: Compilation fixes / rectify merge faults
a84543f flambda-backend: Merge ocaml-jst
8e65056 flambda-backend: Merge ocaml-jst
4d70045 flambda-backend: Remove filename from system frametable (amd64) (ocaml#920)
5e57b7d flambda-backend: Bugfix for runtime frame_descr logic for C frames (ocaml#918)
6423d5e flambda-backend: Merge pull request ocaml#914 from mshinwell/merge-ocaml-jst-2022-10-24
ead605c flambda-backend: Add a missing Extract_exception (ocaml#916)
c8f1481 flambda-backend: Resolve conflicts and add specialise/specialised attributes to Builtin_attributes
cf4d0d3 flambda-backend: Merge fixes (ocaml#21)
c2f742f flambda-backend: Re-enable some tests for Flambda2 (ocaml#881)
3d38d13 flambda-backend: Long frames in frametable (ocaml#797)
85aec7b flambda-backend: Add loop attribute to Builtin_attributes
c0f16e3 flambda-backend: Compilation fixes
90dea23 flambda-backend: Merge flambda-backend/main
5acc6ea flambda-backend: Fixes after merge
e501946 flambda-backend: Merge ocaml-jst
115083b flambda-backend: Merge ocaml-jst
9943b2e flambda-backend: Revert "Revert "Transform tail-recursive functions into recursive continuations (ocaml#893)"" (ocaml#909)
ce339f1 flambda-backend: Fix alloc modes and call kinds for overapplications (ocaml#902)
e6a317c flambda-backend: Revert "Transform tail-recursive functions into recursive continuations (ocaml#893)"
853c488 flambda-backend: Transform tail-recursive functions into recursive continuations (ocaml#893)
5a977e4 flambda-backend: Fix missing End_region primitives on switch arms (ocaml#898)
7fa7f9d flambda-backend: Add missing dependencies to Dune files (ocaml#889)
3cd36f0 flambda-backend: Have Lambda `Pgetglobal` and `Psetglobal` take `Compilation_unit.t` (ocaml#896)
7565915 flambda-backend: [@poll error] attribute (ocaml#745)
9eb9448 flambda-backend: Backport the main safepoints PRs (ocaml#740)
689bdda flambda-backend: Add strict mode for ocamldep (ocaml#892)

git-subtree-dir: ocaml
git-subtree-split: b11eea1
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants