Author Topic: Compiling Jo Engine under GCC 7.2.0  (Read 1544 times)

Xavi92

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Compiling Jo Engine under GCC 7.2.0
« on: October 22, 2017, 04:32:17 am »
Hi there,

I heard about your game engine a few days ago thanks to the guys in Sega Saturno forums. As a Linux user, I was a bit puzzled when the README file suggested me to use Wine, so I recompiled GCC version 7.2.0 for the sh-elf target (Jo Engine originally is meant for sh-coff, which seems to be currently deprecated). Surprisingly though, Jo Engine could be easily compiled, but when linking "demo1" against libjoengine.a and SGL libs, GCC complains about not finding "-lc" (standard C library). I haven't extensively read JoEngine's source code, but is it actually supposed to use libc? If so, where can I find an implementation for it?

Thanks for reading.

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #1 on: October 23, 2017, 09:33:20 am »
Hi Xavi92,

I'll check that :)

Xavi92

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #2 on: November 02, 2017, 02:50:25 pm »
Hi,
Any news on this topic? :)

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #3 on: November 02, 2017, 04:00:59 pm »
Can you give me links with your compiled version of GCC ? I will test it asap

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #4 on: November 03, 2017, 07:07:29 am »
Hi, forget the link, I forget that you are a Linux user. I'll try to check this weekend

neoraph

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-0
    • View Profile
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #5 on: February 07, 2018, 05:16:12 am »
Hello  :)

Any news about that question?

I am working on a Mac, and I wonder to use a docker image based on a linux (probably debian) and if I can use the latest gcc, it should be nice :)

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #6 on: February 07, 2018, 08:23:08 am »
Hi, I'm sorry, I don't have enough time to work on the Engine today, but It will change. I hope  :)

mindslight

  • Administrator
  • Full Member
  • *****
  • Posts: 158
  • Karma: +6/-1
    • View Profile
    • Jo Engine
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #7 on: February 18, 2018, 05:04:15 pm »
You have to recompile the standard C library and add the path in your environment.

The library currently used in the project is available here: "Compiler\SH_COFF\sh-coff\sh-coff\lib\libc.a"

If you look closer into the "compile.bat script", you will see paths :

Code: [Select]
SET PATH=%COMPILER_DIR%\SH_COFF\Other Utilities;%COMPILER_DIR%\SH_COFF\sh-coff\bin;%COMPILER_DIR%\TOOLS;%PATH%

You will find in attachement the C library compiled (ELF Format) (old version but enough)

deevus

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-1
    • View Profile
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #8 on: July 29, 2018, 09:19:32 am »
Any luck with this? I'm interested in compiling on linux without wine. However I'm not very familiar with compilation for different targets.

abrasive

  • Newbie
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #9 on: August 02, 2018, 10:42:11 am »
I was able to do this without much fuss with GCC 7.3.0 (sh-none-elf).

You can use the included COFF libc.a. You need to make sure -lc comes after all the $(LIBS) though. In my case I used:

LIBS += -L./lib/joengine/Compiler/SH_COFF/sh-coff/sh-coff/lib/ -lc -Wl,--format=elf32-sh -lgcc

abrasive

  • Newbie
  • *
  • Posts: 2
  • Karma: +1/-0
    • View Profile
Re: Compiling Jo Engine under GCC 7.2.0
« Reply #10 on: August 02, 2018, 10:43:58 am »
I should mention that I also had to patch a few files to handle building on a case-sensitive system -

https://github.com/abrasive/joengine/commit/7e72a5d235e3808f5446fb66d40d393741c3d915

 

Sitemap 1 2 3 4 5 6 7 8 9 10 
SMF spam blocked by CleanTalk