Skip to content

Commit

Permalink
Drop ABSL_RANDOM_HWAES_FLAGS compiler flags
Browse files Browse the repository at this point in the history
Older CPUs that do not have SSE4.1 would crash with the Ruby native gem
due to an illegal instruction exception.

The Abseil random library isn't being used at the moment
(#26476), and there's no reason gRPC
needs to force SSE4.1 instructions on all platforms at the moment. There
are other hardware-specific issues that need to be ironed out for this
to work: #26479

When the `-msse4` compiler flag was enabled, the Abseil code started
using the `pinsrb` instruction:

```
$ elfx86exts abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.o
MODE64 (ret)
CMOV (cmovne)
SSE2 (movdqa)
SSE41 (pinsrb)
SSE1 (movaps)
CPU Generation: Penryn
```

Closes #27095
  • Loading branch information
stanhu committed Aug 25, 2021
1 parent 6a06f0c commit 3b7cc74
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
15 changes: 1 addition & 14 deletions Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build_handwritten.yaml
Expand Up @@ -165,7 +165,7 @@ configs:
UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt
defaults:
abseil:
CPPFLAGS: -g $(ABSL_RANDOM_HWAES_FLAGS) -Ithird_party/abseil-cpp
CPPFLAGS: -Ithird_party/abseil-cpp
ares:
CFLAGS: -g
CPPFLAGS: -Ithird_party/cares -Ithird_party/cares/cares -fvisibility=hidden -D_GNU_SOURCE
Expand Down
13 changes: 0 additions & 13 deletions templates/Makefile.template
Expand Up @@ -74,14 +74,6 @@
SYSTEM = MINGW32
endif

# Basic machine detection
HOST_MACHINE = $(shell uname -m)
ifeq ($(HOST_MACHINE),x86_64)
HOST_IS_X86_64 = true
else
HOST_IS_X86_64 = false
endif

MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
ifndef BUILDDIR
BUILDDIR_ABSOLUTE = $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
Expand Down Expand Up @@ -441,11 +433,6 @@

GRPC_ABSEIL_DEP = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a
GRPC_ABSEIL_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a
ifeq ($(HOST_IS_X86_64),true)
ABSL_RANDOM_HWAES_FLAGS = -maes -msse4
else
ABSL_RANDOM_HWAES_FLAGS =
endif

# Setup re2 dependency

Expand Down

0 comments on commit 3b7cc74

Please sign in to comment.