MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

casm
Cinematronics > *
Reged: 08/27/07
Posts: 668
Send PM


Link-time optimisations on OS X
#316994 - 11/05/13 10:47 PM


(Late edit: this is under OS X 10.9.0, XCode 5.0.)

Just something I've been wondering about for the past couple of releases: are link-time optimisations unsupported (or broken) on OS X?

Reason I ask is that I've tried turning them on in the makefile, but can't get a build to successfully complete with them enabled. This is from about 0.148 (IIRC) through to 0.151 on a 64-bit target with stock source, no debug or symbols enabled, etc.

I'll have to rebuild to check the exact error that I got under 0.151, but that will have to wait for a bit as I have some disk-intensive stuff running right now that will need at least a couple of hours to finish.

Edited by casm (11/05/13 11:15 PM)



casm
Cinematronics > *
Reged: 08/27/07
Posts: 668
Send PM


And the error is: new [Re: casm]
#317005 - 11/06/13 05:17 AM



Code:

Archiving obj/sdl64/mame/pinball.a...
Archiving obj/sdl64/libemu.a...
Archiving obj/sdl64/mame/mame/liboptional.a...
Linking mame64...
clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)
make: *** [mame64] Error 254



This was with `make -j8`, by the way.

That's all I have on it for now. Still doing disk-intensive stuff, which is likely to need to run overnight.



casm
Cinematronics > *
Reged: 08/27/07
Posts: 668
Send PM


Re: Anyone? new [Re: casm]
#317251 - 11/11/13 08:32 PM


I know it's been a 'fun' few days around here with all of the nine-mile-wide threads going on, but has anyone else run into this one? I'm at a loss to explain it.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Anyone? new [Re: casm]
#317266 - 11/11/13 11:47 PM


> I know it's been a 'fun' few days around here with all of the nine-mile-wide threads
> going on, but has anyone else run into this one? I'm at a loss to explain it.

I can explain it easily: LTO is effectively an experimental feature in Clang right now. (Ditto GCC, but GCC was eliminated in Xcode 5). Both compiler teams' test suites for it consist more or less entirely of building Firefox with it and if no smoke comes out of the computer they mark it as "success". Trying it on MAME is basically taking your life into your own hands.



casm
Cinematronics > *
Reged: 08/27/07
Posts: 668
Send PM


Re: Anyone? new [Re: R. Belmont]
#317275 - 11/12/13 03:07 AM


> I can explain it easily: LTO is effectively an experimental feature in Clang right
> now. (Ditto GCC, but GCC was eliminated in Xcode 5). Both compiler teams' test suites
> for it consist more or less entirely of building Firefox with it and if no smoke
> comes out of the computer they mark it as "success". Trying it on MAME is basically
> taking your life into your own hands.

Cool, thanks. Looks like I really need to start paying more attention to what's going on with clang; work pressures mean that I've been building less and less software directly the past couple of years, so my general knowledge of what's going on with the toolchains has definitely slipped.

Just wanted to make sure that it wasn't something OS X-specific that had crept in. Appreciate the reply.



Matty_
Part-time troll
Reged: 01/25/08
Posts: 730
Send PM


Re: Anyone? new [Re: casm]
#317291 - 11/12/13 10:11 AM


Link-time optimisation is voodoo that's more likely to cause unintended behaviour than to actually improve runtime performance. You pretty much have to turn that shit off even on toolchains that supposedly support it, unless you want the linker to run out of memory and crash, or to produce output that doesn't work. TL;DR sounds nice in theory but show me someone who can actually implement it in a useful way.



R. Belmont
Cuckoo for IGAvania
Reged: 09/21/03
Posts: 9716
Loc: ECV-197 The Orville
Send PM


Re: Anyone? new [Re: Matty_]
#317301 - 11/12/13 08:47 PM


> Link-time optimisation is voodoo that's more likely to cause unintended behaviour
> than to actually improve runtime performance. You pretty much have to turn that shit
> off even on toolchains that supposedly support it, unless you want the linker to run
> out of memory and crash, or to produce output that doesn't work. TL;DR sounds nice in
> theory but show me someone who can actually implement it in a useful way.

Yeah. MSVC has arguably the most stable implementation of it and even then it's not quite solid.


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 578 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 1541