Skip to content

Add missing -function-sections in Makefile in otherlibs#9165

Merged
dra27 merged 7 commits intoocaml:trunkfrom
gretay-js:fs-otherlibs
Apr 20, 2020
Merged

Add missing -function-sections in Makefile in otherlibs#9165
dra27 merged 7 commits intoocaml:trunkfrom
gretay-js:fs-otherlibs

Conversation

@gretay-js
Copy link
Copy Markdown
Contributor

The flag -function-sections was not passed to ocamlopt as needed in two of the Makefiles under otherlibs. These two Makefiles don't include the common Makefile which takes care of adding this option.

@mshinwell
Copy link
Copy Markdown
Contributor

I suggest this is backported to 4.10.

@dra27
Copy link
Copy Markdown
Member

dra27 commented Dec 7, 2019

The ultimate goal is to have only one common Makefile for otherlibs, but that’s a ton of work. However, rather than papering this over again, could this be done either by shifting these common definitions all the way up to Makefile.common.in (if that can work there - is this flag wanted everywhere ocamlopt is invoked?) or by splitting Makefile.otherlibs.common into parts which really are common to all three templates (macro definitions) and only for the “simple” libraries (rules for unix, str, etc.)?

stedolan added a commit to janestreet/ocaml that referenced this pull request Mar 17, 2020
@gretay-js
Copy link
Copy Markdown
Contributor Author

@dra27 I'm sorry for leaving your comment unanswered for so long (not sure how I missed it).

As you suggested, I moved the definition of OPTCOMPFLAGS to Makefile.common.in. It is the only place where FUNCTION_SECTIONS variable is checked and the flag -function-sections is added to OPTCOMPFLAGS. So far, these changes preserve the behavior we had before.

In addition, the last commit also moves the check for FLAMBDA to Makefile.common.in in order to add "-O3" to OPTCOMPFLAGS. It preserves the behavior of OPTCOMPFLAGS in stdlib and otherlib. It changes OPTCOMPFLAGS in the "main" Makefile to use "-O3" option when configured with FLAMBDA. The tests pass, it doesn't seem to take longer, and it is nice and uniform. Is there a particular reason it shouldn't be compiled with -O3?

@dra27 dra27 added this to the 4.11 milestone Apr 16, 2020
@dra27 dra27 added the bug label Apr 16, 2020
Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

Thanks for the changes, and sorry for my lag approving!

Copy link
Copy Markdown
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

Given that it still short a Changes entry, 3 nits of extra blank lines which I don't think are needed!

@dra27
Copy link
Copy Markdown
Member

dra27 commented Apr 16, 2020

Good to go once it has a Changes entry and I agree with @mshinwell that this should go to 4.10 as well.

@dra27
Copy link
Copy Markdown
Member

dra27 commented Apr 17, 2020

@Octachron - if this is going in 4.10, does that the mean the Changes entry on trunk should also be the "4.10 Maintenance Branch" bit, or in the "Working Version"(/4.11) bit?

@dra27
Copy link
Copy Markdown
Member

dra27 commented Apr 17, 2020

Thanks for the updates @gretay-js - I'll merge and cherry-pick this once CI is green!

@gretay-js
Copy link
Copy Markdown
Contributor Author

Thank you!

@dra27
Copy link
Copy Markdown
Member

dra27 commented Apr 20, 2020

Ping @Octachron, just to confirm which Changes section this can go in - I'll fix that after merge

@Octachron
Copy link
Copy Markdown
Member

Sorry, I missed your earlier question. Since we are planning to have a 4.10.1 release, before the 4.11.0 release, I think it is fine to have the entry in the future 4.10.1 section.

@dra27 dra27 merged commit 06cc08e into ocaml:trunk Apr 20, 2020
@dra27
Copy link
Copy Markdown
Member

dra27 commented Apr 20, 2020

Thanks!

dra27 added a commit that referenced this pull request Apr 20, 2020
Add missing -function-sections in Makefile in otherlibs

(cherry picked from commit 06cc08e)
gretay-js pushed a commit to gretay-js/ocaml that referenced this pull request Jun 4, 2020
gretay-js pushed a commit to gretay-js/ocaml that referenced this pull request Jun 4, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)
gretay-js pushed a commit to gretay-js/ocaml that referenced this pull request Jun 4, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file
gretay-js pushed a commit to gretay-js/ocaml that referenced this pull request Jun 4, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 16, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 20, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 20, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 21, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 21, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 30, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Jul 30, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 3, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 4, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 5, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 7, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 10, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 10, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
dra27 added a commit to dra27/ocaml that referenced this pull request Aug 12, 2020
dra27 added a commit to dra27/ocaml that referenced this pull request Aug 12, 2020
dra27 added a commit to dra27/ocaml that referenced this pull request Aug 12, 2020
dra27 added a commit to dra27/ocaml that referenced this pull request Aug 12, 2020
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 17, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 18, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 19, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 20, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Aug 28, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 2, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Sep 7, 2020
ocaml#8938 from upstream trunk (cherry-pick 4353c75)

ocaml#9090 from upstream trunk (cherry-pick fe7c8ed)

ocaml#9097 from upstream trunk (cherry-pick 6daaf62)

ocaml#8939 from gretay-js/save-linear (cherry-pick 1200de9)

ocaml#9003 from gretay-js/start-from-emit (cherry-pick 21d5d26)

Add linear_format to dune file

Update .depend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants