[fpc-pascal] mips cross compiler libraries (and crti.o) problem
Luca Olivetti
luca at ventoso.org
Tue Oct 9 00:39:19 CEST 2018
El 8/10/18 a les 16:25, Luca Olivetti ha escrit:
> 3) putting in the PATH a custom mips-gnu-linux-ld that adds an
> --rpath=/home/luca/mipslibs/ before calling ld [*]
Duh, instead of --rpath I used --library-path and it got me further
Free Pascal Compiler version 3.0.4 [2018/10/07] for mips
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for MIPSEB
Compiling lgmounter.pas
Assembling lgmounter
Linking lgmounter
/usr/bin/mips-linux-gnu-ld: warning: link.res contains output sections;
did you forget -T?
/usr/bin/mips-linux-gnu-ld: skipping incompatible
/usr/lib/x86_64-linux-gnu/crti.o when searching for
/usr/lib/x86_64-linux-gnu/crti.o
/usr/bin/mips-linux-gnu-ld: cannot find /usr/lib/x86_64-linux-gnu/crti.o
lgmounter.pas(274) Error: Error while linking
lgmounter.pas(274) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Then I modified link.res to reference crti.o
$ mips-linux-gnu-ld link.res
/usr/bin/mips-linux-gnu-ld: warning: link.res contains output sections;
did you forget -T?
/usr/bin/mips-linux-gnu-ld: skipping incompatible
/usr/lib/x86_64-linux-gnu/crtn.o when searching for
/usr/lib/x86_64-linux-gnu/crtn.o
/usr/bin/mips-linux-gnu-ld: cannot find /usr/lib/x86_64-linux-gnu/crtn.o
Did the same for crtn.o
$ mips-linux-gnu-ld link.res
/usr/bin/mips-linux-gnu-ld: warning: link.res contains output sections;
did you forget -T?
/usr/bin/mips-linux-gnu-ld: /home/luca/mipslibs/crti.o: warning: linking
abicalls files with non-abicalls files
/usr/bin/mips-linux-gnu-ld: Warning: a.out uses -mhard-float (set by
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/cprt0.o),
/home/luca/mipslibs/crtbegin.o uses -msoft-float
/usr/bin/mips-linux-gnu-ld: lgmounter.o: warning: linking abicalls files
with non-abicalls files
/usr/bin/mips-linux-gnu-ld: synaser.o: warning: linking abicalls files
with non-abicalls files
/usr/bin/mips-linux-gnu-ld: synafpc.o: warning: linking abicalls files
with non-abicalls files
/usr/bin/mips-linux-gnu-ld: synautil.o: warning: linking abicalls files
with non-abicalls files
/usr/bin/mips-linux-gnu-ld: Warning: a.out uses -mhard-float (set by
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/cprt0.o),
/home/luca/mipslibs/crtend.o uses -msoft-float
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/cprt0.o: In function `_start':
(.text+0x60): undefined reference to `__libc_csu_init'
(.text+0x64): undefined reference to `__libc_csu_fini'
(.text+0x74): undefined reference to `__libc_start_main'
lgmounter.o: In function `P$LGMOUNTER_$$_LOG$ANSISTRING':
lgmounter.pas:(.text.n_p$lgmounter_$$_log$ansistring+0x9c): undefined
reference to `syslog'
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/dynlibs.o: In function
`DYNLIBS_$$_DOLOADLIBRARY$RAWBYTESTRING$$LONGINT':
dynlibs.pas:(.text.n_dynlibs_$$_doloadlibrary$rawbytestring$$longint+0x28):
undefined reference to `dlopen'
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/dynlibs.o: In function
`DYNLIBS_$$_GETPROCEDUREADDRESS$LONGINT$ANSISTRING$$POINTER':
dynlibs.pas:(.text.n_dynlibs_$$_getprocedureaddress$longint$ansistring$$pointer+0x24):
undefined reference to `dlsym'
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/dynlibs.o: In function
`DYNLIBS_$$_UNLOADLIBRARY$LONGINT$$BOOLEAN':
dynlibs.pas:(.text.n_dynlibs_$$_unloadlibrary$longint$$boolean+0x18):
undefined reference to `dlclose'
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/dynlibs.o: In function
`DYNLIBS_$$_GETLOADERRORSTR$$SHORTSTRING':
dynlibs.pas:(.text.n_dynlibs_$$_getloaderrorstr$$shortstring+0x20):
undefined reference to `dlerror'
/usr/local/lib/fpc/3.0.4/units/mips-linux/rtl/dl.o: In function
`DL_$$_UNIXGETMODULEBYADDR$POINTER$POINTER$OPENSTRING':
dl.pp:(.text.n_dl_$$_unixgetmodulebyaddr$pointer$pointer$openstring+0x60):
undefined reference to `dladdr'
Bye
--
Luca
More information about the fpc-pascal
mailing list