Skip to content

Commit

Permalink
Remove Intel compiler support
Browse files Browse the repository at this point in the history
include/linux/compiler-intel.h had no update in the past 3 years.

We often forget about the third C compiler to build the kernel.

For example, commit a0a12c3 ("asm goto: eradicate CC_HAS_ASM_GOTO")
only mentioned GCC and Clang.

init/Kconfig defines CC_IS_GCC and CC_IS_CLANG but not CC_IS_ICC,
and nobody has reported any issue.

I guess the Intel Compiler support is broken, and nobody is caring
about it.

Harald Arnesen pointed out ICC (classic Intel C/C++ compiler) is
deprecated:

    $ icc -v
    icc: remark #10441: The Intel(R) C++ Compiler Classic (ICC) is
    deprecated and will be removed from product release in the second half
    of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recommended
    compiler moving forward. Please transition to use this compiler. Use
    '-diag-disable=10441' to disable this message.
    icc version 2021.7.0 (gcc version 12.1.0 compatibility)

Arnd Bergmann provided a link to the article, "Intel C/C++ compilers
complete adoption of LLVM".

lib/zstd/common/compiler.h and lib/zstd/compress/zstd_fast.c were kept
untouched for better sync with https://github.com/facebook/zstd

Link: https://www.intel.com/content/www/us/en/developer/articles/technical/adoption-of-llvm-complete-icx.html
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Masahiro Yamada authored and Linus Torvalds committed Mar 5, 2023
1 parent b01fe98 commit 95207db
Show file tree
Hide file tree
Showing 11 changed files with 5 additions and 287 deletions.
6 changes: 1 addition & 5 deletions arch/ia64/include/uapi/asm/cmpxchg.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@
#include <linux/types.h>
/* include compiler specific intrinsics */
#include <asm/ia64regs.h>
#ifdef __INTEL_COMPILER
# include <asm/intel_intrin.h>
#else
# include <asm/gcc_intrin.h>
#endif
#include <asm/gcc_intrin.h>

/*
* This function doesn't exist, so you'll get a linker error if
Expand Down
162 changes: 0 additions & 162 deletions arch/ia64/include/uapi/asm/intel_intrin.h

This file was deleted.

6 changes: 1 addition & 5 deletions arch/ia64/include/uapi/asm/intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
#include <linux/types.h>
/* include compiler specific intrinsics */
#include <asm/ia64regs.h>
#ifdef __INTEL_COMPILER
# include <asm/intel_intrin.h>
#else
# include <asm/gcc_intrin.h>
#endif
#include <asm/gcc_intrin.h>
#include <asm/cmpxchg.h>

#define ia64_set_rr0_to_rr4(val0, val1, val2, val3, val4) \
Expand Down
5 changes: 1 addition & 4 deletions include/acpi/platform/acenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,12 @@
*
*****************************************************************************/

#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#if defined(__GNUC__)
#include <acpi/platform/acgcc.h>

#elif defined(_MSC_VER)
#include "acmsvc.h"

#elif defined(__INTEL_COMPILER)
#include <acpi/platform/acintel.h>

#endif

#if defined(_LINUX) || defined(__linux__)
Expand Down
2 changes: 1 addition & 1 deletion include/acpi/platform/acenvex.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

#endif

#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#if defined(__GNUC__)
#include "acgccex.h"

#elif defined(_MSC_VER)
Expand Down
55 changes: 0 additions & 55 deletions include/acpi/platform/acintel.h

This file was deleted.

34 changes: 0 additions & 34 deletions include/linux/compiler-intel.h

This file was deleted.

14 changes: 1 addition & 13 deletions include/linux/compiler_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,10 @@
* compiler should see some alignment anyway, when the return value is
* massaged by 'flags = ptr & 3; ptr &= ~3;').
*
* Optional: not supported by icc
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-assume_005faligned-function-attribute
* clang: https://clang.llvm.org/docs/AttributeReference.html#assume-aligned
*/
#if __has_attribute(__assume_aligned__)
# define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__)))
#else
# define __assume_aligned(a, ...)
#endif
#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__)))

/*
* Note the long name.
Expand All @@ -85,7 +79,6 @@
/*
* Optional: only supported since gcc >= 9
* Optional: not supported by clang
* Optional: not supported by icc
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-copy-function-attribute
*/
Expand All @@ -98,7 +91,6 @@
/*
* Optional: not supported by gcc
* Optional: only supported since clang >= 14.0
* Optional: not supported by icc
*
* clang: https://clang.llvm.org/docs/AttributeReference.html#diagnose_as_builtin
*/
Expand All @@ -122,7 +114,6 @@

/*
* Optional: not supported by clang
* Optional: not supported by icc
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-designated_005finit-type-attribute
*/
Expand Down Expand Up @@ -236,7 +227,6 @@
/*
* Optional: only supported since gcc >= 8
* Optional: not supported by clang
* Optional: not supported by icc
*
* gcc: https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-nonstring-variable-attribute
*/
Expand Down Expand Up @@ -267,7 +257,6 @@

/*
* Optional: not supported by gcc.
* Optional: not supported by icc.
*
* clang: https://clang.llvm.org/docs/AttributeReference.html#overloadable
*/
Expand All @@ -287,7 +276,6 @@
* Note: the "type" argument should match any __builtin_object_size(p, type) usage.
*
* Optional: not supported by gcc.
* Optional: not supported by icc.
*
* clang: https://clang.llvm.org/docs/AttributeReference.html#pass-object-size-pass-dynamic-object-size
*/
Expand Down
2 changes: 0 additions & 2 deletions include/linux/compiler_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
/* Compiler specific macros. */
#ifdef __clang__
#include <linux/compiler-clang.h>
#elif defined(__INTEL_COMPILER)
#include <linux/compiler-intel.h>
#elif defined(__GNUC__)
/* The above compilers also define __GNUC__, so order is important here. */
#include <linux/compiler-gcc.h>
Expand Down
2 changes: 0 additions & 2 deletions scripts/cc-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ get_c_compiler_info()
cat <<- EOF | "$@" -E -P -x c - 2>/dev/null
#if defined(__clang__)
Clang __clang_major__ __clang_minor__ __clang_patchlevel__
#elif defined(__INTEL_COMPILER)
ICC __INTEL_COMPILER __INTEL_COMPILER_UPDATE
#elif defined(__GNUC__)
GCC __GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__
#else
Expand Down
Loading

0 comments on commit 95207db

Please sign in to comment.