Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix --with-pic in configure #8632
(sorry about the delay for reviewing this!) David Allsopp (2019/04/20 05:09 -0700):
@dbuenzli noted in #7678 (comment) that specifying `--with-pic` causes `-fPIC` to appear twice when using `ocamlc -c`. While fixing that PR, I noticed two problems with the logic for `--with-pic`: - It should be updating `$internal_cflags`, not `$common_cflags` (which is what Daniel noticed) - `aspp` is not used anywhere - I think it should be updating `ASPP`, although I also wonder if it should in fact update `default_aspp` (which would require `ASPP` to be defined later. @shindere - if the user provides `ASPP`, do we expect that to have absolutely everything which is required? If so, then I should amend this to set `default_aspp` instead. As it stands, if the user says `./configure - ASPP=foo --with-pic` then `Makefile.config` will have `ASPP=foo - -fPIC`.
I am not sure what should happen if the user overrides ASPP. I'd say it'd make more sense to assume the user provides everything, in the sense that if the user has to do this overloading, then our guess may be wrong so we should not add anything and let the user be explicit. What do you think, àdra27?
May 21, 2019
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews.