Commit Graph

52 Commits (75983ab9b1da29d147d8989575dc81f1f2ce10a0)

Author SHA1 Message Date
David Allsopp 75983ab9b1 Ensure Makefile.config gets Windows-style prefix
Prefix may be passed to configure using a Cygwin-style PATH (e.g.
`./configure --prefix ~/local`). Use cygpath to ensure that the correct
version gets written to Makefile.config, or the resulting compiler has
an invalid default stdlib path.
2019-11-25 14:14:59 +01:00
Greta Yorsh 4da56cb632 Disallow function sections for arm32 (#9125)
Disallow function sections on arm32, as the simplest way to address issue #9124 and get the CI working on the newer versions of GNU binutils for Raspbian. After this change, configure --enable-function-sections is an error on arm32.  When the issue with GNU ld is resolved, this can be added back with appropriate checks on version of binutils.

Closes: #9124
2019-11-18 17:15:11 +01:00
Kate e0ee2f7a05 Fix configure: Define the CAML_SAFE_STRING variable when force-safe-string is on 2019-11-14 11:18:43 +00:00
Damien Doligez 01bdd5bbc4
best-fit allocator (#8809) 2019-10-15 13:52:16 +02:00
Gabriel Scherer e232369580
Merge pull request #8835 from dra27/save-the-planet
New configure option to disable building and installing library manpages
2019-10-05 16:52:16 +02:00
Sébastien Hinderer 987b0814d7 Let make's default target build the compiler
This commit makes it possible to build the OCaml compiler according to
its configuration by simply runnning make. There is no need to specify
neither world nor world.opt explicitly, although the two targets
remain available.

This commit also introduces (and starts making use of) the
NATIVE_COMPILER build variable whosse value is true when the native
compiler is enabled and false otherwise.
2019-09-30 16:01:29 +02:00
David Allsopp 0912745754 Make STDLIB_MANPAGES a boolean, not a target 2019-09-27 17:13:42 +01:00
David Allsopp 2d717cb71a Add --disable-stdlib-manpages to configure 2019-09-27 17:13:24 +01:00
Sébastien Hinderer ff20676fdc configure: improve support for the BFD library
This commit adds:

- The --with-bfd command-line option

- The BFD_INCLUDE_DIR and BFD_LIB_DIR configuration variables
2019-09-23 14:48:48 +02:00
Sébastien Hinderer e3b33a5750 Build system: introduce the BFD_LDFLAGS variable
This variable is not really used yet but will be used soon.
2019-09-23 14:45:54 +02:00
Sébastien Hinderer 762fe0abaa Build system: rename the LIBBFD_INCLUDE variable to BFD_CPPFLAGS 2019-09-23 14:45:54 +02:00
Sébastien Hinderer d718cd9db3 Build system: rename the LIBBFD_LINK variable to BFD_LDFLAGS 2019-09-23 14:45:54 +02:00
Sébastien Hinderer 3d642545e8 configure: fix typo in variable name 2019-09-23 14:45:54 +02:00
Kate c01dbc1bab Enable force-safe-string by default (#1859)
* Enable force-safe-string by default

* Run the autogen script

* Add a line to the changelog

* Remove test using the -unsafe-string argument

* Disable program comparison for tests giving different binaries between ocamlopt.opt and ocamlopt.byte after switching to force-safe-string by default

* Add a comment where the compare_programs tests have been disabled to refer to an explaination of the problem
2019-09-10 17:49:20 +02:00
Stephen Dolan 5e4b55d3bd Use the autoconf- or system-provided off_t rather than redetecting. (#8843)
Fixes: #8841
2019-07-31 13:56:26 +02:00
David Allsopp c43d198cfa Merge pull request #8830 from glondu/4.08-configure-fixes
Small fixes in configure.ac

(cherry-picked from commit 1e610e2703927144786c2e62907cd07e28677a0f)
2019-07-30 10:55:58 +01:00
Greta Yorsh 2857be6cf7 Error in configure --enable-function-sections if target doesn't support it
If the user explicitly requests function sections by calling configure
with --enable-function-sections on a target that does not support it,
it's an error at configure time.
2019-07-15 10:25:26 +01:00
Greta Yorsh 351edb49bb Add compile-time option -function-sections 2019-07-15 10:25:26 +01:00
Greta Yorsh 27a92a9445 Emit each function in a separate section (amd64,i386,arm,arm64)
Add --enable-function-sections option to configure. With this option,
the compiler will emit each function in a separate named text section,
on supported targets. This enables function reordering using a linker
script. With this option, the compiler also emits caml_hot__code_begin
and caml_hot__code_end sections. This allows a linker script to
move function sections outside of the segments they belong to,
without breaking caml_code_segments.
2019-07-15 10:25:26 +01:00
David Allsopp 6c87f5e391 Use AC_PREREQ to force Autoconf 2.69 2019-06-11 09:56:01 +02:00
David Allsopp c37a6e5d90
Fix --with-pic in configure (#8632)
--with-pic should be adding -fPIC (or equivalent) to $internal_cflags,
not $common_cflags. Additionally, unused variable aspp was being
updated, instead of ASPP.
2019-05-21 11:07:47 +01:00
Sébastien Hinderer b694e84aff configure: fix libunwind and spacetime support 2019-05-20 16:37:41 +02:00
Sébastien Hinderer 17feab2a4f
configure: use variables rather than arguments for a few options (#8616)
This commit replaces a few configure command-line options by configuration
variables:

- "--with-dllibs" is replaced by DLLIBS
- "--with-reserved-header-bits" is replaced by RESERVED_HEADER_BITS
- "--with-default-string" is replaced by DEFAULT_STRING
2019-05-09 16:39:06 +02:00
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
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