Skip to content

Native code configuration on FreeBSD10#41

Closed
andrewray wants to merge 2 commits intoocaml:trunkfrom
andrewray:x86_64-freebsd
Closed

Native code configuration on FreeBSD10#41
andrewray wants to merge 2 commits intoocaml:trunkfrom
andrewray:x86_64-freebsd

Conversation

@andrewray
Copy link

Use 'as=as', 'aspp=cc -c'. If 'cc=gcc' then use previous defaults.

Tested on x86_64 versions of FreeBSD10 and FreeBSD9.2.

Use 'as=as', 'aspp=cc -c'.
@andrewray
Copy link
Author

See also #9

@gasche
Copy link
Member

gasche commented May 1, 2014

Could you clarify the relation to #9 for someone that doesn't know anything about either BSDs and the configure script? To the naive observes, it looks like #9 subsumes this one. Is it correct? Or should both be included?

@andrewray
Copy link
Author

I think it's one or the other solution.

For as I don't think you need to compile with clang at all though @avsm may have had a reason.

For aspp I suspect both solutions could be done as just cc -c where cc will alias either gcc or clang depending on the system compiler, though I would need to recompile and check on a couple of freebsd versions.

@avsm
Copy link
Member

avsm commented May 1, 2014

FreeBSD needs as set to clang because gcc isn't installed by default. Setting it to cc would be fine too.

@andrewray
Copy link
Author

as (the program) is installed even though gcc is not. I'm not arguing against using cc -c for the as variable - I just don't know why it's not done generally.

The aspp variable, which maps to gcc -c generally, definitely needs to be changed (for freebsd>9). My belief is that using cc as an appropriate alias for which ever is installed (either by the user or by the OS version) would be correct for everything. I can check this on FreeBSD 9 and 10.

@gasche
Copy link
Member

gasche commented May 2, 2014

I have no problem with merging whatever you think is best; just send me the final patch.

use `cc -c` for preprocessed assembly and it will map to either clang or
gcc depending on the platform.

stick with `as` for general assembly as that seems to fit better with
the other targets
@andrewray
Copy link
Author

This simplifies the patch and has been retested on freebsd 9 and 10. For the sake of full disclosure, I ran the testsuite and both failed with

Summary:
  430 test(s) passed
    1 test(s) failed
    0 unexpected error(s)

List of failed tests:
    tests/lib-threads/test5.ml

@gasche
Copy link
Member

gasche commented May 2, 2014

Patch merged, thanks. You will have to rebase #43, though -- which is much less minor than this one, so I'll wait for someone that actually knows something to merge it themself.

@avsm
Copy link
Member

avsm commented May 3, 2014

I can confirm that the lib-thread/test5.ml failure also occurs on FreeBSD 10/x86_64, so it's not ARM specific. Looking into it

@andrewray
Copy link
Author

@avsm - this failure was on x86 freebsd 9 and 10.

I actually ran the testsuite on arm before submitting #43 and it didn't fail.

@andrewray
Copy link
Author

@avsm I pulled that latest trunk and retested. I tested on 2 freebsd10 VMs (both under virtualbox) and it passed on one and failed on the other (in test5.ml).

The only difference between the VMs (apart from installed software) was the passing one is SMP (3 CPUs) and the failing one single processor.

I added a 2nd CPU to the VM which was failing and it now passes the tests.

Most odd....

@gasche
Copy link
Member

gasche commented May 4, 2014

I know that some of the threads test exhibit non-deterministic behavior.. I wouldn't worry too much about your change specifically making things worse.

@bactrian
Copy link

bactrian commented May 4, 2014

Confirmed, same result here. Looks like the sender spins and doesn't synchronize at all on the Event mutex.

On 4 May 2014, at 17:53, Andrew Ray [email protected] wrote:

@avsm I pulled that latest trunk and retested. I tested on 2 freebsd10 VMs (both under virtualbox) and it passed on one and failed on the other (in test5.ml).

The only difference between the VMs (apart from installed software) was the passing one is SMP (3 CPUs) and the failing one single processor.

