diff options
author | Andrew Morrow <acm@mongodb.com> | 2021-11-25 14:28:19 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-11-30 03:52:55 +0000 |
commit | bc6a66d1d4f2bf2dfe8603de792c567ee0db830c (patch) | |
tree | 4e9abc86da5c38016583eea3e4a30834bd4294bb /SConstruct | |
parent | 8e02f9ae1187eac1731ab8e710507cc87c75417c (diff) | |
download | mongo-bc6a66d1d4f2bf2dfe8603de792c567ee0db830c.tar.gz |
SERVER-61743 Don't apply -fno-builtin-memcmp on non-x86 platforms
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index dbc491354c5..63f2a1c6db7 100644 --- a/SConstruct +++ b/SConstruct @@ -3838,9 +3838,11 @@ def doConfigure(myenv): myenv = conf.Finish() - # We set this to work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 - if not myenv.ToolchainIs('msvc') and not 'builtin-memcmp' in selected_experimental_optimizations: - AddToCCFLAGSIfSupported(myenv, "-fno-builtin-memcmp") + # We set this with GCC on x86 platforms to work around + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 + if myenv.ToolchainIs('gcc') and (env['TARGET_ARCH'] in ['i386', 'x86_64']): + if not 'builtin-memcmp' in selected_experimental_optimizations: + AddToCCFLAGSIfSupported(myenv, '-fno-builtin-memcmp') # pthread_setname_np was added in GLIBC 2.12, and Solaris 11.3 if posix_system: |