Recent

Author Topic: [SOLVED] how to turn off PIC on MIPS?  (Read 3151 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11945
  • FPC developer.
Re: how to turn off PIC on MIPS?
« Reply #15 on: July 14, 2024, 05:07:35 pm »
mode settings are mostly set by parameters to the compiler, or in per target defaults.

Sometimes a look in unit options can explain how to set a certain option.

PascalDragon

  • Hero Member
  • *****
  • Posts: 5759
  • Compiler Developer
Re: how to turn off PIC on MIPS?
« Reply #16 on: July 14, 2024, 09:25:26 pm »
because somewhere in
current_settings.moduleswitches it was set to cs_create_pic
only for units....

so, where?

Best case here is to search the compiler's source for cs_create_pic and put a breakpoint (or some kind of debug Writeln) at all Include locations and see which one triggers it.

AND why the MIPS developers leave me alone?

Because there are none. The MIPS port does not have a dedicated maintainer.

Laksen

  • Hero Member
  • *****
  • Posts: 785
    • J-Software
Re: how to turn off PIC on MIPS?
« Reply #17 on: July 14, 2024, 11:01:44 pm »
Also, it's hard to help you since you work in an always unlinked repository.

And if people track it down it doesn't use any of the typical FPC build mechanisms and a lot of hacks

If you are serious about getting support for this, it should be done like other FPC targets, and then maybe people can help

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: how to turn off PIC on MIPS?
« Reply #18 on: July 15, 2024, 11:19:37 am »
great success!!!!

I found this place (surprise) in the MIPS Target.

BUT see:

https://forum.lazarus.freepascal.org/index.php/topic,67888.0.html

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: [SOLVED] how to turn off PIC on MIPS?
« Reply #19 on: July 15, 2024, 03:41:15 pm »
@Laksen:

ok, If You tell me how it is made for other Targets and what I do wrong, I'm than able to make it better :)

thx for help :)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5759
  • Compiler Developer
Re: [SOLVED] how to turn off PIC on MIPS?
« Reply #20 on: July 16, 2024, 09:20:03 pm »
ok, If You tell me how it is made for other Targets and what I do wrong, I'm than able to make it better :)

More or less what is written here. And you should also generate your link script inside the compiler (look at e.g. TLinkerLinux.WriteResponseFile in systems/t_linux.pas). What is not mentioned is excluding your target from the various fpmake.pp inside packages. Though as a first step it would be enough if a make all OS_TARGET=ps1 CPU_TARGET=mips inside the rtl directory works.

 

TinyPortal © 2005-2018