Author Topic: Building on ARM  (Read 428 times)

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 43
Building on ARM
« 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6664
    • My Best Post
Re: Building on ARM
« Reply #1 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.
« Last Edit: October 18, 2019, 09:52:22 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 43
Re: Building on ARM
« Reply #2 on: October 18, 2019, 11:27:04 pm »
Sorry, configure and make.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6664
    • My Best Post
Re: Building on ARM
« Reply #3 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.
« Last Edit: October 18, 2019, 11:52:59 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline lesnewell

  • Multiple posting newcomer
  • *
  • Posts: 43
Re: Building on ARM
« Reply #4 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.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2177
Re: Building on ARM
« Reply #5 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
« Last Edit: October 19, 2019, 07:26:18 pm by Pecan »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6664
    • My Best Post
Re: Building on ARM
« Reply #6 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. 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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org