RFR: JDK-8313790: [arm32] Specify -marm when building without an ABI profile

Erik Joelsson erikj at openjdk.org
Mon Oct 30 18:16:32 UTC 2023


On Fri, 4 Aug 2023 16:17:04 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

> See [JDK-8288719](https://bugs.openjdk.org/browse/JDK-8288719) and subsequent [discussion](https://mail.openjdk.org/pipermail/build-dev/2022-May/034635.html) back in 2022.
> 
> On Arm, we can generate either arm- or thumb-code (`-marm` or `-mthumb`). 
> 
> At the moment, if we don't specify an ABI profile (`--with_abi_profile`) when configuring the build, we call gcc without `-marm` or `-mthumb`. Then we use whatever the toolchain defaults too, which is pretty much random (it depends on how the toolchain itself had been built). That can cause really rare but tricky problems when combining static assembly and C++ code (See e.g. JDK-8288719).
> 
> I propose to always specify `-marm` as default, unless an ABI profile is given, to prevent such errors.
> 
> Thanks to @marchof for testing this.

Marked as reviewed by erikj (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/15162#pullrequestreview-1704801394


More information about the build-dev mailing list