summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/codecs/codecs.make7
-rw-r--r--lib/rbcodec/codecs/lib/libcodec.make5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/codecs.make b/lib/rbcodec/codecs/codecs.make
index 27ba73ab3c..83dc784ee3 100644
--- a/lib/rbcodec/codecs/codecs.make
+++ b/lib/rbcodec/codecs/codecs.make
@@ -33,6 +33,13 @@ else
33endif 33endif
34CODECLDFLAGS += $(GLOBAL_LDOPTS) 34CODECLDFLAGS += $(GLOBAL_LDOPTS)
35 35
36ifdef USE_LTO
37 CODECLDFLAGS += -flto -fno-builtin -ffreestanding
38 CODECFLAGS += -flto -fno-builtin -ffreestanding
39 CODECLDFLAGS += -e __header
40endif
41
42
36# the codec libraries 43# the codec libraries
37include $(RBCODECLIB_DIR)/codecs/demac/libdemac.make 44include $(RBCODECLIB_DIR)/codecs/demac/libdemac.make
38include $(RBCODECLIB_DIR)/codecs/liba52/liba52.make 45include $(RBCODECLIB_DIR)/codecs/liba52/liba52.make
diff --git a/lib/rbcodec/codecs/lib/libcodec.make b/lib/rbcodec/codecs/lib/libcodec.make
index 0788dd6705..b197464528 100644
--- a/lib/rbcodec/codecs/lib/libcodec.make
+++ b/lib/rbcodec/codecs/lib/libcodec.make
@@ -23,6 +23,11 @@ ifneq ($(findstring sdl-sim, $(APP_TYPE)), sdl-sim)
23 CODECLIBFLAGS += -ffunction-sections 23 CODECLIBFLAGS += -ffunction-sections
24endif 24endif
25 25
26ifdef USE_LTO
27# We do NOT want LTO on the GCC support file
28$(CODECDIR)/lib/codeclib.o: CODECLIBFLAGS += -fno-lto
29endif
30
26$(CODECDIR)/lib/%.o: $(RBCODECLIB_DIR)/codecs/lib/%.c 31$(CODECDIR)/lib/%.o: $(RBCODECLIB_DIR)/codecs/lib/%.c
27 $(SILENT)mkdir -p $(dir $@) 32 $(SILENT)mkdir -p $(dir $@)
28 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \ 33 $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) \