summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2018-08-27 10:52:23 -0700
committerAndrew Geissler <geissonator@yahoo.com>2018-08-27 10:52:23 -0700
commitecd4bc7bf240b7d30ece98e74f7056b2cab1f38b (patch)
tree9aed650d07ecefa0653ba895ae3100a64c522fe3
parent86be476bfb6acfd413afff449a357123639eb29e (diff)
downloadphosphor-fan-presence-ecd4bc7bf240b7d30ece98e74f7056b2cab1f38b.zip
phosphor-fan-presence-ecd4bc7bf240b7d30ece98e74f7056b2cab1f38b.tar.gz
Add -flto to CXXFLAGS
Per openbmc/openbmc#3364, adding -flto to CXX flags in order to reduce overall library and binary sizes. Ref: https://gcc.gnu.org/wiki/LinkTimeOptimization Change-Id: I3ee31a15fc0ded4308aa9d00a11b41bc62eb9799 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
-rw-r--r--Makefile.am2
-rw-r--r--control/Makefile.am3
-rw-r--r--cooling-type/Makefile.am3
-rw-r--r--monitor/Makefile.am3
-rw-r--r--presence/Makefile.am3
5 files changed, 9 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 0b824b7..87c2fb8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ libfan_la_LDFLAGS = -static
libfan_la_LIBADD = \
$(SDBUSPLUS_LIBS)
libfan_la_CXXFLAGS =
- $(SDBUSPLUS_CFLAGS)
+ $(SDBUSPLUS_CFLAGS) -flto
libfan_la_SOURCES = \
utility.cpp \
timer.cpp
diff --git a/control/Makefile.am b/control/Makefile.am
index 09fb1a2..01ee9c9 100644
--- a/control/Makefile.am
+++ b/control/Makefile.am
@@ -24,7 +24,8 @@ phosphor_fan_control_LDADD = \
phosphor_fan_control_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
- ${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
+ ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
+ -flto
BUILT_SOURCES = fan_zone_defs.cpp
diff --git a/cooling-type/Makefile.am b/cooling-type/Makefile.am
index 869d463..68d6c2f 100644
--- a/cooling-type/Makefile.am
+++ b/cooling-type/Makefile.am
@@ -13,7 +13,8 @@ phosphor_cooling_type_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
$(LIBEVDEV_CFLAGS) \
- ${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
+ ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
+ -flto
phosphor_cooling_type_LDADD = \
${top_builddir}/libfan.la \
diff --git a/monitor/Makefile.am b/monitor/Makefile.am
index bea0933..cb9b8a4 100644
--- a/monitor/Makefile.am
+++ b/monitor/Makefile.am
@@ -26,7 +26,8 @@ phosphor_fan_monitor_LDADD = \
phosphor_fan_monitor_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
- ${PHOSPHOR_DBUS_INTERFACES_CFLAGS}
+ ${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
+ -flto
fan_monitor_defs.cpp: ${srcdir}/gen-fan-monitor-defs.py
$(AM_V_GEN)$(GEN_FAN_MONITOR_DEFS)
diff --git a/presence/Makefile.am b/presence/Makefile.am
index b51563d..eb4dd6c 100644
--- a/presence/Makefile.am
+++ b/presence/Makefile.am
@@ -23,7 +23,8 @@ phosphor_fan_presence_tach_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
${PHOSPHOR_DBUS_INTERFACES_CFLAGS} \
- $(LIBEVDEV_CFLAGS)
+ $(LIBEVDEV_CFLAGS) \
+ -flto
BUILT_SOURCES = generated.hpp
TEMPLATES = \
OpenPOWER on IntegriCloud