From 66f573e86d7e7160296026e8a64c2032b27d303e Mon Sep 17 00:00:00 2001 From: Andrei Tatar Date: Mon, 17 Jul 2023 13:55:23 +0200 Subject: [PATCH] build: Remove CPU feature config options This change removes the Kconfig options selecting CPU feature set (i.e., `-march=` compiler flag) from the configuration of this library. CPU feature flags are set elsewhere in the build configuration and the intrinsics library can already seamlessly pick up these features via preprocessor defines. Signed-off-by: Andrei Tatar Reviewed-by: Maria Sfiraiala Reviewed-by: Radu Nichita Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #3 --- Config.uk | 26 ++------------------------ Makefile.uk | 27 +++------------------------ 2 files changed, 5 insertions(+), 48 deletions(-) diff --git a/Config.uk b/Config.uk index 413b137..7afb70a 100644 --- a/Config.uk +++ b/Config.uk @@ -1,25 +1,3 @@ -menuconfig LIBINTEL_INTRINSICS - bool "Intel Intrinsics - C style functions that provide access Intel instructions" +config LIBINTEL_INTRINSICS + bool "Intel Intrinsics - C style functions that provide access to x86 instructions" default n - -if LIBINTEL_INTRINSICS -config SIMD_SSE - bool "Enable SSE support" - default n - -config SIMD_SSE2 - bool "Enable SSE2 support" - default n - -config SIMD_SSE3 - bool "Enable SSE3 support" - default n - -config SIMD_SSE4 - bool "Enable SSE4 support" - default n - -config SIMD_AVX - bool "Enable AVX support" - default n -endif diff --git a/Makefile.uk b/Makefile.uk index 722ea13..0131610 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -1,8 +1,10 @@ # libintel_intrinsics Makefile.uk # # Authors: Vlad-Andrei Badoiu +# Andrei Tatar # # Copyright (c) 2019, University Politehnica of Bucharest. All rights reserved. +# Copyright (c) 2023, Unikraft GmbH and The Unikraft Authors. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -38,30 +40,7 @@ $(eval $(call addlib_s,libintel_intrinsics,$(CONFIG_LIBINTEL_INTRINSICS))) ################################################################################ # Library includes ################################################################################ +ifeq ($(CONFIG_LIBINTEL_INTRINSICS),y) CINCLUDES-$(CONFIG_LIBINTEL_INTRINSICS) += -I$(LIBINTEL_INTRINSICS_BASE)/include CXXINCLUDES-$(CONFIG_LIBINTEL_INTRINSICS) += -I$(LIBINTEL_INTRINSICS_BASE)/include - -ifdef CONFIG_SIMD_SSE -CFLAGS += -msse -mfpmath=sse -CXXFLAGS += -msse -mfpmath=sse -endif - -ifdef CONFIG_SIMD_SSE2 -CFLAGS += -msse2 -CXXFLAGS += -msse2 -endif - -ifdef CONFIG_SIMD_SSE3 -CFLAGS += -msse3 -CXXFLAGS += -msse3 -endif - -ifdef CONFIG_SIMD_SSE4 -CFLAGS += -msse4 -CXXFLAGS += -msse4 -endif - -ifdef CONFIG_SIMD_AVX -CFLAGS += -mavx -CXXFLAGS += -mavx endif -- 2.39.5