[MPlayer-dev-eng] [PATCH] Fix crash when using win32 codecs on mac osx / intel

Ulion ulion2002 at gmail.com
Fri Aug 24 08:50:19 CEST 2007


2007/8/24, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
>
> Well, the problem I have is that if -fno-unit-at-a-time is needed, it
> should be needed on non-Darwin as well, unless it is a bug Apple
> introduced - and the blog post makes it look very much like a bug.
> So I'd stll like to know if someone got it to work without
> -fno-unit-at-a-time with at least some compiler version.
>

Yes, it seems a gcc bug on darwin intel x86.
After test a build without -fno-unit-at-a-time, I found it also seems
work. So maybe now only the -mstackrealign is enough to make the
loader work. I tested with wmv9 video/audio and drv43260.dll codecs
and seems work without problem by now.

 My gcc is i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer,
Inc. build 5367), It comes from XCode 2.4.? I think.

So the new fix is following, or remove the X86 arch limit as Diego said.

Index: loader/Makefile
===================================================================
--- loader/Makefile     (revision 24130)
+++ loader/Makefile     (working copy)
@@ -33,6 +33,12 @@

 CFLAGS+=-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer

+ifeq ($(TARGET_OS),Darwin)
+ifeq ($(ARCH_X86),yes)
+win32.o: CFLAGS += -mstackrealign
+endif
+endif
+
 dshow/test: dshow/test.c $(LIBNAME)
        $(CC) $(CFLAGS) -o $@ $^ -lstdc++

-- 
Ulion



More information about the MPlayer-dev-eng mailing list