Bug 164243 - [PATCH] emulators/dosbox: Fix build with clang
Summary: [PATCH] emulators/dosbox: Fix build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Martin Wilke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 15:10 UTC by Yuri Pankov
Modified: 2012-05-25 17:00 UTC (History)
1 user (show)

See Also:


Attachments
dosbox-0.74_1.patch (542 bytes, patch)
2012-01-17 15:10 UTC, Yuri Pankov
no flags Details | Diff
src__cpu__core_dynrec__risc_x64.h.diff (629 bytes, patch)
2012-01-17 22:29 UTC, Yuri Pankov
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Pankov 2012-01-17 15:10:12 UTC
Fix build with clang by using -O0 (I had a patch fixing compilation
with higher optimization levels, but dosbox would hang indefinitely
using dynamic core if compiled with -O1 or higher).

Port maintainer (knyght@gmail.com) is cc'd.

Generated with FreeBSD Port Tools 0.99
Comment 1 Edwin Groothuis freebsd_committer 2012-01-17 15:10:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->miwi

miwi@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2012-01-17 15:10:29 UTC
Maintainer of emulators/dosbox,

Please note that PR ports/164243 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/164243

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer 2012-01-17 15:10:31 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Tom Carrick 2012-01-17 17:54:56 UTC
Hi,

Thanks for this.

I've had a word with one of the devs. From the info you've given he
isn't sure if it's a problem with DOSBox or with clang.

Can you reply with the patch you made (even if it breaks things) and
the relevant compiler output?
I'm concerned that disabling optimisation (even if only for clang) is
not the right way to fix this for such a resource-hungry program.

Thanks,
Tom
Comment 5 Yuri Pankov 2012-01-17 22:29:58 UTC
Sure.

These are errors from svn trunk as they are more informative (exactly
the same with ports' version):
cpu/libcpu.a(core_dynrec.o): In function `CreateCacheBlock(CodePageHandlerDynRec*, unsigned int, unsigned long)':
/home/yuri/dosbox/src/cpu/./core_dynrec/risc_x64.h:88: relocation truncated to fit: R_X86_64_32S against symbol `Segs' defined in .bss section in cpu/libcpu.a(cpu.o)
/home/yuri/dosbox/src/cpu/./core_dynrec/risc_x64.h:88: relocation truncated to fit: R_X86_64_32S against symbol `cpu_regs' defined in .bss section in cpu/libcpu.a(cpu.o)
/home/yuri/dosbox/src/cpu/./core_dynrec/risc_x64.h:88: relocation truncated to fit: R_X86_64_32S against symbol `cpu_regs' defined in .bss section in cpu/libcpu.a(cpu.o)

Patch attached (I'm pretty sure I've broken the logic there but that's
the best I could come with).


Yuri
Comment 6 Tom Carrick 2012-01-19 11:08:24 UTC
Thanks.

The devs are looking into it.

I'll get back to you if/when I hear back from them.

Otherwise I'll chase up in a week or two and depending on how things
go I'll try to decide if your original Makefile patch is a good
interim fix.

Tom
Comment 7 Martin Wilke freebsd_committer 2012-03-04 06:32:40 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 8 Martin Wilke freebsd_committer 2012-03-04 06:32:56 UTC
State Changed
From-To: open->feedback

tom any news here?
Comment 9 Tom Carrick 2012-03-06 19:13:08 UTC
Yes, this doesn't seem to be a very high priority for the devs, so I
think the patch is okay for now, but would be nice to include a
warning that the performance may be affected.
Comment 10 Martin Wilke freebsd_committer 2012-05-25 16:50:45 UTC
State Changed
From-To: feedback->closed

Committed. Thanks!
Comment 11 dfilter service freebsd_committer 2012-05-25 16:50:58 UTC
miwi        2012-05-25 15:50:37 UTC

  FreeBSD ports repository

  Added files:
    emulators/dosbox/files patch-src-cpu_core_dynrec_risc_x64.h 
  Log:
  - Fix build with clang
  
  PR:             164243
  Submitted by:   Yuri Pankov <yuri.pankov@gmail.com>
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.1       +14 -0     ports/emulators/dosbox/files/patch-src-cpu_core_dynrec_risc_x64.h (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"