[r3579] Clang fails to build ZDoom

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
MP2E
Posts: 28
Joined: Mon Oct 08, 2007 3:35 pm

[r3579] Clang fails to build ZDoom

Post by MP2E »

Clang fails to build ZDoom due to dumb using a variable named "restrict" which is a reserved keyword, and failing on some inline ASM that GCC uses. This was fixed using the patch below and doesn't effect anything other than compilation with clang.

http://pastebin.com/pvCFxw0U
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm
Contact:

Re: [r3579] Clang fails to build ZDoom

Post by randi »

So clang has progressed enough to be able to compile ZDoom now? That's pretty impressive.
MP2E
Posts: 28
Joined: Mon Oct 08, 2007 3:35 pm

Re: [r3579] Clang fails to build ZDoom

Post by MP2E »

Yep! Works with stable release 3.0 and the 3.1 current svn branch. Not only does it work but it runs well :) Haven't bench-marked it against the GCC build in my linux distribution yet but that's planned.

(By the way, I wrote the post/patch above I just hadn't logged in to the ZDoom forums for a while so I forgot my pass :X)
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: [r3579] Clang fails to build ZDoom

Post by wildweasel »

MP2E wrote:(By the way, I wrote the post/patch above I just hadn't logged in to the ZDoom forums for a while so I forgot my pass :X)
That little "issue" just got corrected, by the way - your post is now properly attributed to you.
MP2E
Posts: 28
Joined: Mon Oct 08, 2007 3:35 pm

Re: [r3579] Clang fails to build ZDoom

Post by MP2E »

Seems I somehow deleted a random line and it was included as part of my patch, creating an error with dumb. Gez found it and fixed it in r1365 of GZDoom, sorry about that.

(Also thanks for attributing the post to me)

EDIT: Also GZDoom builds perfectly now as well with clang
Post Reply

Return to “Closed Bugs [GZDoom]”