Skip to content

MDEV-39157 BUILD_TYPE=mysql_release to remove compile flags#4890

Open
grooverdan wants to merge 1 commit intoMariaDB:10.11from
grooverdan:MDEV-39157
Open

MDEV-39157 BUILD_TYPE=mysql_release to remove compile flags#4890
grooverdan wants to merge 1 commit intoMariaDB:10.11from
grooverdan:MDEV-39157

Conversation

@grooverdan
Copy link
Copy Markdown
Member

BUILD_TYPE=mysql_release changes a bunch of build flags on Linux/UNIX systems and our CI processes insufficiently test the impacts of these.

This effectively drops the gcc/clang optimization from O3 of a release down to O2. The performance gains of O3 vs O2 are currently insufficiently tested (MDEV-19734 is outstanding).

What is clear is amd64v3 is providing the ability of enhanced MMX instructions which causes segfaults on unaligned addresses (MDEV-38989 and others). As compilers get smarter and O3 provides more transforms is safer if the CMAKE_BUILD_TYPE=RelWithDebInfo experiences of CI have identical compile flags, with BUILD_TYPE=mysql_release changing to present required features only.

This resolves MDEV-35809 by removing the specialized optimization for platforms that are unsupported or unmaintained per PR #3744 comments.

BUILD_TYPE=mysql_release changes a bunch of build flags on Linux/UNIX
systems and our CI processes insufficiently test the impacts of these.

This effectively drops the gcc/clang optimization from O3 of a
release down to O2. The performance gains of O3 vs O2 are currently
insufficiently tested (MDEV-19734 is outstanding).

What is clear is amd64v3 is providing the ability of enhanced MMX
instructions which causes segfaults on unaligned addresses
(MDEV-38989 and others). As compilers get smarter and O3 provides
more transforms is safer if the CMAKE_BUILD_TYPE=RelWithDebInfo
experiences of CI have identical compile flags, with BUILD_TYPE=mysql_release
changing to present required features only.

This resolves MDEV-35809 by removing the specialized optimization
for platforms that are unsupported or unmaintained per PR MariaDB#3744
comments.
@grooverdan grooverdan added the MariaDB Foundation Pull requests created by MariaDB Foundation label Apr 2, 2026
@grooverdan grooverdan requested review from dr-m and vaintroub April 2, 2026 01:48
Copy link
Copy Markdown
Member

@vaintroub vaintroub left a comment

Choose a reason for hiding this comment

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

I like it generally, however as far as I remember, -fno-omit-frame-pointer is a good flag that would be pity to lose. It is a tiny de-optimization, for the sake of better stack traces and perf. Maybe it should go elsewhere, not into this file only, what do you think?

@grooverdan
Copy link
Copy Markdown
Member Author

I like it generally, however as far as I remember, -fno-omit-frame-pointer is a good flag that would be pity to lose. It is a tiny de-optimization, for the sake of better stack traces and perf. Maybe it should go elsewhere, not into this file only, what do you think?

I think you're right, so much you already did: e54723f 😄

@vaintroub vaintroub self-requested a review April 2, 2026 07:10
Copy link
Copy Markdown
Member

@vaintroub vaintroub left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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

Labels

MariaDB Foundation Pull requests created by MariaDB Foundation

Development

Successfully merging this pull request may close these issues.

2 participants