ipmid: use a common set of CXX flags across ipmid and provider libraries

This standardizes the set of CXX flags used to compile. This makes the
file easier to read and ensures that all the libraries are all compiled
with the same options as the executable.

This also adds -Wno-psabi, which reduces the number of "Note:" messages
when cross-compiling some STL stuff for ARM. See
https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project
for details. Basically, gcc 6 and gcc 7 are not ABI compatible, but
since the whole openbmc project uses the same compiler, we can safely
ignore the informational notes.

Change-Id: Idc343245404d0b471b7bec4462ac36c9477a7361
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/user_channel/Makefile.am b/user_channel/Makefile.am
index 58a652f..b9b6ad9 100644
--- a/user_channel/Makefile.am
+++ b/user_channel/Makefile.am
@@ -1,3 +1,15 @@
+COMMON_CXX = \
+	-flto \
+	-Wno-psabi \
+	$(SYSTEMD_CFLAGS) \
+	$(libmapper_CFLAGS) \
+	$(SDBUSPLUS_CFLAGS) \
+	$(PHOSPHOR_LOGGING_CFLAGS) \
+	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
+	-DBOOST_ERROR_CODE_HEADER_ONLY \
+	-DBOOST_SYSTEM_NO_DEPRECATED \
+	-DBOOST_ALL_NO_LIB
+
 lib_LTLIBRARIES = libuserlayer.la
 libuserlayer_la_SOURCES = \
 	user_layer.cpp \
@@ -15,7 +27,4 @@
 	-version-info 0:0:0 -shared
 libuserlayer_la_CXXFLAGS = \
 	-I$(top_srcdir) \
-	$(SYSTEMD_CFLAGS) \
-	$(libmapper_CFLAGS) \
-	$(PHOSPHOR_LOGGING_CFLAGS) \
-	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
+	$(COMMON_CXX)