Opened 15 years ago

Closed 15 years ago

Last modified 5 years ago

#6856 closed defect (fixed)

BUG: emulators/dosbox fails to build on Intel Mac

Reported by: jake.hamby@… Owned by: mww@…
Priority: Normal Milestone:
Component: ports Version: 1.0
Keywords: Cc:
Port: dosbox

Description (last modified by ryandesign (Ryan Schmidt))

Since dosbox has some special support for x86 CPUs, it needs to be compiled with the "-mdynamic-no-pic" flag on Intel Macs or else some inline asm will fail to compile. This should also give a (small)performance boost on PPC.

In general, it is beneficial to add "-mdynamic-no-pic" when building performance-sensitive apps on Mac OS X (although you can't use it when building shared libraries), especially on x86, which is register-poor. Here's my Portfile patch for dosbox:

--- Portfile.orig   2005-12-05 01:45:37.000000000 -0800
+++ Portfile    2006-01-26 17:29:27.000000000 -0800
@@ -23,7 +23,7 @@

 configure.args --mandir=${prefix}/share/man --disable-sdltest \
-configure.env  CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib"
+configure.env  CPPFLAGS="-I${prefix}/include" CXXFLAGS="-O2 -mdynamic-no-pic" LDFLAGS="-L${prefix}/lib"

 post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}

Change History (3)

comment:1 Changed 15 years ago by olegb@…

Owner: changed from darwinports-bugs@… to mww@…

please, assign bugs to the ports maintainer.

comment:2 Changed 15 years ago by mww@…

Resolution: fixed
Status: newclosed
Summary: emulators/dosbox fails to build on Intel MacBUG: emulators/dosbox fails to build on Intel Mac

thanks, commited!

comment:3 Changed 5 years ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Port: dosbox added
Note: See TracTickets for help on using tickets.