Stop setting -march on arm
authorAdrian Bunk <bunk@debian.org>
Wed, 9 Feb 2022 04:21:59 +0000 (06:21 +0200)
committerVictor Seva <vseva@debian.org>
Thu, 13 Jun 2024 15:30:17 +0000 (17:30 +0200)
This broke the Debian armhf build due to the Debian gcc maintainer
changing the semantics of -march to disable FPU support unless +fp
is included.

Gbp-Pq: Name 0001-Stop-setting-march-on-arm.patch

src/Makefile.defs

index 77c37c1c1b88ef366ab5942c565e86ce8d94eca2..459fc7e2fa2941577d4bf7ba21ec71130e513b10 100644 (file)
@@ -1251,7 +1251,7 @@ ifeq      ($(ARCH), arm)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS+=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
+                               CFLAGS+=-marm $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE)
                        #if gcc 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
                                        CFLAGS+= -ftree-vectorize -fno-strict-overflow
@@ -1299,7 +1299,7 @@ ifeq      ($(ARCH), arm6)
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
                                #common stuff
-                               CFLAGS+=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \
+                               CFLAGS+=-$(CC_OPT) -funroll-loops -fsigned-char \
                                                $(PROFILE)
                        #if gcc 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))
@@ -1345,8 +1345,8 @@ ifeq      ($(ARCH), arm7)
                # if gcc
 ifeq           ($(CC_NAME), gcc)
                                C_DEFS+=-DCC_GCC_LIKE_ASM
-                               #common stuff, use armv7-a as lowest common architecture
-                               CFLAGS+=-march=armv7-a $(CC_OPT) -funroll-loops -fsigned-char \
+                               #common stuff
+                               CFLAGS+=-$(CC_OPT) -funroll-loops -fsigned-char \
                                                $(PROFILE)
                        #if gcc 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+
 ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER))))