Skip to content

Commit

Permalink
-march not supported on ppc64le. Use -mcpu instead
Browse files Browse the repository at this point in the history
  • Loading branch information
sathayen committed Mar 21, 2018
1 parent 2cd7607 commit 7cdab8f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/qasm-simulator-cpp/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ OUTPUT_DIR = ../../../out
CC = g++

# Use Homebrew GNU g++ for enabling OpenMP on macOS

OS:=$(shell uname)
GCC7:=$(shell g++-7 --version | grep ^'command not found')
ifeq ($(OS)$(GCC7),Darwin)
CC = g++-7
endif

# -march not supported on ppc64le (Power). Use -mcpu instead
ARCH:$(shell uname -m)
ifeq ($(ARCH),ppc64le)
OPT = -O3 -mcpu=native -ffast-math
endif

# Check if compiler is Apple LLVM and doesn't support OpenMP
APPLELLVM = $(shell ${CC} --version | grep ^Apple)
ifeq ($(APPLELLVM),)
Expand Down

0 comments on commit 7cdab8f

Please sign in to comment.