mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-16 04:35:13 +03:00
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
Description: Modify compile flags handling in Makefile for Debian packaging
|
|
This is to allow CFLAGS set by dpkg-buildflags from the environment
|
|
so that hardening flags and DEB_BUILD_OPTIONS=noopt would work.
|
|
.
|
|
Also disable -march=native which causes FTBFS on many platforms
|
|
and is inappropriate for a Debian package. See a similar bug
|
|
https://bugs.debian.org/761912 for an explanation.
|
|
(Note: Upstream commented out "CFLAGS += -march=native" in commit
|
|
0ead90d5d9ab861acd40a05490ed8e7936ac1fa5 on 2019-11-12.)
|
|
Author: Anthony Fok <foka@debian.org>
|
|
Origin: vendor
|
|
Bug-Debian: https://bugs.debian.org/801108
|
|
Forwarded: not-needed
|
|
Last-Update: 2016-12-30, 2020-02-12, 2020-11-05
|
|
---
|
|
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -32,6 +32,7 @@
|
|
FLEX ?= flex
|
|
A2X ?= a2x
|
|
|
|
+ENV_CFLAGS := $(CFLAGS)
|
|
GCC_WARNINGS1=-Wall -Wpointer-arith -Wstrict-prototypes
|
|
GCC_WARNINGS2=-Wmissing-prototypes -Wmissing-declarations
|
|
GCC_WARNINGS3=-Wno-unused-function -Wno-unused-label -Wno-format-zero-length
|
|
@@ -86,7 +87,7 @@
|
|
CFLAGS += -g
|
|
# Test coverage flags
|
|
# CFLAGS += -ftest-coverage -fprofile-arcs
|
|
-CFLAGS += $(EXTRA_CFLAGS)
|
|
+CFLAGS += $(EXTRA_CFLAGS) $(ENV_CFLAGS)
|
|
|
|
#YFLAGS= --report=all
|
|
LFLAGS=
|