Skip to content

Commit

Permalink
Move -flto to CFLAGS
Browse files Browse the repository at this point in the history
LTO is an optimization that is not always desired. This allows it to be
easily disabled.
  • Loading branch information
floppym authored and vathpela committed Sep 13, 2016
1 parent e8299c8 commit 5a3a52e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CROSS_COMPILE ?=
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
CC := $(if $(filter default,$(origin CC)),$(CROSS_COMPILE)gcc,$(CC))
CCLD := $(if $(filter undefined,$(origin CCLD)),$(CC),$(CCLD))
OPTIMIZE ?= -O2
OPTIMIZE ?= -O2 -flto
CFLAGS ?= $(OPTIMIZE) -g3
CFLAGS := $(CFLAGS)
LDFLAGS ?=
Expand Down
2 changes: 1 addition & 1 deletion gcc.specs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
+ %(efivar_cpp_options)

*cc1_options:
+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -flto -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
+ %(efivar_cpp_options) -Wmaybe-uninitialized -fno-merge-constants -fvisibility=hidden %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}

*self_spec:
+ %{!shared:%{!static:%{!r:-pie}}} %{static:-Wl,-no-fatal-warnings -Wl,-static -static -Wl,-z,relro,-z,now}
Expand Down

0 comments on commit 5a3a52e

Please sign in to comment.