On Sun, Feb 14, 2016 at 10:43:30AM +0100, Matthieu Herrb wrote: > On Sun, Feb 14, 2016 at 05:31:31PM +1100, Jonathan Gray wrote: > > On Sat, Feb 13, 2016 at 07:17:35PM +0100, Matthieu Herrb wrote: > > > So, here is a patch that should let libGL to build again on > > > alpha. I've not done a full clean xenocara build with it yet though, > > > given how slow my alpha is. > > > > > > In addition to the non-existent sync operation, I had to force 2 files > > > to build with -O0. > > > > > > There is a lot of Makefile.in churn since I did some autotools > > > hackery... > > > > Any idea which of the -O1 options triggers it? > > > > According to gcc(1): > > > > -O turns on the following optimization flags: -fdefer-pop > > -fdelayed-branch -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 > > no idea. I just went directly to -O0. If someone else wants to narrow > that down... I won't have time to try further build options in the > coming week.
Ah, so it could be options enabled with -O2 as well then. > > > > > So alpha is in the same situation mips64 was then? > > > > Going by /sys/arch/alpha/include/atomic.h there are atomics, > > which sync builtins does gcc not implement on alpha? > > As I pointed out in a previous mail it's p_atomic_cmpxchg() that is > missing. > > Again I went to the easy road to define PIPE_ATOMIC_UNLOCKED because I > wanted something quick and easy and haven't seen a simple way to tell > Mesa that it should fallback to unlocked only for specific operations. > > The question is should I commit this now and let you or other people with > alphas tweak it to get a libGL & friends available for 5.9 or do we > postpone that after 5.9 ? All my alphas are dead. There are still things such as https://gcc.gnu.org/ml/gcc-patches/2007-02/msg00722.html that sound relevant I just can't build or test anything. 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. Index: gnu/gcc/gcc/config/alpha/alpha.c =================================================================== RCS file: /cvs/src/gnu/gcc/gcc/config/alpha/alpha.c,v retrieving revision 1.4 diff -u -p -r1.4 alpha.c --- gnu/gcc/gcc/config/alpha/alpha.c 20 Dec 2012 13:58:06 -0000 1.4 +++ gnu/gcc/gcc/config/alpha/alpha.c 14 Feb 2016 12:10:16 -0000 @@ -4551,6 +4551,8 @@ emit_insxl (enum machine_mode mode, rtx else fn = gen_inswl_le; } + /* The insbl and inswl patterns require a register operand. */ + op1 = force_reg (mode, op1); emit_insn (fn (ret, op1, op2)); return ret;