Commit Graph

569 Commits (89b1ab4acacc9266aa6f6df6bb86f43310825447)

Author SHA1 Message Date
David Allsopp b818e2af91 Correct MKEXEDEBUGFLAG for msvc (#8638) 2019-05-03 09:25:37 +02:00
David Allsopp 8838dc7527 Don't generate #! headers over 127 characters
A #! line should not exceed 128 characters (including the \0
terminator). This adds a test - both to the generation of the camlheader
files and also to the -use-runtime flag which falls back to #!/bin/sh
and uses exec to invoke the the interpreter.
2019-05-02 20:29:49 +02:00
David Allsopp 4dc48fafaf Enable SSE2 for i686 mingw32
GCC 7.4 generates incorrect code for caml_round by using 80-bit registers
instead of 64-bit registers for the calculations.
2019-04-19 20:44:49 +02:00
David Allsopp c78923f179 Remove --runstatedir from configure 2019-04-02 16:35:36 +01:00
Sébastien Hinderer ff1e848f8c Finish removing PPC/non-Linux support (#8536)
This commit removes the remaining traces of support
for the Power/PowerPC architecture with OS other than Linux.
ocamlopt stopped supporting those configurations in 2014,
see commit  8815d7e and following.
2019-03-26 20:12:23 +01:00
Greg V f746a0024e Add FreeBSD/aarch64 support
Using the clang/llvm assembler avoids an extra dependency on GNU binutils, and that's what 32-bit arm is using.
But in this case, there was a problem with floating point immediates: LLVM thinks that if they're written in hex, they must be integer values between 0 and 255.
Changed them to float literals.
2019-03-22 15:35:43 +03:00
Sébastien Hinderer 6db4eadc5e
Fix alignment detection for long integers on 32-bits platforms (#8532) 2019-03-21 19:16:16 +01:00
Sébastien Hinderer b56c4ff3d0
Get rid of the direct call to the C preprocessor in the testsuite (#8528)
Call the C preprocessor through the C compiler rather than calling it
directly.

This required the definition of a new ocamltest variable,
ocaml_filetype_flag, which makes it possible to override the filetype
inferred by the compiler from the extnesion of the source file.
2019-03-21 18:12:43 +01:00
Stephen Dolan 58ef7303bb Remove some unused configure tests. (#8533) 2019-03-21 17:35:59 +01:00
Konstantin Romanov f1a1347e7b Reenable XLC on AIX 7.x (#2295) 2019-03-21 17:13:35 +01:00
Jérémie Dimino c413136fa3 Delete otherlib/{graph,win32graph} (#2318)
The Graphics library is now distributed as a separate package.
The sources are at https://github.com/ocaml/graphics .

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-18 15:05:57 +01:00
Mark Shinwell 2cc1ea26b9 Remove gprof support (#2314)
This commit removes support for gprof-based profiling (the -p option to ocamlopt).  It follows a discussion on the core developers' list, which indicated that removing gprof support was a reasonable thing to do. The rationale is that there are better easy-to-use profilers out there now, such as perf for Linux and Instruments on macOS; and the gprof support has always been patchy across targets. We save a whole build of the runtime and simplify some other parts of the codebase by removing it.
2019-03-16 19:56:53 +01:00
Sébastien Hinderer 5b5513963b Fix detection of assembler on some platforms
This commit fixes MPR#7919
2019-03-13 10:49:31 +00:00
Sébastien Hinderer f48b107bc7 Clarify the invocation of the C preprocessor
Most of the time, the C preprocessor needs to be invoked through the C
compiler, e.g. so that the paths to the header files are resolved properly.
In some cases, though, we really need to be able to call the C
preprocessor directly, just to expand macros in .ml files (this only
happens in the testsuite, at the moment). In those cases, it is
simply impossible to call the C preprocessor through the compiler,
e.g. because this would require the input files to have a '.c'
extension, which the OCaml compiler would misinterprete as meaning this file
should be compiled with the C compiler.

Thus, this commit clarifies the distinction between CPP and DIRECT_CPP
and provides both variables to the build system. The ocamltest build system
is also updated to take advantage of this.

We rely on autoconf's macros to detect how to call the C preprocessor
via the C compiler, except for the MSVC port where its value is hard-coded
to guarantee backward compatibility.
2019-03-13 10:49:31 +00:00
Jérémie Dimino 705054b346 Delete the vmthreads library (#2289)
* Delete the deprecated vmthreads library

It was deprecated in 4.08.

* Remove the byte/native argument of init_path

It is no longer necessary.

* Error out when passing --{enable,disable}-vmthreads to ./configure

Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
2019-03-11 19:38:16 +01:00
Mark Shinwell 784c9da23c Remove IA32 macOS (Darwin) support (#2278)
This patch removes support for 32-bit Darwin (macOS, iOS, etc) targets on Intel hardware. This enables various special cases to be removed in the i386 backend.  

The current version of macOS (Mojave) is the last one that will support 32-bit x86 binaries.  The current version of iOS does not support execution of 32-bit binaries any more.
2019-03-07 11:12:00 +01:00
David Allsopp f0f74587a6 Use emulated fma on Cygwin64 (#2177)
Cygwin is based on newlib, not glibc, and the fma function is not
implemented. Split off HAS_WORKING_FMA from HAS_C99_FLOAT_OPS. Disable
fma for Cygwin64 so that the fma test passes.
2019-03-01 14:50:34 +01:00
David Allsopp 899b48a6df Cygwin should have EXE=.exe (#2266) 2019-02-28 11:41:47 +01:00
Nicolás Ojeda Bär 60a7320619 configure: add WINDOWS_UNICODE_MODE variable 2019-02-27 11:42:04 +01:00
Fourchaux 1946594bd7 Fixing typos in various files (#2246)
Note: Typos found with https://github.com/codespell-project/codespell

Here is the (semi-manual) command used to get (and correct) the typos:

$ codespell -i 3 -w --skip=".png,.gif,./ocaml/boot,./ocaml/.git,./ocaml/manual/styles,./ocaml/manual/manual/htmlman" -L minimise,instal,contructor,"o'caml",cristal,pres,clos,cmo,uint,iff,te,objext,nto,nd,mut,upto,larg,exten,leage,mthod,delte,tim,atleast,langage,hten,iwth,mke,contant,succint,methids,eles,valu,clas,modul,que,classe,missings,froms,defaut,correspondance,differents,configury,reachs,cas,approche,normale,dur,millon,amin,oje,transfert
2019-02-13 14:04:56 +01:00
Leo White 4cb9ee9e8b
Fix configure of flambda (#2241) 2019-02-11 09:52:48 +00:00
David Allsopp 0f0d8e2d76 Propagate --disable-shared correctly on Unix
The --disable-shared option is not presently possible on the native
Windows ports, though this isn't (yet) enforced by configure.
2019-02-01 16:18:53 +01:00
Sébastien Hinderer 6986d63438 Fix help text for configure's --enable-force-safe-string option
Make clear that strings are not forced to be safe by default.
2019-01-22 17:01:49 +01:00
Sébastien Hinderer bc5907724f Clarify the help text for the debugger-related configure option 2019-01-22 16:51:12 +01:00
Sébastien Hinderer 6defc420d2 Fix typo in configure's help 2019-01-22 13:50:03 +01:00
David Allsopp 1dcb9d618b Add --disable-bigarray-lib
Disables building the legacy bigarray library without also having to
disable the unix library.
2019-01-08 17:59:44 +01:00
David Allsopp 832db132d9 Make unix, vmthreads and str optional libraries
--disable-unix-lib, --disable-vmthreads and --disable-str-lib added to
prevent building these three libraries.

ocamldoc, the debugger and caml-tex are automatically disabled if their
prerequisites are not built. Using --enable-debugger and
--enable-ocamldoc will result in errors if these tools cannot be built.
2019-01-08 17:27:42 +01:00
David Allsopp 91611d0b77 Rename --enable-pthread to --enable-systhreads
Name better reflects the cross-platform nature of the library.
2019-01-08 17:27:37 +01:00
David Allsopp 8e504739f8 Fix --disable-pthread
$systhread_support must be a valid OCaml boolean, as it gets written to
tools/config.ml
2019-01-08 17:25:54 +01:00
Sébastien Hinderer cc3f70b705 Use autoconf to generate the compiler's configuration script 2018-12-21 16:02:47 +01:00
Laurent Thévenoux db99969bc8 Support FMA operation (#1354)
Adds a fused multiply-add operation to the Float module.

The following changes are made:
- configure: check math.h for the C99 fma() operation.
- fma declarations in float.ml[i] (stdlib/).
- C fma() call or emulation in runtime/floats.c.
- dedicated tests in testsuite/tests/fma.
2018-10-26 10:45:36 +02:00
Sébastien Hinderer 6eea292727
Remove the dl_needs_underscore feature (#2115)
This feature could not be enabled anyway
2018-10-25 15:12:22 +02:00
Sébastien Hinderer e473b67081 runtime: move the definition of INT64_LITERAL from m.h to config.h 2018-10-23 09:01:29 +02:00
Sébastien Hinderer b799715cae tools: move the definition of mklib from ocamlmklibconfig.ml to ocamlmklib.ml 2018-10-23 09:01:29 +02:00
Sébastien Hinderer 04d24edec0 tools: move the definition of syslib from ocamlmklibconfig.ml to ocamlmklib.ml 2018-10-23 09:01:29 +02:00
Sébastien Hinderer ccae1e2876
Define OCAML_STDLIB_DIR in runtime/Makefile rather than in s.h (#2059) 2018-09-25 16:04:11 +02:00
Sébastien Hinderer 132b3a151d
Get rid of the standard_runtime configuration variable (#2066)
This configuration variable was formerly used by the -make_runtime and
-use_runtime option but this is no longer the case.
2018-09-25 15:29:18 +02:00
Sébastien Hinderer ba6362a07d Move config/Makefile to Makefile.config
In order to prepare the transition to autoconf, this commit moves the
configuration Makefile out of the config directory which will disappear
and gives it the name it will have once intstalled, namely Makefile.config.
2018-09-17 14:23:35 +02:00
Sébastien Hinderer 7b28143ecb Change the way ARCH_CODE32 is defined
Before this commit, this C preprocessor macro was defined in
byterun/caml/m.h by the configure script, but just on some architectures
and only in non-PIC mode.

This commit introduces the HAS_ARCH_CODE32 predicate which is inserted
in the m.h file when this is relevant, the ifdef block on PIC
being moved to config.h.

This is to prepare the switch to autoconf, since header files processed
by config.status are not allowed to contain ifdef blocks.
2018-09-17 14:23:35 +02:00
Sébastien Hinderer 6676d9544c
Stop supporting obsolete platforms (#2024)
This commit simplifies the configure script by removing the support
for obsolete platforms. The list of removed platforms is documented
in the associated Changes entry.
2018-09-06 15:52:01 +02:00
Xavier Clerc 7e29162582 Pass the elements from `BUILD_PATH_PREFIX_MAP` to the assembler (#1930) 2018-07-27 12:25:23 +02:00
Xavier Leroy 7e79186a12
Remove the C plugins mechanism (#1867)
The mechanism complicates the runtime system and is not very general
(only a few system functions are instrumented).  There are other ways
to intercept system calls that are more general and require no
modification to the source code of the runtime system.
2018-07-03 18:22:51 +01:00
Sébastien Hinderer d3e73595e5 Merge the asmrun and byterun directories into the runtime directory 2018-06-28 17:50:33 +02:00
Xavier Clerc 9c182f7e24 Add -dcamlprimc + pass -fdebug-prefix-map when available (#1845)
- Introduce `-dcamlprimc`, to keep the generated C file containing the primitive list
- Use `-fdebug-prefix-map` for compiling temporary C files when this option is supported
2018-06-27 14:56:29 +01:00
Sébastien Hinderer fc835fe41e Remove the BYTECCCOMPOPTS build variable
This variable is actually never defined.
2018-06-25 07:07:40 +02:00
Sébastien Hinderer 85fa27f7e9 Rename C compiler related build variables
This commit renames a few C compiler related build variables so that
they are reserved for the build system. They will then be re-introduced,
but this time as user varialbes whose value can be freely customized
when compiling the package, without risking to conflict with those
command-line flags that are required by the build system itself.

Here are the variables this commit renames:

- CFLAGS -> OC_CFLAGS
- CPPFLAGS -> OC_CPPFLAGS
- LDFLAGS -> OC_LDFLAGS

Note: before this commit the compilation of scheduler.c in
otherlibs/threads was relying on make's implicit rule to compile C files.

Since this commit stops using the standard variables for flags,
it is necessary to introduce an explicit rule to compile C files
and that makes use of the newly introduced variables.
2018-06-20 14:01:42 +02:00
Sébastien Hinderer a10a3f5806 Rename build variable SHAREDCCCOMPOPTS to SHAREDLIB_CFLAGS 2018-06-20 14:01:42 +02:00
David Allsopp b5d1929e87 Whitespace and overlong line fixes. 2018-06-14 15:15:34 +01:00
Sébastien Hinderer c226df2716 Remove the NATIVECCPROFOPTS build variable
This variable is actually always empty
2018-06-14 15:25:39 +02:00
David Allsopp 02a3091a7d Export ARCH64 to config/Makefile as well as m.h
Allows it to be used more easily in the build system.
2018-06-11 22:52:00 +01:00