summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@linux.intel.com>2018-11-30 13:10:54 -0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-01-11 16:59:29 +0000
commit1e3455aec7e2d57e97d4a3e2a7e291488d55dbb0 (patch)
tree8b70ce01f1445bdeee05c24ddc1ea92320654f52
parent48e555857f81b9dcfe1ccfe7a47adde40f1f2c00 (diff)
downloadphosphor-host-ipmid-1e3455aec7e2d57e97d4a3e2a7e291488d55dbb0.tar.gz
phosphor-host-ipmid-1e3455aec7e2d57e97d4a3e2a7e291488d55dbb0.zip
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>
-rw-r--r--Makefile.am32
-rw-r--r--user_channel/Makefile.am17
2 files changed, 24 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am
index 63718f9..48aa48f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,16 +26,19 @@ BUILT_SOURCES = \
CLEANFILES = $(BUILT_SOURCES)
-BOOST_CXX = \
+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
-ipmid_CXXFLAGS = \
- $(BOOST_CXX) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- -flto
+ipmid_CXXFLAGS = $(COMMON_CXX)
ipmid_LDFLAGS = \
$(SYSTEMD_LIBS) \
$(libmapper_LIBS) \
@@ -103,13 +106,7 @@ libipmi20_la_LDFLAGS = \
$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
-lstdc++fs \
-version-info 0:0:0 -shared
-libipmi20_la_CXXFLAGS = \
- $(SYSTEMD_CFLAGS) \
- $(libmapper_CFLAGS) \
- $(BOOST_CXX) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- -flto
+libipmi20_la_CXXFLAGS = $(COMMON_CXX)
providers_LTLIBRARIES += libusercmds.la
libusercmds_la_LIBADD = user_channel/libuserlayer.la
@@ -135,14 +132,7 @@ libsysintfcmds_la_LDFLAGS = \
$(PHOSPHOR_LOGGING_LIBS) \
$(SDBUSPLUS_LIBS) \
-version-info 0:0:0 -shared
-libsysintfcmds_la_CXXFLAGS = \
- $(SYSTEMD_CFLAGS) \
- $(BOOST_CXX) \
- $(libmapper_CFLAGS) \
- $(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
- $(SDBUSPLUS_CFLAGS) \
- -flto
+libsysintfcmds_la_CXXFLAGS = $(COMMON_CXX)
nobase_include_HEADERS = \
host-ipmid/iana.hpp \
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 @@ libuserlayer_la_LDFLAGS = \
-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)
OpenPOWER on IntegriCloud