Forum > FPC development

[SOLVED] how to turn off PIC on MIPS?

<< < (2/5) > >>

Key-Real:
this doesn't work :(


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$SMARTLINK OFF}{$PIC OFF}unit si_prc;interface implementation procedure PascalMain; external name 'PASCALMAIN';  { this function must be the first in this unit which contains code }function _FPC_proc_start: longint; cdecl; public name '_start';begin                PascalMain;end;  beginend. 
is compiled:


--- Code: ASM  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---        .file "si_prc.pp"        .module nomips16# Begin asmlist al_procedures .section .text,"ax"        .balign 4.globl  SI_PRC_$$__FPC_PROC_START$$LONGINTSI_PRC_$$__FPC_PROC_START$$LONGINT:.globl  _start_start:.ent SI_PRC_$$__FPC_PROC_START$$LONGINT        .set    nomips16        .frame  $sp,112,$ra        .mask   0xC0000000,-44        .fmask  0x00000000,0        .set    noreorder        .set    nomacro        addiu   $sp,$sp,-112        sw      $ra,68($sp)        sw      $fp,64($sp)        addiu   $fp,$sp,112# Using PIC code for a_call_name        lui     $gp,%hi(_gp)        addiu   $gp,$gp,%lo(_gp)        lw      $t9,%call16(PASCALMAIN)($gp)        jalr    $t9        nop        lw      $fp,64($sp)        lw      $ra,68($sp)        jr      $ra        addiu   $sp,$sp,112        .set    macro        .set    reorder.end SI_PRC_$$__FPC_PROC_START$$LONGINT# End asmlist al_procedures 
with PIC code!

dbannon:
The point is Key-Real, PIC is off by default, you turn it ON with either -Cg or the define tetrastes pointed to.

So, you should be looking for where, in your code (?) its turned on.  Unless there is some difference with mips ?? Seems unlikely.

Davo

Key-Real:
I'm trying to see where it is turned ON,

but I can't find it... there is a lots of code.

someone hints?

dbannon:
Hmm, I guess it has to that directive that tetrastes pointed to. So, search the source dir for "PIC" ?

If you are on linux, cd to top of source tree and type

$> grep -niR PIC *

I guess there must be some way to search all the code on Windows but I am not the person to ask I am afraid.

Have all the units been rebuilt ?  I am not sure if you are using Lazarus here, "clean up and build" would be good. If not, maybe blow away the lib dir in the source dir ?

Have you tried a simple hello world app ?  Just to be sure the basics are working ?

Davo

Key-Real:
I use SublimeText, so I am making a full search on the whole compiler folder....

It is a lot code to go through.

Yes my hello world binary is compiled whitout PIC, only the units :(


I'm under Linux

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version