On Wed, Feb 17, 2016 at 10:08:40PM +0100, Matthieu Herrb wrote:
> On Wed, Feb 17, 2016 at 09:46:30PM +0100, Matthieu Herrb wrote:
> > On Mon, Feb 15, 2016 at 03:44:02PM +0000, Christian Weisgerber wrote:
> > > On 2016-02-14, Matthieu Herrb <matth...@herrb.eu> wrote:
> > > 
> > > > I've taken the list of individual optimisation from gcc(1) for both -O1
> > > > and -O2 and replaced -O2 by this in CFLAGS.
> > > 
> > > gcc-local(1) is also worth a look...
> > > 
> > > > +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
> > > 
> > > Our -O2 does not include -fstrict-aliasing, -fstrict-overflow,
> > > -ftree-vrp.
> > > 
> > 
> > Here's a new patch, taking your remarks and jsg's advice on
> > USER_CFLAGS into account. I can't test it so please someone with an
> > alpha apply it and try a full xenocara build (see release(8)) with
> > it. Thanks.
> 
> Oops missed one important chunk. Use this one instead

Shouldn't this be 

CONFIGURE_ARGS+=        USER_CFLAGS="-O0 ${O2}"

like the i386 portion of Makefile.bsd-wrapper dropping the
bsd.xorg.mk part?

> 
> 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     17 Feb 2016 21:06:03 -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 \
> +     -fdelete-null-pointer-checks -freorder-blocks \
> +     -freorder-functions -falign-functions -falign-jumps -falign-loops \
> +     -falign-labels -ftree-pre
> +
> +USER_CFLAGS= -O0 ${O2}
> +.endif
> +
>  CONFIGURE_ARGS=              --with-dri-drivers=${DRI_DRIVERS} \
>                       --with-gallium-drivers=${GALLIUM_DRIVERS} \
>                       --disable-silent-rules \
> Index: lib/mesa/src/util/u_atomic.h
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/lib/mesa/src/util/u_atomic.h,v
> retrieving revision 1.2
> diff -u -p -u -r1.2 u_atomic.h
> --- lib/mesa/src/util/u_atomic.h      22 Nov 2015 03:08:22 -0000      1.2
> +++ lib/mesa/src/util/u_atomic.h      17 Feb 2016 21:06:06 -0000
> @@ -24,7 +24,8 @@
>  #elif defined(_MSC_VER)
>  #define PIPE_ATOMIC_MSVC_INTRINSIC
>  #elif defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_5__) || \
> -      defined(__hppa__) || defined(__sparc__) || defined(__sh__)
> +     defined(__hppa__) || defined(__sparc__) || defined(__sh__) \
> +     || defined(__alpha__)
>  #define PIPE_ATOMIC_UNLOCKED
>  #elif defined(__GNUC__)
>  #define PIPE_ATOMIC_GCC_INTRINSIC
> Index: share/mk/bsd.xconf.mk
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/share/mk/bsd.xconf.mk,v
> retrieving revision 1.31
> diff -u -p -u -r1.31 bsd.xconf.mk
> --- share/mk/bsd.xconf.mk     7 Feb 2016 10:06:50 -0000       1.31
> +++ share/mk/bsd.xconf.mk     17 Feb 2016 21:06:06 -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: share/mk/bsd.xorg.mk
> ===================================================================
> RCS file: /cvs/OpenBSD/xenocara/share/mk/bsd.xorg.mk,v
> retrieving revision 1.51
> diff -u -p -u -r1.51 bsd.xorg.mk
> --- share/mk/bsd.xorg.mk      24 Aug 2014 15:53:08 -0000      1.51
> +++ share/mk/bsd.xorg.mk      17 Feb 2016 21:06:06 -0000
> @@ -57,6 +57,7 @@ XENOCARA_PATH?=     /bin:/sbin:/usr/bin:/usr
>  CONFIGURE_ENV=       PKG_CONFIG_LIBDIR="$(PKG_CONFIG_LIBDIR)" \
>               CONFIG_SITE=$(CONFIG_SITE) \
>               CFLAGS="$(CFLAGS:C/ *$//)" \
> +             USER_CFLAGS="$(USER_CFLAGS:C/ *$//)" \
>               MAKE="${MAKE}"
>  
>  CONFIGURE_ARGS+= --disable-silent-rules
> 
> -- 
> Matthieu Herrb


Reply via email to