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

C optimization level #3664

Closed
vicuna opened this issue May 26, 2005 · 1 comment
Closed

C optimization level #3664

vicuna opened this issue May 26, 2005 · 1 comment

Comments

@vicuna
Copy link

vicuna commented May 26, 2005

Original bug ID: 3664
Reporter: administrator
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-06T21:57:44Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Tags: patch

Bug description

Full_Name: Toshio Kuratomi
Version: 3.08.3
OS: Linux: Fedora Core 4
Submission from: host168.office.sover.net (209.198.73.62)

When compiling ocaml itself, the C compiler is used. This step should allow the
builder of the program to override the default optimization level (-O) with one
that they specify. The normal way in a GNU autoconf world is to set the CFLAGS
environment variable and this brings the builder's optimization level (and other
flags to the C compiler) into the build process.

Here's a patch to do just that.

--- ocaml-3.08.3/configure.opt 2005-05-08 19:00:34.000000000 -0400
+++ ocaml-3.08.3/configure 2005-05-08 19:54:50.000000000 -0400
@@ -1455,6 +1455,10 @@
nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
esac

+# Allow user defined C Compiler flags
+bytecccompopts="$bytecccompopts $CFLAGS"
+nativecccompopts="$nativecccompopts $CFLAGS"
+

Finish generated files

cclibs="$cclibs $mathlib"

@vicuna
Copy link
Author

vicuna commented Dec 6, 2016

Comment author: @mshinwell

I'm not sure this needs to remain open. There are plans to move to autoconf in the future, for what it's worth. Perhaps more importantly, I suspect one of the motivations for this PR might have been increasing the optimisation level with which the runtime system is compiled---this has now been increased with the necessary safeguards by default.

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