From: "Michael R. Crusoe" <crusoe@debian.org>
Date: Sat, 1 Feb 2020 15:13:31 +0100
Subject: Increase portability by using SIMD Everywhere library

Forwarded: https://github.com/vgteam/vg/pull/2867
Assisted-By: scaleway/deepseek-v4-flash-0731
---
 Makefile          |  6 +-----
 src/preflight.cpp | 15 -------------
 src/preflight.hpp |  6 +-----
 3 files changed, 2 insertions(+), 25 deletions(-)

--- a/Makefile
+++ b/Makefile
@@ -789,10 +789,7 @@ $(LIB_DIR)/libstructures.a: $(STRUCTURES
 $(INC_DIR)/sha1.hpp: $(SHA1_DIR)/sha1.hpp
 	cp $(SHA1_DIR)/*.h* $(CWD)/$(INC_DIR)/
 
-$(INC_DIR)/simde/x86/sse4.1.h: $(DOZEU_DIR)/simde/*.h $(DOZEU_DIR)/simde/x86/*.h
-	cp -r $(DOZEU_DIR)/simde $(INC_DIR)
-
-$(INC_DIR)/dozeu/dozeu.h: $(DOZEU_DIR)/*.h $(INC_DIR)/simde/x86/sse4.1.h
+$(INC_DIR)/dozeu/dozeu.h: $(DOZEU_DIR)/*.h
 	mkdir -p $(CWD)/$(INC_DIR)/dozeu && cp $(DOZEU_DIR)/*.h $(CWD)/$(INC_DIR)/dozeu/
 
 $(OBJ_DIR)/sha1.o: $(SHA1_DIR)/sha1.cpp $(SHA1_DIR)/sha1.hpp
@@ -1037,7 +1034,6 @@ clean-vg:
 
 clean:
 	$(RM) -r $(UNITTEST_BIN_DIR)
-	$(RM) -r $(BIN_DIR)
 	$(RM) -r $(LIB_DIR)
 	$(RM) -r $(UNITTEST_SUPPORT_OBJ_DIR)
 	$(RM) -r $(UNITTEST_OBJ_DIR)
--- a/src/preflight.cpp
+++ b/src/preflight.cpp
@@ -30,21 +30,6 @@ void preflight_check() {
 
     bool arch_ok = true;
 
-#ifdef __x86_64__
-    // We assume we are on x86_64 on POSIX (and not Windows).
-    // We use the method of dlib's dlib/simd/simd_check.h
-
-    // Define a place to put the cpuid info
-    unsigned int cpuid_info[4];
-
-    // Call cpuid function 1 (which reports SSE4.2, and other stuff up to original AVX)
-    __cpuid(1, cpuid_info[0], cpuid_info[1], cpuid_info[2], cpuid_info[3]);
-
-    // Bit 20 of result 2 is the SSE 4.2 flag.
-    bool have_sse4_2 = cpuid_info[2] & (1 << 20);
-
-    arch_ok &= have_sse4_2;
-#endif
     // If not on x86_64, we are probably on ARM and using fake SSE anyway.
 
     if (!arch_ok) {
--- a/src/preflight.hpp
+++ b/src/preflight.hpp
@@ -11,12 +11,7 @@
 
 namespace vg {
 
-/// Define a macro to tell things to be built for every X86_64 architecture, if possible.
-#if defined(__x86_64__)
-    #define VG_PREFLIGHT_EVERYWHERE __attribute__((__target__("arch=x86-64")))
-#else
-    #define VG_PREFLIGHT_EVERYWHERE
-#endif
+#define VG_PREFLIGHT_EVERYWHERE
 
 /// Run a preflight check to make sure that the system is usable for this build of vg.
 /// Aborts with a helpful message if this is not the case.
