Welcome, Guest
Username: Password: Remember me
CodeTyphon Cross-Build Development, discussions and problems
  • Page:
  • 1

TOPIC:

mipsel-linux cross compiler C library type 10 years 2 months ago #5073

  • Ermo
  • Ermo's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 11
  • Thank you received: 2
Hi,

I have question about cross compiler C library.
Seems that CT gnu toolchain uses glibc but I need uClibc
I think there is different C library because CT compiler generates linking errors:

c:\codetyphon\fpc\bin\i386-win32\mipsel-linux-ld.exe: warning: link.res contains output sections; did you forget -T?
.\librayd\/libctest5.so: undefined reference to `__divdf3@GCC_3.0'
.\librayd\/libctest5.so: undefined reference to `__adddf3@GCC_3.0'


program itself is very simple test, shared library is wroted in C and also tested in mipsel based openwrt-linux router.

C library code:
double mean(double a, double b)
{
return (a+b) / 2;
}

my pascal test program:
program static_lib;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes
  { you can add units after this };

const my_lib = 'libctest5.so';

  function mean(a: double; b:double): double; cdecl; external my_lib;

begin
  WriteLn('Library linkimise test.Kalkuleerib library', mean(100,45));
end. 



Is there a way to build cross compiler using different C library?

Regards

Ermo

Please Log in or Create an account to join the conversation.

Last edit: by Ermo.

mipsel-linux cross compiler C library type 10 years 2 months ago #5075

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4506
  • Thank you received: 1100
My suggestion (untested) is:
Replace mingw32.7z or mingw64.7z (GCC 4.7.2) with GCC 3.x version and
try to build toolchain with CT toolchains Builder dialog
or
rebuild your C/C++ library with CT GCC 4.7.2
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.
  • Page:
  • 1