aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2016-10-25 19:43:53 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-10-25 19:43:53 +1100
commit241daa24feaf9c9aa84ac45887b67ceb6918980a (patch)
tree5966a42e3343d489dfad3f71e6c6bd583ad8df0b /Makefile.main
parentbedab1a10fc9815948745adc944aeb6a3a11238e (diff)
downloadskiboot-241daa24feaf9c9aa84ac45887b67ceb6918980a.zip
skiboot-241daa24feaf9c9aa84ac45887b67ceb6918980a.tar.gz
skiboot-241daa24feaf9c9aa84ac45887b67ceb6918980a.tar.bz2
extract-gcov: build with -m64 if compiler supports it
Fixes build break on 32bit ppc64 (e.g. PowerMac G5, where user space is mostly 32bit). Fixes: https://github.com/open-power/skiboot/issues/42 Reported-by: Andrei Warkenti <andrey.warkentin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.main b/Makefile.main
index 86a54be..7918a18 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -35,6 +35,7 @@ HOSTCC=gcc
HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e 's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/')
HOSTCFLAGS=-O1 $(CWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-std=gnu11)
+HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-m64)
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=const) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=noreturn) \