summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVernon Mauery <vernon.mauery@intel.com>2018-08-01 09:16:56 -0700
committerVernon Mauery <vernon.mauery@linux.intel.com>2018-08-08 17:09:05 +0000
commit28565ac3f2585b4088025833405789645e1b774f (patch)
treec59f2e108f8e655345c102a51ec40b118cd8c5f0
parent0248484614a9588056916ebdaeb2b4a6b0cb9c76 (diff)
downloadphosphor-host-ipmid-28565ac3f2585b4088025833405789645e1b774f.tar.gz
phosphor-host-ipmid-28565ac3f2585b4088025833405789645e1b774f.zip
Add flags to Makefile.am to build as c++17 and header-only boost
As the project moves forward, we are updating it to use c++17 and some of the features that it offers, as well as some more boost bits. This patch makes sure that all the boost libraries are header only, adds in c++17, and makes sure that the libraries required are linked properly. Change-Id: I9a25ec971e4bf05c2c3b73e20938cf337e06077c Signed-off-by: Vernon Mauery <vernon.mauery@intel.com>
-rw-r--r--Makefile.am11
-rw-r--r--configure.ac2
2 files changed, 10 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 2846989..7912a11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,8 +25,12 @@ BUILT_SOURCES = \
CLEANFILES = $(BUILT_SOURCES)
+BOOST_CXX = -DBOOST_ERROR_CODE_HEADER_ONLY \
+ -DBOOST_SYSTEM_NO_DEPRECATED \
+ -DBOOST_ALL_NO_LIB
#TODO - Make this path a configure option (bitbake parameter)
-ipmid_CPPFLAGS = -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" \
+ipmid_CXXFLAGS = -DHOST_IPMI_LIB_PATH=\"/usr/lib/host-ipmid/\" \
+ $(BOOST_CXX) \
$(PHOSPHOR_LOGGING_CFLAGS) \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
ipmid_LDFLAGS = \
@@ -35,6 +39,8 @@ ipmid_LDFLAGS = \
$(LIBADD_DLOPEN) \
$(PHOSPHOR_LOGGING_LIBS) \
$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
+ -lstdc++fs \
+ -pthread \
-export-dynamic
# TODO: Rather than use -export-dynamic, we should use -export-symbol to have a
@@ -90,7 +96,7 @@ libipmi20_la_LDFLAGS = $(SYSTEMD_LIBS) $(libmapper_LIBS) \
$(PHOSPHOR_LOGGING_LIBS) $(PHOSPHOR_DBUS_INTERFACES_LIBS) -lstdc++fs \
-version-info 0:0:0 -shared
libipmi20_la_CXXFLAGS = $(SYSTEMD_CFLAGS) $(libmapper_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(BOOST_CXX) $(PHOSPHOR_LOGGING_CFLAGS) \
$(PHOSPHOR_DBUS_INTERFACES_CFLAGS)
libsysintfcmdsdir = ${libdir}/ipmid-providers
@@ -105,6 +111,7 @@ libsysintfcmds_la_LDFLAGS = $(SYSTEMD_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) \
diff --git a/configure.ac b/configure.ac
index 918aef7..73d63f6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,7 +40,7 @@ AS_IF([test "x$enable_softoff" != "xno"],
)
# Checks for typedefs, structures, and compiler characteristics.
-AX_CXX_COMPILE_STDCXX_14([noext])
+AX_CXX_COMPILE_STDCXX_17([noext])
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
OpenPOWER on IntegriCloud