Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: lesnewell on October 18, 2019, 07:01:45 pm

Title: Building on ARM
Post by: lesnewell on October 18, 2019, 07:01:45 pm
I'm trying to build codeblocks on ARM (Raspberry Pi) using a recent SVN version.

A lot of the contrib plugins have this code:
#if defined(LOGGING)
 #define LOGGING 1
 #undef LOGIT
 #define LOGIT wxLogMessage
 #define TRAP asm("int3")
#endif

int3 is an x86 instruction so the compiler chokes. I can't see anywhere obvious where I can undefine LOGGING.
Title: Re: Building on ARM
Post by: stahta01 on October 18, 2019, 09:42:47 pm
Building using what method?

CB Projects or configure/make?

If CB Projects, remove the define of "LOGGING" and maybe add the define of "NO_LOGGING".

Tim S.
Title: Re: Building on ARM
Post by: lesnewell on October 18, 2019, 11:27:04 pm
Sorry, configure and make.
Title: Re: Building on ARM
Post by: stahta01 on October 18, 2019, 11:48:27 pm
Patch that comments out the TRAP defines. I see no where that TRAP define is used!

Edit: I did see another asm command that I did not try to fix; you will likely have to skip building that plugin or ask someone else how to fix it.

Tim S.
Title: Re: Building on ARM
Post by: lesnewell on October 19, 2019, 08:59:33 am
Hmm, that TRAP must be being used somewhere otherwise the compiler would ignore it. Maybe something like this would be a more elegant solution https://github.com/scottt/debugbreak/blob/master/debugbreak.h (https://github.com/scottt/debugbreak/blob/master/debugbreak.h). It seems to cover most common architectures.
Title: Re: Building on ARM
Post by: Pecan on October 19, 2019, 07:16:04 pm
The LOGGING #define was accidentally left in the 'debug' target of KeyBinder.
I'll remove the target.

Fixed At revision: 11880
Title: Re: Building on ARM
Post by: stahta01 on October 19, 2019, 10:22:24 pm
Hmm, that TRAP must be being used somewhere otherwise the compiler would ignore it. Maybe something like this would be a more elegant solution https://github.com/scottt/debugbreak/blob/master/debugbreak.h (https://github.com/scottt/debugbreak/blob/master/debugbreak.h). It seems to cover most common architectures.

I am guessing it is used; but, I still have no idea where it is used.

Tim S.