On Sat, Oct 16, 2021 at 11:32:39PM -0400, George Koehler wrote:
> On Sat, 16 Oct 2021 17:43:35 +0100
> Edd Barrett <e...@theunixzoo.co.uk> wrote:
> 
> > On Sat, Oct 16, 2021 at 10:16:48AM -0600, c...@openbsd.org wrote:
> > > http://build-failures.rhaalovely.net/powerpc/2021-09-28/games/odamex.log
> > 
> > > <command line>:1:9: error: macro name must be an identifier
> > > #define -faltivec 1
> > 
> > Can you try this?
> 
> Fails because clang rejects -faltivec,
>   c++: error: the clang compiler does not support 'faltivec',
>   please use -maltivec and include altivec.h explicitly
> 
> I suspect that -faltivec was only for Apple gcc on Mac OS X (because
> our ports-gcc also rejects it).  It would also be wrong to build every
> file with -maltivec, because some macppc models (G3) have no altivec.
> It might be correct to build only r_drawt_altivec.cpp with -maltivec,
> because r_draw.cpp checks SDL_HasAltiVec().  Either that, or just
> disable altivec on powerpc.
> 
> I will try to unbreak the build on my macppc.
> --George

When I was looking at this I was thinking something like this, but I
don't have hw to test with.


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/games/odamex/Makefile,v
retrieving revision 1.7
diff -u -p -u -p -r1.7 Makefile
--- Makefile    13 Sep 2021 19:51:30 -0000      1.7
+++ Makefile    16 Oct 2021 18:54:31 -0000
@@ -33,6 +33,10 @@ CONFIGURE_ENV +=     CXXFLAGS=-I${LOCALBASE}
                        LDFLAGS=-L${LOCALBASE}/lib
 CONFIGURE_ARGS +=      -DNO_AG-ODALAUNCH_TARGET=YES
 
+.if ${MACHINE_ARCH} == "powerpc"
+CONFIGURE_ARGS +=      -DUSE_DEFAULT_SIMD=OFF
+.endif
+
 LIB_DEPENDS =          x11/wxWidgets \
                        audio/portmidi \
                        graphics/png \

> > Index: patches/patch-client_CMakeLists_txt
> > ===================================================================
> > RCS file: /cvs/ports/games/odamex/patches/patch-client_CMakeLists_txt,v
> > retrieving revision 1.3
> > diff -u -p -r1.3 patch-client_CMakeLists_txt
> > --- patches/patch-client_CMakeLists_txt     29 Aug 2021 22:09:09 -0000      
> > 1.3
> > +++ patches/patch-client_CMakeLists_txt     16 Oct 2021 16:41:49 -0000
> > @@ -3,7 +3,7 @@ $OpenBSD: patch-client_CMakeLists_txt,v 
> >  Index: client/CMakeLists.txt
> >  --- client/CMakeLists.txt.orig
> >  +++ client/CMakeLists.txt
> > -@@ -163,7 +163,7 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
> > +@@ -163,13 +163,13 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
> >       elseif(ODAMEX_TARGET_ARCH STREQUAL "i386")
> >         if(NOT MSVC)
> >           # Pentium M has SSE2.
> > @@ -12,6 +12,13 @@ Index: client/CMakeLists.txt
> >         else()
> >           target_compile_definitions(odamex PRIVATE /arch:SSE2)
> >         endif()
> > +       message(STATUS "Default SIMD flags set to SSE2")
> > +     elseif(ODAMEX_TARGET_ARCH MATCHES "ppc")
> > +-      target_compile_definitions(odamex PRIVATE -faltivec)
> > ++      target_compile_options(odamex PRIVATE -faltivec)
> > +       message(STATUS "Default SIMD flags set to AltiVec")
> > +     endif()
> > +   else()
> >  @@ -220,7 +220,7 @@ if(TARGET SDL2::SDL2 OR TARGET SDL::SDL)
> >     endif()
> >   
> > -- 
> > Best Regards
> > Edd Barrett
> > 
> > https://www.theunixzoo.co.uk
> > 
> 
> 
> -- 
> George Koehler <kern...@gmail.com>
> 

Reply via email to