On Sun, Feb 14, 2016 at 11:17:24PM +1100, Jonathan Gray wrote: > I would prefer if someone with time and an alpha can figure > out which optimisation flag breaks, then all of mesa > could be built with that disabled on alpha which would be > a much smaller diff.
Ok here is a new less intrusive diff. I don't understand why it works
but it allows to build mesa on alpha.
I've taken the list of individual optimisation from gcc(1) for both -O1
and -O2 and replaced -O2 by this in CFLAGS. My plan was to try to
remove one after the other until it built, but both problematic files
build ok with that combinaison.
I've only removed -fdelayed-branch since gcc says that it's not supported
on this architecture.
Index: share/mk/bsd.xconf.mk
===================================================================
RCS file: /cvs/OpenBSD/xenocara/share/mk/bsd.xconf.mk,v
retrieving revision 1.30
diff -u -p -u -r1.30 bsd.xconf.mk
--- share/mk/bsd.xconf.mk 5 Feb 2016 13:59:11 -0000 1.30
+++ share/mk/bsd.xconf.mk 14 Feb 2016 19:36:56 -0000
@@ -8,7 +8,7 @@ XENOCARA_HAVE_SHARED_LIBS?=yes
.endif
# Build GL libs and apps?
-.if ${MACHINE_ARCH} == "m88k" || ${MACHINE_ARCH} == "alpha"
+.if ${MACHINE_ARCH} == "m88k"
XENOCARA_BUILD_GL?=no
XENOCARA_BUILD_DRI?=no
.else
Index: lib/mesa/Makefile.bsd-wrapper
===================================================================
RCS file: /cvs/OpenBSD/xenocara/lib/mesa/Makefile.bsd-wrapper,v
retrieving revision 1.4
diff -u -p -u -r1.4 Makefile.bsd-wrapper
--- lib/mesa/Makefile.bsd-wrapper 20 Dec 2015 12:31:01 -0000 1.4
+++ lib/mesa/Makefile.bsd-wrapper 14 Feb 2016 19:36:56 -0000
@@ -18,6 +18,25 @@ DRI_DRIVERS=swrast,radeon,r200
GALLIUM_DRIVERS=swrast,r300,r600
.endif
+.if ${MACHINE} == alpha
+O1= -fdefer-pop -fguess-branch-probability -fcprop-registers \
+ -fif-conversion -fif-conversion2 -ftree-ccp -ftree-dce \
+ -ftree-dominator-opts -ftree-dse -ftree-ter -ftree-lrs -ftree-sra \
+ -ftree-copyrename -ftree-fre -ftree-ch -funit-at-a-time \
+ -fmerge-constants -fomit-frame-pointer
+
+O2= ${O1} -fthread-jumps -fcrossjumping \
+ -foptimize-sibling-calls -fcse-follow-jumps -fcse-skip-blocks \
+ -fgcse -fgcse-lm -fexpensive-optimizations -frerun-cse-after-loop \
+ -fcaller-saves -fpeephole2 -fschedule-insns -fschedule-insns2 \
+ -fsched-interblock -fsched-spec -fregmove -fstrict-aliasing \
+ -fstrict-overflow -fdelete-null-pointer-checks -freorder-blocks \
+ -freorder-functions -falign-functions -falign-jumps -falign-loops \
+ -falign-labels -ftree-vrp -ftree-pre
+
+CFLAGS= ${O2} -pipe
+.endif
+
CONFIGURE_ARGS= --with-dri-drivers=${DRI_DRIVERS} \
--with-gallium-drivers=${GALLIUM_DRIVERS} \
--disable-silent-rules \
--
Matthieu Herrb
signature.asc
Description: PGP signature
