From 44ec4196fabd23b843bb821df8bb74271448f74e Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Tue, 30 Oct 2018 16:47:11 -0500 Subject: [PATCH] xfsprogs: remove retpoline support When it came up that xfsprogs was using retpolines by default, the gcc folks inside Red Hat expressed ... alarm. I'm not sure of all the details, but I think the concern was that userspace support for this is not really quite baked. Unless/until there is a demonstrated side-channel which would warrant retpolines here, let's just remove it for now. Cc: Florian Weimer Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- configure.ac | 1 - include/builddefs.in | 7 ------- m4/package_libcdev.m4 | 22 ---------------------- 3 files changed, 30 deletions(-) diff --git a/configure.ac b/configure.ac index c2834ab72..2448416ca 100644 --- a/configure.ac +++ b/configure.ac @@ -234,7 +234,6 @@ if test "$enable_lto" = "yes" && test "$have_lto" != "yes"; then AC_MSG_ERROR([LTO not supported by compiler.]) fi -AC_PACKAGE_CHECK_RETPOLINE AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([char *]) AC_TYPE_UMODE_T diff --git a/include/builddefs.in b/include/builddefs.in index defea2c33..c5b38b073 100644 --- a/include/builddefs.in +++ b/include/builddefs.in @@ -151,13 +151,6 @@ LIBICU_CFLAGS = @libicu_CFLAGS@ SANITIZER_CFLAGS += @addrsan_cflags@ @threadsan_cflags@ @ubsan_cflags@ SANITIZER_LDFLAGS += @addrsan_ldflags@ @threadsan_ldflags@ @ubsan_ldflags@ -# Enable retpolines if available -HAVE_RETPOLINE = @have_retpoline@ -ifeq ($(HAVE_RETPOLINE),yes) -OPTIMIZER += @retpoline_cflags@ -LOADERFLAGS += @retpoline_ldflags@ -endif - # Use special ar/ranlib wrappers if we have lto HAVE_LTO = @have_lto@ ifeq ($(HAVE_LTO),yes) diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index 268193d76..7ee4acdd5 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -429,25 +429,3 @@ AC_DEFUN([AC_PACKAGE_CHECK_LTO], AC_SUBST(lto_cflags) AC_SUBST(lto_ldflags) ]) - -AC_DEFUN([AC_PACKAGE_CHECK_RETPOLINE], - [ AC_MSG_CHECKING([if C compiler supports retpoline]) - OLD_CFLAGS="$CFLAGS" - OLD_LDFLAGS="$LDFLAGS" - RETPOLINE_FLAGS="-mindirect-branch=thunk" - CFLAGS="$CFLAGS $RETPOLINE_FLAGS" - LDFLAGS="$LDFLAGS $RETPOLINE_FLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_RESULT([yes])] - [retpoline_cflags=$RETPOLINE_FLAGS] - [retpoline_ldflags=$RETPOLINE_FLAGS], - [AC_MSG_RESULT([no])]) - if test -n "$retpoline_cflags"; then - have_retpoline=yes - fi - CFLAGS="${OLD_CFLAGS}" - LDFLAGS="${OLD_LDFLAGS}" - AC_SUBST(have_retpoline) - AC_SUBST(retpoline_cflags) - AC_SUBST(retpoline_ldflags) - ]) -- 2.39.2