When building with default options on my amd64 machine build/.libs/SDL_blit_A.o: In function `BlitRGBtoRGBPixelAlphaMMX3DNOW': /tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2191): undefined reference to `_m_prefetch' /tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x219c): undefined reference to `_m_prefetch' /tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x226d): undefined reference to `_m_prefetch' /tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2278): undefined reference to `_m_prefetch' /tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2355): undefined reference to `_m_prefetch' build/.libs/SDL_blit_A.o:/tmp/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2360): more undefined references to `_m_prefetch' follow cc: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:126: recipe for target 'build/libSDL2.la' failed gmake[2]: *** [build/libSDL2.la] Error 1
Auto-assigned to maintainer mva@FreeBSD.org
Sounds like some features (MMX, 3DNow! or something else) are not supported by your CPU. Can you provide the CPU information output from dmesg as well as what kind of processor type you specified for building your base system (make.conf), your OS version and the compiler chosen for building ports?
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 6000+ (3013.77-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x40f33 Family = 0xf Model = 0x43 Stepping = 3 Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT> Features2=0x2001<SSE3,CX16> AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!> AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8> My make.conf CPUTYPE?=athlon64-sse3
OS: FreeBSD m16.cabletv.dp.ua 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #3 r273242: Sat Oct 18 09:59:10 EEST 2014 root@m16.cabletv.dp.ua:/usr/src/sys/amd64/compile/m16 amd64 Compiler: FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.1 Thread model: posix
Your CPU seems to support the necessary instruction sets. Can you attach the configure output and config.log?
Created attachment 149316 [details] config.log
Created attachment 149317 [details] configure output
And I see some times this message: configure: WARNING: unrecognized options: --enable-pthreads-sem
After some more research, this might be a compiler bug, since it internally seems to define __3dNOW__, which is not supported by it. Do you have any chance to update your clang installation (update of the base system)?
(In reply to Marcus von Appen from comment #9) I have similar issue but with SSE2: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198738 libtool: compile: cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_sysfilesystem.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/filesystem/unix/SDL_sysfilesystem.c -o build/SDL_sysfilesystem.o >/dev/null 2>&1 /bin/sh ./libtool --mode=compile cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_systimer.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/timer/unix/SDL_systimer.c -o build/SDL_systimer.lo libtool: compile: cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_systimer.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/timer/unix/SDL_systimer.c -fPIC -DPIC -o build/.libs/SDL_systimer.o libtool: compile: cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_systimer.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/timer/unix/SDL_systimer.c -o build/SDL_systimer.o >/dev/null 2>&1 /bin/sh ./libtool --mode=compile cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_syshaptic.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/haptic/dummy/SDL_syshaptic.c -o build/SDL_syshaptic.lo libtool: compile: cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_syshaptic.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/haptic/dummy/SDL_syshaptic.c -fPIC -DPIC -o build/.libs/SDL_syshaptic.o libtool: compile: cc -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -msse2 -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_syshaptic.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/haptic/dummy/SDL_syshaptic.c -o build/SDL_syshaptic.o >/dev/null 2>&1 /bin/sh ./libtool --mode=link cc -o build/libSDL2.la build/SDL.lo build/SDL_assert.lo build/SDL_error.lo build/SDL_hints.lo build/SDL_log.lo build/SDL_atomic.lo build/SDL_spinlock.lo build/SDL_audio.lo build/SDL_audiocvt.lo build/SDL_audiodev.lo build/SDL_audiotypecvt.lo build/SDL_mixer.lo build/SDL_wave.lo build/SDL_cpuinfo.lo build/SDL_dynapi.lo build/SDL_clipboardevents.lo build/SDL_dropevents.lo build/SDL_events.lo build/SDL_gesture.lo build/SDL_keyboard.lo build/SDL_mouse.lo build/SDL_quit.lo build/SDL_touch.lo build/SDL_windowevents.lo build/SDL_rwops.lo build/SDL_haptic.lo build/SDL_gamecontroller.lo build/SDL_joystick.lo build/e_atan2.lo build/e_log.lo build/e_pow.lo build/e_rem_pio2.lo build/e_sqrt.lo build/k_cos.lo build/k_rem_pio2.lo build/k_sin.lo build/s_atan.lo build/s_copysign.lo build/s_cos.lo build/s_fabs.lo build/s_floor.lo build/s_scalbn.lo build/s_sin.lo build/SDL_power.lo build/SDL_d3dmath.lo build/SDL_render.lo build/SDL_yuv_mmx.lo build/SDL_yuv_sw.lo build/SDL_render_d3d.lo build/SDL_render_d3d11.lo build/SDL_render_gl.lo build/SDL_shaders_gl.lo build/SDL_render_gles.lo build/SDL_render_gles2.lo build/SDL_shaders_gles2.lo build/SDL_render_psp.lo build/SDL_blendfillrect.lo build/SDL_blendline.lo build/SDL_blendpoint.lo build/SDL_drawline.lo build/SDL_drawpoint.lo build/SDL_render_sw.lo build/SDL_rotate.lo build/SDL_getenv.lo build/SDL_iconv.lo build/SDL_malloc.lo build/SDL_qsort.lo build/SDL_stdlib.lo build/SDL_string.lo build/SDL_thread.lo build/SDL_timer.lo build/SDL_RLEaccel.lo build/SDL_blit.lo build/SDL_blit_0.lo build/SDL_blit_1.lo build/SDL_blit_A.lo build/SDL_blit_N.lo build/SDL_blit_auto.lo build/SDL_blit_copy.lo build/SDL_blit_slow.lo build/SDL_bmp.lo build/SDL_clipboard.lo build/SDL_egl.lo build/SDL_fillrect.lo build/SDL_pixels.lo build/SDL_rect.lo build/SDL_shape.lo build/SDL_stretch.lo build/SDL_surface.lo build/SDL_video.lo build/SDL_nullevents.lo build/SDL_nullframebuffer.lo build/SDL_nullvideo.lo build/SDL_diskaudio.lo build/SDL_dummyaudio.lo build/SDL_sysloadso.lo build/SDL_dspaudio.lo build/SDL_x11clipboard.lo build/SDL_x11dyn.lo build/SDL_x11events.lo build/SDL_x11framebuffer.lo build/SDL_x11keyboard.lo build/SDL_x11messagebox.lo build/SDL_x11modes.lo build/SDL_x11mouse.lo build/SDL_x11opengl.lo build/SDL_x11opengles.lo build/SDL_x11shape.lo build/SDL_x11touch.lo build/SDL_x11video.lo build/SDL_x11window.lo build/SDL_x11xinput2.lo build/edid-parse.lo build/imKStoUCS.lo build/SDL_sysjoystick.lo build/SDL_systhread.lo build/SDL_syssem.lo build/SDL_sysmutex.lo build/SDL_syscond.lo build/SDL_systls.lo build/SDL_sysfilesystem.lo build/SDL_systimer.lo build/SDL_syshaptic.lo -L/usr/local/lib -fstack-protector -Wl,--no-undefined -lm -lusbhid -pthread -lrt -no-undefined -rpath /usr/local/lib -release 2.0 -version-info 2:1:2 libtool: link: cc -shared -fPIC -DPIC build/.libs/SDL.o build/.libs/SDL_assert.o build/.libs/SDL_error.o build/.libs/SDL_hints.o build/.libs/SDL_log.o build/.libs/SDL_atomic.o build/.libs/SDL_spinlock.o build/.libs/SDL_audio.o build/.libs/SDL_audiocvt.o build/.libs/SDL_audiodev.o build/.libs/SDL_audiotypecvt.o build/.libs/SDL_mixer.o build/.libs/SDL_wave.o build/.libs/SDL_cpuinfo.o build/.libs/SDL_dynapi.o build/.libs/SDL_clipboardevents.o build/.libs/SDL_dropevents.o build/.libs/SDL_events.o build/.libs/SDL_gesture.o build/.libs/SDL_keyboard.o build/.libs/SDL_mouse.o build/.libs/SDL_quit.o build/.libs/SDL_touch.o build/.libs/SDL_windowevents.o build/.libs/SDL_rwops.o build/.libs/SDL_haptic.o build/.libs/SDL_gamecontroller.o build/.libs/SDL_joystick.o build/.libs/e_atan2.o build/.libs/e_log.o build/.libs/e_pow.o build/.libs/e_rem_pio2.o build/.libs/e_sqrt.o build/.libs/k_cos.o build/.libs/k_rem_pio2.o build/.libs/k_sin.o build/.libs/s_atan.o build/.libs/s_copysign.o build/.libs/s_cos.o build/.libs/s_fabs.o build/.libs/s_floor.o build/.libs/s_scalbn.o build/.libs/s_sin.o build/.libs/SDL_power.o build/.libs/SDL_d3dmath.o build/.libs/SDL_render.o build/.libs/SDL_yuv_mmx.o build/.libs/SDL_yuv_sw.o build/.libs/SDL_render_d3d.o build/.libs/SDL_render_d3d11.o build/.libs/SDL_render_gl.o build/.libs/SDL_shaders_gl.o build/.libs/SDL_render_gles.o build/.libs/SDL_render_gles2.o build/.libs/SDL_shaders_gles2.o build/.libs/SDL_render_psp.o build/.libs/SDL_blendfillrect.o build/.libs/SDL_blendline.o build/.libs/SDL_blendpoint.o build/.libs/SDL_drawline.o build/.libs/SDL_drawpoint.o build/.libs/SDL_render_sw.o build/.libs/SDL_rotate.o build/.libs/SDL_getenv.o build/.libs/SDL_iconv.o build/.libs/SDL_malloc.o build/.libs/SDL_qsort.o build/.libs/SDL_stdlib.o build/.libs/SDL_string.o build/.libs/SDL_thread.o build/.libs/SDL_timer.o build/.libs/SDL_RLEaccel.o build/.libs/SDL_blit.o build/.libs/SDL_blit_0.o build/.libs/SDL_blit_1.o build/.libs/SDL_blit_A.o build/.libs/SDL_blit_N.o build/.libs/SDL_blit_auto.o build/.libs/SDL_blit_copy.o build/.libs/SDL_blit_slow.o build/.libs/SDL_bmp.o build/.libs/SDL_clipboard.o build/.libs/SDL_egl.o build/.libs/SDL_fillrect.o build/.libs/SDL_pixels.o build/.libs/SDL_rect.o build/.libs/SDL_shape.o build/.libs/SDL_stretch.o build/.libs/SDL_surface.o build/.libs/SDL_video.o build/.libs/SDL_nullevents.o build/.libs/SDL_nullframebuffer.o build/.libs/SDL_nullvideo.o build/.libs/SDL_diskaudio.o build/.libs/SDL_dummyaudio.o build/.libs/SDL_sysloadso.o build/.libs/SDL_dspaudio.o build/.libs/SDL_x11clipboard.o build/.libs/SDL_x11dyn.o build/.libs/SDL_x11events.o build/.libs/SDL_x11framebuffer.o build/.libs/SDL_x11keyboard.o build/.libs/SDL_x11messagebox.o build/.libs/SDL_x11modes.o build/.libs/SDL_x11mouse.o build/.libs/SDL_x11opengl.o build/.libs/SDL_x11opengles.o build/.libs/SDL_x11shape.o build/.libs/SDL_x11touch.o build/.libs/SDL_x11video.o build/.libs/SDL_x11window.o build/.libs/SDL_x11xinput2.o build/.libs/edid-parse.o build/.libs/imKStoUCS.o build/.libs/SDL_sysjoystick.o build/.libs/SDL_systhread.o build/.libs/SDL_syssem.o build/.libs/SDL_sysmutex.o build/.libs/SDL_syscond.o build/.libs/SDL_systls.o build/.libs/SDL_sysfilesystem.o build/.libs/SDL_systimer.o build/.libs/SDL_syshaptic.o -L/usr/local/lib -lm -lusbhid -lrt -fstack-protector -Wl,--no-undefined -pthread -pthread -Wl,-soname -Wl,libSDL2-2.0.so.0 -o build/.libs/libSDL2-2.0.so.0.2.1 build/.libs/SDL_blit_A.o: In function `.LBB5_4': /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x206b): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2076): undefined reference to `_m_prefetch' build/.libs/SDL_blit_A.o: In function `.LBB5_9': /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x21ac): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x21b7): undefined reference to `_m_prefetch' build/.libs/SDL_blit_A.o: In function `.LBB5_14': /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x22ed): undefined reference to `_m_prefetch' build/.libs/SDL_blit_A.o:/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x22f8): more undefined references to `_m_prefetch' follow cc: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:126: recipe for target 'build/libSDL2.la' failed gmake[2]: *** [build/libSDL2.la] Error 1 gmake[2]: Leaving directory '/usr/ports/devel/sdl20/work/SDL2-2.0.3' *** Error code 1 My processors isn't support SSE2 as all x86-32 except Pentium 4.
A fix for some CPU flags was comitted in ports r387283. Can you check, if sdl20 builds properly now?
It looks like mm3dnow.h from clang doesn't provide _m_prefetch like gcc does. Maybe dim@ can help with that.
(In reply to Tijl Coosemans from comment #12) Indeed, this particular intrinsic is referred to from a MS-only header in clang, but it's not in mm3dnow.h. This should be reported upstream (I can't do that myself due to ENOTIME, though). Meanwhile, I think the best workaround is to disable 3DNow. (I can't really imagine anybody using that, now SSE is available...)
(In reply to Dimitry Andric from comment #13) Submitted as: http://llvm.org/PR23648
Created attachment 157118 [details] patch This patch disables 3dnow and adds a comment to explain why.
Created attachment 157119 [details] patch2 The previous patch didn't work when users have -march=<3dnow capable cpu> in CFLAGS. GCC implements _m_prefetch with __builtin_prefetch so this patch simply replaces _m_prefetch with that.
(In reply to Tijl Coosemans from comment #16) Current version from ports failed to build with Clang36, later I gonna try this patch. libtool: compile: /usr/local/bin/clang36 -O2 -pipe -march=athlon-xp -DLIBICONV_PLUG -fstack-protector -fno-strict-aliasing -I/usr/local/include -DLIBICONV_PLUG -DUSING_GENERATED_CONFIG_H -Iinclude -I/usr/ports/devel/sdl20/work/SDL2-2.0.3/include -mmmx -msse -fvisibility=hidden -I/usr/local/include -DHAVE_USBHID_H -DUSBHID_NEW -D_REENTRANT -D_THREAD_SAFE -Wall -MMD -MT build/SDL_syshaptic.lo -c /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/haptic/dummy/SDL_syshaptic.c -o build/SDL_syshaptic.o >/dev/null 2>&1 /bin/sh ./libtool --mode=link /usr/local/bin/clang36 -o build/libSDL2.la build/SDL.lo build/SDL_assert.lo build/SDL_error.lo build/SDL_hints.lo build/SDL_log.lo build/SDL_atomic.lo build/SDL_spinlock.lo build/SDL_audio.lo build/SDL_audiocvt.lo build/SDL_audiodev.lo build/SDL_audiotypecvt.lo build/SDL_mixer.lo build/SDL_wave.lo build/SDL_cpuinfo.lo build/SDL_dynapi.lo build/SDL_clipboardevents.lo build/SDL_dropevents.lo build/SDL_events.lo build/SDL_gesture.lo build/SDL_keyboard.lo build/SDL_mouse.lo build/SDL_quit.lo build/SDL_touch.lo build/SDL_windowevents.lo build/SDL_rwops.lo build/SDL_haptic.lo build/SDL_gamecontroller.lo build/SDL_joystick.lo build/e_atan2.lo build/e_log.lo build/e_pow.lo build/e_rem_pio2.lo build/e_sqrt.lo build/k_cos.lo build/k_rem_pio2.lo build/k_sin.lo build/s_atan.lo build/s_copysign.lo build/s_cos.lo build/s_fabs.lo build/s_floor.lo build/s_scalbn.lo build/s_sin.lo build/SDL_power.lo build/SDL_d3dmath.lo build/SDL_render.lo build/SDL_yuv_mmx.lo build/SDL_yuv_sw.lo build/SDL_render_d3d.lo build/SDL_render_d3d11.lo build/SDL_render_gl.lo build/SDL_shaders_gl.lo build/SDL_render_gles.lo build/SDL_render_gles2.lo build/SDL_shaders_gles2.lo build/SDL_render_psp.lo build/SDL_blendfillrect.lo build/SDL_blendline.lo build/SDL_blendpoint.lo build/SDL_drawline.lo build/SDL_drawpoint.lo build/SDL_render_sw.lo build/SDL_rotate.lo build/SDL_getenv.lo build/SDL_iconv.lo build/SDL_malloc.lo build/SDL_qsort.lo build/SDL_stdlib.lo build/SDL_string.lo build/SDL_thread.lo build/SDL_timer.lo build/SDL_RLEaccel.lo build/SDL_blit.lo build/SDL_blit_0.lo build/SDL_blit_1.lo build/SDL_blit_A.lo build/SDL_blit_N.lo build/SDL_blit_auto.lo build/SDL_blit_copy.lo build/SDL_blit_slow.lo build/SDL_bmp.lo build/SDL_clipboard.lo build/SDL_egl.lo build/SDL_fillrect.lo build/SDL_pixels.lo build/SDL_rect.lo build/SDL_shape.lo build/SDL_stretch.lo build/SDL_surface.lo build/SDL_video.lo build/SDL_nullevents.lo build/SDL_nullframebuffer.lo build/SDL_nullvideo.lo build/SDL_diskaudio.lo build/SDL_dummyaudio.lo build/SDL_sysloadso.lo build/SDL_dspaudio.lo build/SDL_x11clipboard.lo build/SDL_x11dyn.lo build/SDL_x11events.lo build/SDL_x11framebuffer.lo build/SDL_x11keyboard.lo build/SDL_x11messagebox.lo build/SDL_x11modes.lo build/SDL_x11mouse.lo build/SDL_x11opengl.lo build/SDL_x11opengles.lo build/SDL_x11shape.lo build/SDL_x11touch.lo build/SDL_x11video.lo build/SDL_x11window.lo build/SDL_x11xinput2.lo build/edid-parse.lo build/imKStoUCS.lo build/SDL_sysjoystick.lo build/SDL_systhread.lo build/SDL_syssem.lo build/SDL_sysmutex.lo build/SDL_syscond.lo build/SDL_systls.lo build/SDL_sysfilesystem.lo build/SDL_systimer.lo build/SDL_syshaptic.lo -L/usr/local/lib -fstack-protector -Wl,--no-undefined -lm -lusbhid -pthread -lrt -no-undefined -rpath /usr/local/lib -release 2.0 -version-info 2:1:2 libtool: link: /usr/local/bin/clang36 -shared -fPIC -DPIC build/.libs/SDL.o build/.libs/SDL_assert.o build/.libs/SDL_error.o build/.libs/SDL_hints.o build/.libs/SDL_log.o build/.libs/SDL_atomic.o build/.libs/SDL_spinlock.o build/.libs/SDL_audio.o build/.libs/SDL_audiocvt.o build/.libs/SDL_audiodev.o build/.libs/SDL_audiotypecvt.o build/.libs/SDL_mixer.o build/.libs/SDL_wave.o build/.libs/SDL_cpuinfo.o build/.libs/SDL_dynapi.o build/.libs/SDL_clipboardevents.o build/.libs/SDL_dropevents.o build/.libs/SDL_events.o build/.libs/SDL_gesture.o build/.libs/SDL_keyboard.o build/.libs/SDL_mouse.o build/.libs/SDL_quit.o build/.libs/SDL_touch.o build/.libs/SDL_windowevents.o build/.libs/SDL_rwops.o build/.libs/SDL_haptic.o build/.libs/SDL_gamecontroller.o build/.libs/SDL_joystick.o build/.libs/e_atan2.o build/.libs/e_log.o build/.libs/e_pow.o build/.libs/e_rem_pio2.o build/.libs/e_sqrt.o build/.libs/k_cos.o build/.libs/k_rem_pio2.o build/.libs/k_sin.o build/.libs/s_atan.o build/.libs/s_copysign.o build/.libs/s_cos.o build/.libs/s_fabs.o build/.libs/s_floor.o build/.libs/s_scalbn.o build/.libs/s_sin.o build/.libs/SDL_power.o build/.libs/SDL_d3dmath.o build/.libs/SDL_render.o build/.libs/SDL_yuv_mmx.o build/.libs/SDL_yuv_sw.o build/.libs/SDL_render_d3d.o build/.libs/SDL_render_d3d11.o build/.libs/SDL_render_gl.o build/.libs/SDL_shaders_gl.o build/.libs/SDL_render_gles.o build/.libs/SDL_render_gles2.o build/.libs/SDL_shaders_gles2.o build/.libs/SDL_render_psp.o build/.libs/SDL_blendfillrect.o build/.libs/SDL_blendline.o build/.libs/SDL_blendpoint.o build/.libs/SDL_drawline.o build/.libs/SDL_drawpoint.o build/.libs/SDL_render_sw.o build/.libs/SDL_rotate.o build/.libs/SDL_getenv.o build/.libs/SDL_iconv.o build/.libs/SDL_malloc.o build/.libs/SDL_qsort.o build/.libs/SDL_stdlib.o build/.libs/SDL_string.o build/.libs/SDL_thread.o build/.libs/SDL_timer.o build/.libs/SDL_RLEaccel.o build/.libs/SDL_blit.o build/.libs/SDL_blit_0.o build/.libs/SDL_blit_1.o build/.libs/SDL_blit_A.o build/.libs/SDL_blit_N.o build/.libs/SDL_blit_auto.o build/.libs/SDL_blit_copy.o build/.libs/SDL_blit_slow.o build/.libs/SDL_bmp.o build/.libs/SDL_clipboard.o build/.libs/SDL_egl.o build/.libs/SDL_fillrect.o build/.libs/SDL_pixels.o build/.libs/SDL_rect.o build/.libs/SDL_shape.o build/.libs/SDL_stretch.o build/.libs/SDL_surface.o build/.libs/SDL_video.o build/.libs/SDL_nullevents.o build/.libs/SDL_nullframebuffer.o build/.libs/SDL_nullvideo.o build/.libs/SDL_diskaudio.o build/.libs/SDL_dummyaudio.o build/.libs/SDL_sysloadso.o build/.libs/SDL_dspaudio.o build/.libs/SDL_x11clipboard.o build/.libs/SDL_x11dyn.o build/.libs/SDL_x11events.o build/.libs/SDL_x11framebuffer.o build/.libs/SDL_x11keyboard.o build/.libs/SDL_x11messagebox.o build/.libs/SDL_x11modes.o build/.libs/SDL_x11mouse.o build/.libs/SDL_x11opengl.o build/.libs/SDL_x11opengles.o build/.libs/SDL_x11shape.o build/.libs/SDL_x11touch.o build/.libs/SDL_x11video.o build/.libs/SDL_x11window.o build/.libs/SDL_x11xinput2.o build/.libs/edid-parse.o build/.libs/imKStoUCS.o build/.libs/SDL_sysjoystick.o build/.libs/SDL_systhread.o build/.libs/SDL_syssem.o build/.libs/SDL_sysmutex.o build/.libs/SDL_syscond.o build/.libs/SDL_systls.o build/.libs/SDL_sysfilesystem.o build/.libs/SDL_systimer.o build/.libs/SDL_syshaptic.o -L/usr/local/lib -lm -lusbhid -lrt -fstack-protector -Wl,--no-undefined -pthread -pthread -Wl,-soname -Wl,libSDL2-2.0.so.0 -o build/.libs/libSDL2-2.0.so.0.2.1 build/.libs/SDL_blit_A.o: In function `BlitRGBtoRGBPixelAlphaMMX3DNOW': /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x219c): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x21a7): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x22f1): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x22fc): undefined reference to `_m_prefetch' /usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2446): undefined reference to `_m_prefetch' build/.libs/SDL_blit_A.o:/usr/ports/devel/sdl20/work/SDL2-2.0.3/src/video/SDL_blit_A.c:(.text+0x2451): more undefined references to `_m_prefetch' follow clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:126: recipe for target 'build/libSDL2.la' failed gmake[2]: *** [build/libSDL2.la] Error 1 gmake[2]: Leaving directory '/usr/ports/devel/sdl20/work/SDL2-2.0.3' *** Error code 1 Stop. make[1]: stopped in /usr/ports/devel/sdl20 *** Error code 1 Stop. make: stopped in /usr/ports/devel/sdl20
(In reply to sasamotikomi from comment #17) > (In reply to Tijl Coosemans from comment #16) > Current version from ports failed to build with Clang36, later I gonna try > this patch. Did you have any luck to get it working with the patch?
(In reply to Tijl Coosemans from comment #16) (In reply to Marcus von Appen from comment #18) Thanks, with patch2 sdl20 build fine, maybe use this patch as global fix, until Clang not fix their 3dnow implementation?
A commit references this bug: Author: mva Date: Sun Jun 14 09:33:31 UTC 2015 New revision: 389620 URL: https://svnweb.freebsd.org/changeset/ports/389620 Log: - Fix 3Dnow (_m_prefetch) support for clang PR: 194861 Reported by: Dmitry Luhtionov (dmitryluhtionov@gmail.com) Submitted by: tijl Changes: head/devel/sdl20/Makefile
Patch committed, thanks for testing!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=2fb0fe4b746ad8c19574907f815dca14675fb7f4 commit 2fb0fe4b746ad8c19574907f815dca14675fb7f4 Author: Dmitry Marakasov <amdmi3@FreeBSD.org> AuthorDate: 2024-04-15 16:22:23 +0000 Commit: Dmitry Marakasov <amdmi3@FreeBSD.org> CommitDate: 2024-04-15 16:58:53 +0000 devel/sdl20: drop no longer needed _m_prefetch patch Required support aws merged with LLVM in 2015: https://github.com/llvm/llvm-project/issues/24022 The port builds fine, including with CPUTYPE=athlon64-sse3 PR: 194861, 278353 [1] Submitted by: diizzy [1] devel/sdl20/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)