News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Building on ARM

Started by lesnewell, October 18, 2019, 07:01:45 PM

Previous topic - Next topic

lesnewell

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.

stahta01

#1
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

lesnewell

Sorry, configure and make.

stahta01

#3
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

lesnewell

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. It seems to cover most common architectures.

Pecan

#5
The LOGGING #define was accidentally left in the 'debug' target of KeyBinder.
I'll remove the target.

Fixed At revision: 11880

stahta01

Quote from: 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. 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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]