RFR: 8323672: Suppress unwanted autoconf added flags in CC and CXX [v7]
Julian Waters
jwaters at openjdk.org
Fri Jan 19 01:25:27 UTC 2024
On Thu, 18 Jan 2024 16:21:46 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> [JDK-8323008](https://bugs.openjdk.org/browse/JDK-8323008) reports unwanted autoconf flags being added to the command line, and solves the issue by filtering out the added flags by force. This is not optimal however, as doing so leaves the autoconf message that the flags were added still displaying during the configure process, which is confusing. Instead, setting a couple of fields to disable the autoconf internals responsible for the unwanted flag is a cleaner solution
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>
> Implement custom AC_PROG_CC and AC_PROG_CXX in util.m4
I found out that the issue of having AC_PROG_CC and AC_PROG_CXX being called by AC_REQUIRE can be solved by directly overwriting them in util.m4, rather than providing our own UTIL_PROG_CC and so on. Unsure how satisfactory this is, but I have here a stripped down version of both that omits:
For AC_PROG_CC
- The default check from a list of compilers if the compilers to search for list is empty, this now means AC_PROG_CC has to always be called with the argument at all times. We always do this, so shouldn't be a problem
- The check whether the compiler supports GNU C. This shouldn't be relevant
- The ill fated check that adds -std=gnu11. This was the one that the other issue wanted to get rid of
For AC_PROG_CXX
- Similarly, the default check from a list of compilers if the compilers to search for list is empty, and the check for CCC if it is set (We don't use CCC as fair as I can tell), this now means AC_PROG_CXX has to always be called with the argument at all times. We again always do this, so shouldn't be a problem
- The check whether the compiler supports GNU C++. This shouldn't be relevant
- The ill fated check that adds -std=gnu++11. This is also the one that the other issue wanted to get rid of
Notably, I left the check that checks if the compiler accepts -g in there, as I was unsure if we need it or not. I also tried removing the check for the object file extension, but apparently autoconf needs that to function properly. The exe file extension check is misleadingly named, because in actuality all of AC_PROG_CC and AC_PROG_CXX's functionality is in it,and it's also likely required for autoconf to work properly
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17401#issuecomment-1899483894
More information about the build-dev
mailing list