[SERVER-61743] The -fno-builtin-memcmp flag shouldn't be applied except on x86_64 platforms Created: 25/Nov/21  Updated: 29/Oct/23  Resolved: 30/Nov/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.2.0, 5.1.2, 5.0.6, 4.4.11, 4.2.19

Type: Bug Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.2, v5.1, v5.0, v4.4, v4.2
Sprint: Dev Platform 2021-12-13
Participants:

 Description   

We currently build with -fno-builtin-memcmp on all platforms, but the bug it was working around (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052) was only ever an x86_64 issue. We should allow the compiler to do what it wants on non-x86_64 platforms.

Note that we have SERVER-55132 to investigate whether the flag can now be removed on x86_64, since we expect it is no longer needed there either with modern GCC. But there is no reason to penalize the other platforms while we wait.

We should probably also restrict application to GCC, since, again, clang isn't affected.



 Comments   
Comment by Githook User [ 16/Dec/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms

(cherry picked from commit bc6a66d1d4f2bf2dfe8603de792c567ee0db830c)
(cherry picked from commit e459b7ee056d5f634787d74718d6e23c6b1e6eb5)
(cherry picked from commit f4971c2c477491a354b32cea160a056628387a9b)
(cherry picked from commit 6b0aa52bef51b2a48909269f1b2e71015b3e83e7)
Branch: v4.2
https://github.com/mongodb/mongo/commit/591b135f293603fad5e3bd1bc42e73fdb7ba68b7

Comment by Githook User [ 16/Dec/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms

(cherry picked from commit bc6a66d1d4f2bf2dfe8603de792c567ee0db830c)
(cherry picked from commit e459b7ee056d5f634787d74718d6e23c6b1e6eb5)
(cherry picked from commit f4971c2c477491a354b32cea160a056628387a9b)
Branch: v4.4
https://github.com/mongodb/mongo/commit/6b0aa52bef51b2a48909269f1b2e71015b3e83e7

Comment by Githook User [ 15/Dec/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms

(cherry picked from commit bc6a66d1d4f2bf2dfe8603de792c567ee0db830c)
(cherry picked from commit e459b7ee056d5f634787d74718d6e23c6b1e6eb5)
Branch: v5.0
https://github.com/mongodb/mongo/commit/f4971c2c477491a354b32cea160a056628387a9b

Comment by Githook User [ 14/Dec/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms

(cherry picked from commit bc6a66d1d4f2bf2dfe8603de792c567ee0db830c)
Branch: v5.1
https://github.com/mongodb/mongo/commit/e459b7ee056d5f634787d74718d6e23c6b1e6eb5

Comment by Githook User [ 30/Nov/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms
Branch: master
https://github.com/mongodb/mongo/commit/bc6a66d1d4f2bf2dfe8603de792c567ee0db830c

Generated at Thu Feb 08 05:53:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.