I added a 2nd CPU to the VM which was failing and it now passes the tests.

Most odd....


Reply to this email directly or view it on GitHub.

@avsm
Copy link
Member

avsm commented May 4, 2014

This ones definitely a bug, since the semantics of the Event module completely break if the channel sync doesn't work.

On 4 May 2014, at 17:59, gasche [email protected] wrote:

I know that some of the threads test exhibit non-deterministic behavior (that's kind of the point). I wouldn't worry too much about your change specifically making things worse.


Reply to this email directly or view it on GitHub.

lpw25 pushed a commit to lpw25/ocaml that referenced this pull request Oct 27, 2015
Switch Pprintast over to the new syntax.
Gbury pushed a commit to Gbury/ocaml that referenced this pull request Oct 29, 2019
anmolsahoo25 pushed a commit to anmolsahoo25/ocaml that referenced this pull request Aug 25, 2020
…s_termination

Revert "Handle interrupts in caml_finish_marking & caml_finish_sweepi…
poechsel pushed a commit to poechsel/ocaml that referenced this pull request Jul 2, 2021
lpw25 pushed a commit to lpw25/ocaml that referenced this pull request Nov 4, 2021
It is incorrect to combine two local allocations that straddle
a heap allocation, as the GC traverses the local allocations
looking for roots and must not see uninitialised local data.
lpw25 pushed a commit to lpw25/ocaml that referenced this pull request Nov 12, 2021
It is incorrect to combine two local allocations that straddle
a heap allocation, as the GC traverses the local allocations
looking for roots and must not see uninitialised local data.
stedolan added a commit to stedolan/ocaml that referenced this pull request May 24, 2022
173842c Merge flambda-backend changes
ed7eba2 Remove leading space from LINE. (oxcaml/oxcaml#484)
bd61170 Bump magic numbers (ocaml#5)
c50c47d Add CI builds with local allocations enabled
1412792 Move local allocations support behind '-extension local'
6d8e42a Better tail call behaviour in caml_applyN
c7dac3d Typemod: toplevel bindings escape even if no variables are bound
82d6c3e Several fixes for partial application and currying
d05c70c Pprintast support for new local syntax
e0e62fc Typecheck x |> f y as (f y x), not ((f y) x)
d7e34ce Remove autogeneration of @ocaml.curry
b9a0593 Port oxcaml/oxcaml#493
0a872d9 Code review fixes from oxcaml/oxcaml#491
6c168bb Remove local allocation counting
3c6e7f0 Code review fixes from oxcaml/oxcaml#478
bb97207 Rename Lambda.apply_position
a7cb650 Quieten Makefile when runtime dep files are not present
c656dc9 Merge flambda-backend changes
11b5424 Avoid printing double spaces in function argument lists
7751faa Restore locations to Typedtree.{pat,let}_bound_idents_full
e450b6c add build_ocaml_compiler.sexp
0403bb3 Revert PR 9895 to continue installing VERSION
b3447db Ensure new local attributes are namespaced properly
7f213fc Allow empty functions again
8f22ad8 Bugfix: ensure local domain state is initialised
80f54dd Bugfix for Selectgen with regions
e8133a1 Fix external-external signature inclusion
9840051 Bootstrap
d879f23 Merge remote-tracking branch 'jane/local-reviewed' into local-merge
94454f5 Use Local_store for the local allocations ref
54a164c Create fewer regions, according to typechecking (ocaml#59)
1c2479b Merge flambda-backend changes
ce34678 Fix printing of modes in return types
91f2281 Hook mode variable solving into Btype.snapshot/backtrack
54e4b09 Move Alloc_mode and Value_mode to Btype
ff4611e Merge flambda-backend changes
ce62e45 Ensure allocations are initialised, even dead ones
6b6ec5a Fix the alloc.ml test on 32-bit builds
81e9879 Merge flambda-backend changes
40a7f89 Update repo URL for ocaml-jst, and rename script.
0454ee7 Add some new locally-allocating primitives (ocaml#57)
8acdda1 Reset the local stack pointer in exception handlers (ocaml#56)
8dafa98 Improve typing for (||) and (&&) (ocaml#55)
8c64754 Fix make_check_all_arches (ocaml#54)
b50cd45 Allow arguments to primitives to be local even in tail position (ocaml#53)
cad125d Fix modes from or-patterns (ocaml#50)
4efdb72 Fix tailcalls tests with inlining (ocaml#52)
4a795cb Flambda support (ocaml#49)
74722cb Add [@ocaml.principal] and [@ocaml.noprincipal] attributes, and use in oo.mli
6d7d3b8 Ensure that functions are evaluated after their arguments (flambda-backend ocaml#353)
89bda6b Keep Sys.opaque_identity in Cmm and Mach (port upstream PR 9412)
a39126a Fix tailcalls within regions (ocaml#48)
4ac4cfd Fix stdlib manpages build
3a95f5e Merge flambda-backend changes
efe80c9 Add jane/pull-flambda-patches script
fca94c4 Register allocations for Omitted parameter closures (ocaml#47)
103b139 Remove various FIXMEs (ocaml#46)
62ba2c1 Bootstrap
a0062ad Allow local allocations for various primitives (ocaml#43)
7a2165e Allow primitives to be poly-moded (ocaml#43)
2af3f55 Fix a flaky test by refactoring TypePairs (ocaml#10638)
58dd807 Bootstrap
ee3be10 Fix modes in build_apply for partial applications
fe73656 Tweak for evaluation order of labelled partial applications (ocaml#10653)
0527570 Fix caml_modify on local allocations (ocaml#40)
e657e99 Relax modes for `as` patterns (ocaml#42)
f815bf2 Add special mode handling for tuples in matches and let bindings (ocaml#38)
39f1211 Only take the upper bounds of modes associated with allocations (ocaml#37)
aec6fde Interpret arrow types in "local positions" differently
c4f3319 Bootstrap
ff6fdad Add some missing regions
40d586d Bootstrap
66d8110 Switch to a system with 3 modes for values
f2c5a85 Bugfix for Comballoc with local allocations. (ocaml#41)
83bcd09 Fix bug with root scanning during compaction (ocaml#39)
1b5ec83 Track modes in Lambda.lfunction and onwards (ocaml#33)
f1e2e97 Port ocaml#10728
56703cd Port ocaml#10081
eb66785 Support local allocations in i386 and fix amd64 bug (ocaml#31)
c936b19 Disallow local recursive non-functions (ocaml#30)
c7a193a GC support for local allocations (ocaml#29)
8dd7270 Nonlocal fields (ocaml#28)
e19a2f0 Bootstrap
694b9ac Add syntax to the parser for local allocations (ocaml#26)
f183008 Lower initial stack size
918226f Allow local closure allocations (ocaml#27)
2552e7d Introduce mode variables (ocaml#25)
bc41c99 Minor fixes for local allocations (ocaml#24)
a2a4e60 Runtime and compiler support for more local allocations (ocaml#23)
d030554 Typechecking for local allocations (ocaml#21)
9ee2332 Bugfix missing from ocaml#20
02c4cef Retain block-structured local regions until Mach.
86dbe1c amd64: Move stack realloc calls out-of-line
324d218 More typing modes and locking of environments
a4080b8 Initial version of local allocation (unsafe)

git-subtree-dir: ocaml
git-subtree-split: 173842c
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Sep 21, 2022
2118848 Ensure that (if c then E) counts E as tail position for typing (ocaml#42)
a937de9 Remove mode variables in ocamlc -i (ocaml#41)
865d039 Improve typing of local unboxed values (ocaml#26)
97be59d Backport PR 10090 (ocaml#39)
7613440 Allow use of `local_` to adjust regions for loops. (ocaml#35)

git-subtree-dir: ocaml
git-subtree-split: 2118848
sadiqj pushed a commit to sadiqj/ocaml that referenced this pull request Feb 21, 2023
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.

4 participants