From 5f6d86d216fd25a5086750465e73ed5579a86d18 Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Thu, 21 Jun 2018 19:34:25 -0300 Subject: [PATCH] Adjusted order of compile flags to make it possible to select optimization level by setting CFLAGS at compile file. --- doc/Changelog | 8 ++++++++ src/Makefile | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index a60d01e..421cc3a 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,11 @@ +sysvinit (2.91) UNRELEASED; urgency=low + + [ Jesse Smith ] + + * Adjusted order of compile flags to make it easier for downstream + to adjust optimization level. Patch provided by Matias Fonzo. + Can now set optimization level in CFLAGS varible. + sysvinit (2.90) world; urgency=low [ Jesse Smith ] diff --git a/src/Makefile b/src/Makefile index 34d74df..dbcf3e4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -9,8 +9,8 @@ # 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@