mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 22:35:35 +00:00
parser: fix LTO build
The previous fix for LTO builds inb6d3daa7
did not take into consideration that LTO support could be added through CFLAGS,in which case the fix would not be applied. This patch applied the fix -flto-partition=none even if CFLAGS is already defined. Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com> Closes #214 MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/901 Acked-by: John Johansen <john@jjmx.net> Merged-by: Georgia Garcia <georgia.garcia@canonical.com> (cherry picked from commit0afc2cbb84
)
This commit is contained in:
@@ -60,7 +60,7 @@ WARNINGS = -Wall
|
||||
CXX_WARNINGS = ${WARNINGS} ${EXTRA_WARNINGS}
|
||||
CPP_WARNINGS =
|
||||
ifndef CFLAGS
|
||||
CFLAGS = -g -O2 -pipe -flto-partition=none
|
||||
CFLAGS = -g -O2 -pipe
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -pg -D DEBUG
|
||||
@@ -70,6 +70,8 @@ CFLAGS = -g -pg -fprofile-arcs -ftest-coverage
|
||||
endif
|
||||
endif #CFLAGS
|
||||
|
||||
CFLAGS += -flto-partition=none
|
||||
|
||||
EXTRA_CXXFLAGS = ${CFLAGS} ${CPPFLAGS} ${CXX_WARNINGS} -std=gnu++0x
|
||||
EXTRA_CFLAGS = ${EXTRA_CXXFLAGS} ${CPP_WARNINGS}
|
||||
|
||||
|
Reference in New Issue
Block a user