b) build problems on non-amd64
Your approach is removing the SSE flags it might have detected for some ARM 
hosts. But to be fair, I checked on my pi4 and pi5 here, and none would have 
those flags found.

Anyway, I tried to fix the original code, and came up with the below
instead, what do you think? This would preserve the SSE flags it might
have found on ARM:

--- a/Loopino/Makefile
+++ b/Loopino/Makefile
@@ -6,12 +6,12 @@
 
 # get flags supported by CPU
 ifeq ($(UNAME_S), FreeBSD)
-  CPU_INFO = dmesg | grep Features | tr A-Z a-z
+  CPU_INFO = $(shell dmesg | grep Features | tr A-Z a-z)
   ifeq ($(UNAME_M), amd64)
     UNAME_M = x86_64
   endif
 else
-  CPU_INFO = cat /proc/cpuinfo | grep flags
+  CPU_INFO = $(shell cat /proc/cpuinfo | grep flags)
 endif
 
 ifeq ($(MAKECMDGOALS),debug)
@@ -30,17 +30,17 @@
 endif
 
        # check CPU and supported optimization flags
-       ifneq ($$(filter $(CPU_INFO) | grep sse3 ) , )
+    ifneq (, $(findstring sse3, $(CPU_INFO)))
                SSE_CFLAGS = -msse3 -mfpmath=sse
-       else ifneq ($$(filter $(CPU_INFO) | grep sse2 ) , )
+       else ifneq (, $(findstring sse2, $(CPU_INFO)))
                SSE_CFLAGS = -msse2 -mfpmath=sse
-       else ifneq ($$(filter $(CPU_INFO) | grep sse ) , )
+       else ifneq (, $(findstring sse, $(CPU_INFO)))
                SSE_CFLAGS = -msse -mfpmath=sse
-       else ifneq ($$(filter $(CPU_INFO) | grep ARM ) , )
-               ifneq ($$$(filter $(CPU_INFO)  | grep ARMv7 ) , )
-                       ifneq ($$(filter $(CPU_INFO) | grep vfpd32 ) , )
+       else ifneq (, $(findstring ARM, $(CPU_INFO)))
+               ifneq (,$(findstring ARMv7, $(CPU_INFO)))
+                       ifneq (,$(findstring vfpd32, $(CPU_INFO)))
                                SSE_CFLAGS = -march=armv7-a -mfpu=vfpv3
-                       else ifneq ($$(filter $(CPU_INFO) | grep vfpv3 ) , )
+                       else ifneq (,$(findstring vfpv3, $(CPU_INFO)))
                                SSE_CFLAGS = -march=armv7-a -mfpu=vfpv3
                        endif
                else

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2137383

Title:
  Packaged: loopino

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2137383/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to