[Skiboot] [PATCH] extract-gcov: build with -m64 if compiler supports it

Stewart Smith stewart at linux.vnet.ibm.com
Tue Oct 25 19:46:39 AEDT 2016


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 at gmail.com>
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 Makefile.main | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.main b/Makefile.main
index 86a54be456d9..7918a180b80c 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) \
-- 
2.1.4



More information about the Skiboot mailing list