ports/137363: [patch] graphics/devil: add SIMD knob

Anonymous swell.k at gmail.com
Sun Aug 2 19:50:01 UTC 2009


>Number:         137363
>Category:       ports
>Synopsis:       [patch] graphics/devil: add SIMD knob
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 02 19:50:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD 8.0-BETA2 #0 r196037M: Sun Aug  2 15:30:58 UTC 2009     roo=
t at luffy:/usr/obj/usr/src/sys/PHOENIX  amd64

>Description:
Hide machine extensions behind SIMD knob. Perhaps, better to use
--disable-asm rather than disabling each one separetely.

Besides, it fixes love(6) compiled by gcc45 `bus error' crash for me.

--- crash.log begins here ---
(gdb) r
Starting program: /usr/local/bin/love
During symbol reading...location expression too complex...
During symbol reading...location expression too complex...
[New LWP 100315]
During symbol reading...location expression too complex...
During symbol reading...location expression too complex...
[New Thread 8066021c0 (LWP 100315)]
This is LOVE 0.5.0 (Salted Nuts).

INIT love.filesystem [PhysFS]
INIT love.graphics [OpenGL/DevIL/FreeType]

Program received signal SIGBUS, Bus error.
[Switching to Thread 8066021c0 (LWP 100315)]
free (ptr=3D0x31003200320032) at /usr/src/lib/libc/stdlib/malloc.c:3889
3889                    arena_dalloc(chunk->arena, chunk, ptr);
Current language:  auto; currently c
(gdb) bt f
#0  free (ptr=3D0x31003200320032) at /usr/src/lib/libc/stdlib/malloc.c:3889
No locals.
During symbol reading, Incomplete CFI data; unspecified registers at 0x0000=
0008055684a5.
#1  0x0000000802e3ab5a in _mm_free (aligned_ptr=3D0x806615134) at mm_malloc=
.h:71
No locals.
#2  0x0000000802e3ac4a in DefaultFreeFunc (ptr=3D0x806615134)
    at ./../src-IL/src/il_alloc.c:127
No locals.
#3  0x0000000802e3abb6 in ifree (Ptr=3D0x806615134)
    at ./../src-IL/src/il_alloc.c:99
No locals.
#4  0x0000000802e72146 in ilTexImage_ (Image=3D0x8066516c0, Width=3D64,
    Height=3D64, Depth=3D1, Bpp=3D3 '\003', Format=3D32992, Type=3D5121, Da=
ta=3D0x0)
    at ./../src-IL/src/il_devil.c:156
No locals.
#5  0x0000000802e7200e in ilTexImage (Width=3D64, Height=3D64, Depth=3D1,
    Bpp=3D3 '\003', Format=3D32992, Type=3D5121, Data=3D0x0)
    at ./../src-IL/src/il_devil.c:129
No locals.
#6  0x0000000802e5e036 in ilDefaultImage () at ./../src-IL/src/il_manip.c:6=
17
        TempData =3D (ILubyte *) 0x800792600 "z=EF=BF=BDP=EF=BF=BD"
        Yellow =3D "\022=EF=BF=BD=EF=BF=BD"
        Black =3D "\000\000"
        ColorPtr =3D (ILubyte *) 0x7fffffffe0f0 "\022=EF=BF=BD=EF=BF=BD"
        Color =3D 1 '\001'
        v =3D 514
        w =3D 8
        x =3D 51030952
        y =3D 8
#7  0x0000000802e3c8b6 in iSetImage0 () at ./../src-IL/src/il_stack.c:648
No locals.
#8  0x0000000802e3c6e1 in ilInit () at ./../src-IL/src/il_stack.c:590
No locals.
#9  0x000000000047eb5c in love_opengl::module_init (argc=3D1,
    argv=3D0x7fffffffe378, core=3D0x80660d180) at opengl/love_opengl.cpp:107
No locals.
#10 0x00000000004699a9 in love::Core::insmod (this=3D0x80660d180,
    m=3D at 0x7fffffffe230) at liblove/Core.cpp:55
No locals.
#11 0x0000000000469be1 in love::Core::insmod (this=3D0x80660d180,
    init=3D0x47ea46 <love_opengl::module_init(int, char**, love::Core*)>,
    quit=3D0x47e2b2 <love_opengl::module_quit()>,
    open=3D0x47ea0c <love_opengl::module_open(void*)>) at liblove/Core.cpp:=
65
        m =3D {
  px =3D 0x80660c280,
  pn =3D {
    pi_ =3D 0x80660c2a0
  }
}
#12 0x0000000000409392 in main (argc=3D1, argv=3D0x7fffffffe378) at love.cp=
p:81
        core =3D {
  px =3D 0x80660d180,
  pn =3D {
    pi_ =3D 0x80660c1c0
  }
}
        timer =3D (struct love::Timer *) 0x40920b
        graphics =3D (struct love::Graphics *) 0x7fffffffe310
        system =3D (struct love::System *) 0x4fe46a
        e =3D {
  type =3D 120 'x',
  active =3D {
    type =3D 120 'x',
    gain =3D 227 '=EF=BF=BD',
    state =3D 255 '=EF=BF=BD'
  },
  key =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    state =3D 255 '=EF=BF=BD',
    keysym =3D {
      scancode =3D 255 '=EF=BF=BD',
      sym =3D SDLK_UNKNOWN,
      mod =3D KMOD_NONE,
      unicode =3D 0
    }
  },
  motion =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    state =3D 255 '=EF=BF=BD',
    x =3D 32767,
    y =3D 0,
    xrel =3D 0,
    yrel =3D 0
  },
  button =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    button =3D 255 '=EF=BF=BD',
    state =3D 255 '=EF=BF=BD',
    x =3D 32767,
    y =3D 0
  },
  jaxis =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    axis =3D 255 '=EF=BF=BD',
    value =3D 32767
  },
  jball =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    ball =3D 255 '=EF=BF=BD',
    xrel =3D 32767,
    yrel =3D 0
  },
  jhat =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    hat =3D 255 '=EF=BF=BD',
    value =3D 255 '=EF=BF=BD'
  },
  jbutton =3D {
    type =3D 120 'x',
    which =3D 227 '=EF=BF=BD',
    button =3D 255 '=EF=BF=BD',
    state =3D 255 '=EF=BF=BD'
  },
  resize =3D {
    type =3D 120 'x',
    w =3D 32767,
    h =3D 0
  },
  expose =3D {
    type =3D 120 'x'
  },
  quit =3D {
    type =3D 120 'x'
  },
  user =3D {
    type =3D 120 'x',
    code =3D 32767,
    data1 =3D 0x0,
    data2 =3D 0x0
  },
  syswm =3D {
    type =3D 120 'x',
    msg =3D 0x0
  }
}
        running =3D false
--- crash.log ends here ---

>How-To-Repeat:
>Fix:
--- devil.diff begins here ---
Index: graphics/devil/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /home/csup/ports/graphics/devil/Makefile,v
retrieving revision 1.26
diff -u -p -r1.26 Makefile
--- graphics/devil/Makefile	18 Jul 2009 11:10:46 -0000	1.26
+++ graphics/devil/Makefile	2 Aug 2009 16:02:13 -0000
@@ -24,7 +24,8 @@ OPTIONS=3D	JPEG	"Enable JPEG support"		on=20
 		TIFF	"Enable TIFF support"		on \
 		X11	"Enable X11 support"		on \
 		SDL	"Enable SDL support"		off \
-		NVTT	"Enable NVidia texture tools support" off
+		NVTT	"Enable NVidia texture tools support" off \
+		SIMD	"Enable SIMD autodetection (AltiVec, SSE3,...)" off
=20
 WRKSRC=3D		${WRKDIR}/${DISTNAME:L}
=20
@@ -34,8 +35,7 @@ ACLOCAL_ARGS=3D	-I m4 -I ${LOCALBASE}/shar
 AUTOMAKE_ARGS=3D	--add-missing --copy --force-missing
 CONFIGURE_ENV=3D	CPPFLAGS=3D"${CPPFLAGS}" LDFLAGS=3D"${LDFLAGS}"
 CONFIGURE_ARGS=3D	--enable-ILU \
-		--disable-allegro --disable-directx8 --disable-directx9 \
-		--disable-altivec --disable-sse --disable-sse2 --disable-sse3
+		--disable-allegro --disable-directx8 --disable-directx9
 USE_LDCONFIG=3D	yes
 MAKE_JOBS_SAFE=3D	yes
=20
@@ -109,6 +109,10 @@ LDFLAGS+=3D	${PTHREAD_LIBS}
 CONFIGURE_ARGS+=3D--without-nvtt
 .endif
=20
+.if defined(WITHOUT_SIMD)
+CONFIGURE_ARGS+=3D--disable-altivec --disable-sse --disable-sse2 --disable=
-sse3
+.endif
+
 post-patch:
 	@${REINPLACE_CMD} -e '/^SUBDIRS/s|docs||g' ${WRKSRC}/Makefile.am
 	@${REINPLACE_CMD} -e '/^pkgdir=3D/s|$$(libdir)/|$$(prefix)/libdata/|g' \
--- devil.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list