Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old August 20, 2015, 08:39   #11
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
Not producing gmon.out for me. Where did you put the -g -pg flags?
Can't anwser for fizzix, but I think you'll need to supply both "-g -pg" to the compiler (aka via CFLAGS) and probably also to the linker (LDFLAGS? I seem to recall there was some wonkiness with the makefiles around the use of the linker. The makefile seems to be using a separate linked step whereas it should probably just use the "gcc" frontend to perform the linking. That would make this and the use of "sanitize" flags a lot easier.)
AnonymousHero is offline   Reply With Quote
Old August 20, 2015, 18:16   #12
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,002
fizzix is on a distinguished road
Hmm, I'm not getting a gmon.out on OpenSuse either, maybe AnonymousHero's advice will work, I'm sort of flailing wildly. (I also can't compile latest master branch on OpenSuse, although earlier ones appear to work. Don't know why)

I'll check on windows when I get home.
fizzix is offline   Reply With Quote
Old August 20, 2015, 23:38   #13
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,841
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by AnonymousHero View Post
Can't anwser for fizzix, but I think you'll need to supply both "-g -pg" to the compiler (aka via CFLAGS) and probably also to the linker (LDFLAGS? I seem to recall there was some wonkiness with the makefiles around the use of the linker. The makefile seems to be using a separate linked step whereas it should probably just use the "gcc" frontend to perform the linking. That would make this and the use of "sanitize" flags a lot easier.)
Awesome, thank you.

For anyone else doing this on Linux, I just did this:
Code:
CFLAGS += -g -pg -I. -std=c99 -Wdeclaration-after-statement -O0
LDFLAGS += -g -pg
in src/Makefile.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.

Last edited by Nick; January 24, 2016 at 01:38. Reason: Wrong makefile
Nick is offline   Reply With Quote
Old August 22, 2015, 01:14   #14
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,367
AnonymousHero is on a distinguished road
Quote:
Originally Posted by Nick View Post
Awesome, thank you.

For anyone else doing this on Linux, I just did this:
Code:
CFLAGS += -g -pg -I. -std=c99 -Wdeclaration-after-statement -O0
LDFLAGS += -g -pg
in Makefile.src.
BONUS!

(I still mean the thing about the makefile being semi-broken about linking[1], though).

[1] If you're doing -fsanitize-ANYTHING, you're not going to be happy. The thing is that the "ld" flags are hidously complicated and non-cross-platform. You want to just say "cc -o blah *.o". Ask me for details.
AnonymousHero is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reviving Iso-Angband, an isometric view addon for Angband Hajo Development 111 August 3, 2014 20:44


All times are GMT +1. The time now is 04:49.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.