[MacPorts] #6856: BUG: emulators/dosbox fails to build on Intel Mac
MacPorts
noreply at macports.org
Thu Mar 24 07:17:47 PDT 2016
#6856: BUG: emulators/dosbox fails to build on Intel Mac
---------------------------+--------------------
Reporter: jake.hamby@… | Owner: mww@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version: 1.0
Resolution: fixed | Keywords:
Port: dosbox |
---------------------------+--------------------
Changes (by ryandesign@…):
* port: => dosbox
Old description:
> 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 \
> --disable-alsatest
> -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}
New description:
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 \
--disable-alsatest
-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}
}}}
--
--
Ticket URL: <https://trac.macports.org/ticket/6856#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list