Skip to content

Commit

Permalink
Silence -Wpsabi warning on ARM for drcachesim. (#3034)
Browse files Browse the repository at this point in the history
GCC 6+ has a warning for an ABI change due to a bug introduced in GCC 5:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728.

As we are building all of drcachesim and not linking to other C++ code, we
can just ignore it.
  • Loading branch information
fhahn committed Jun 18, 2018
1 parent 6c6fd48 commit b787312
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion clients/drcachesim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.

cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.2)

include(../../make/policies.cmake NO_POLICY_SCOPE)

Expand All @@ -42,6 +42,17 @@ else ()
add_definitions(-DUNIX)
endif ()

# GCC 6+ has a warning for an ABI change due to a bug introduced in GCC 5:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728. As we are building all of
# drcachesim and not linking to other C++ code, we can just ignore it.
if (ARM AND CMAKE_COMPILER_IS_GNUCC)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-Wno-psabi GCC_HAS_NO_PSABI)
if (GCC_HAS_NO_PSABI)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
endif (GCC_HAS_NO_PSABI)
endif ()

# i#2277: we use zlib if available to read compressed trace files.
# XXX: we could ship with a zlib for Windows: today we simply don't support
# compressed traces on Windows.
Expand Down

0 comments on commit b787312

Please sign in to comment.