Discussion:
[sysvinit-devel] [PATCH] Split default C flags in src/Makefile
Matias Fonzo
2018-06-20 21:45:11 UTC
Permalink
From 54e07d6ebd493aef5c5b073e790dfdc91a1f4e49 Mon Sep 17 00:00:00 2001
From: Matias Fonzo <***@dragora.org>
Date: Wed, 20 Jun 2018 18:37:34 -0300
Subject: [PATCH] Split default C flags in src/Makefile

This will allow to pass customized compilation flags for the
optimization level while keeping the flags used by default.
---
src/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 34d74df..2e305db 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,8 +9,10 @@
#

CPPFLAGS =
-CFLAGS ?= -ansi -O2 -fomit-frame-pointer
-fstack-protector-strong -override CFLAGS += -W -Wall
-Wunreachable-code -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2
-D_XOPEN_SOURCE -D_GNU_SOURCE +CFLAGS ?= -O2 +override CFLAGS +=
-ansi -fomit-frame-pointer -fstack-protector-strong \
+ -W -Wall -Wunreachable-code -Wformat
-Werror=format-security \
+ -D_FORTIFY_SOURCE=2 -D_XOPEN_SOURCE -D_GNU_SOURCE
override CFLAGS += $(shell getconf LFS_CFLAGS)
STATIC =
MANDB := s@^\('\\\\\"\)[^\*-]*-\*- coding: [^[:blank:]]\+
-\*-@\1@
--
2.14.2
Jesse Smith
2018-06-21 22:36:45 UTC
Permalink
Post by Matias Fonzo
This will allow to pass customized compilation flags for the
optimization level while keeping the flags used by default.
Looks good to me and confirmed it works here. I've applied this patch to
our development branch.

- Jesse
Matias Fonzo
2018-06-21 23:16:15 UTC
Permalink
On Thu, 21 Jun 2018 19:36:45 -0300
Post by Jesse Smith
Post by Matias Fonzo
This will allow to pass customized compilation flags for the
optimization level while keeping the flags used by default.
Looks good to me and confirmed it works here. I've applied this patch
to our development branch.
Nice! there is a minor typo on the commit message:

"varible"

(try `git amend')
Jesse Smith
2018-06-21 23:24:01 UTC
Permalink
Post by Matias Fonzo
"varible"
(try `git amend')
That was not one of my finer moments. Will have the changelog fixed in a
moment.

Loading...