mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 13:29:27 +02:00
+ external dll_name name func support for linux
This commit is contained in:
parent
f8dd60e004
commit
484da4b465
@ -852,11 +852,11 @@ unit files;
|
||||
used_units.done;
|
||||
used_units.init;
|
||||
linkofiles.done;
|
||||
linkofiles.init;
|
||||
linkofiles.init_no_double;
|
||||
linkstaticlibs.done;
|
||||
linkstaticlibs.init;
|
||||
linkstaticlibs.init_no_double;
|
||||
linksharedlibs.done;
|
||||
linksharedlibs.init;
|
||||
linksharedlibs.init_no_double;
|
||||
uses_imports:=false;
|
||||
do_assemble:=false;
|
||||
do_compile:=false;
|
||||
@ -912,9 +912,9 @@ unit files;
|
||||
setfilename(p+n,true);
|
||||
used_units.init;
|
||||
new(sourcefiles,init);
|
||||
linkofiles.init;
|
||||
linkstaticlibs.init;
|
||||
linksharedlibs.init;
|
||||
linkofiles.init_no_double;
|
||||
linkstaticlibs.init_no_double;
|
||||
linksharedlibs.init_no_double;
|
||||
ppufile:=nil;
|
||||
scanner:=nil;
|
||||
map:=nil;
|
||||
@ -1022,7 +1022,10 @@ unit files;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.65 1998-10-15 12:22:25 pierre
|
||||
Revision 1.66 1998-10-19 18:07:11 peter
|
||||
+ external dll_name name func support for linux
|
||||
|
||||
Revision 1.65 1998/10/15 12:22:25 pierre
|
||||
* close include files immediately after end reading
|
||||
instead of waiting until unit compilation ended !
|
||||
|
||||
|
@ -66,6 +66,7 @@ uses
|
||||
,os2_targ
|
||||
,win_targ
|
||||
{$endif}
|
||||
,lin_targ
|
||||
;
|
||||
|
||||
{****************************************************************************
|
||||
@ -81,6 +82,7 @@ begin
|
||||
lab:=nil;
|
||||
end;
|
||||
|
||||
|
||||
destructor timported_procedure.done;
|
||||
begin
|
||||
stringdispose(name);
|
||||
@ -99,6 +101,7 @@ begin
|
||||
imported_procedures:=new(plinkedlist,init);
|
||||
end;
|
||||
|
||||
|
||||
destructor timportlist.done;
|
||||
begin
|
||||
dispose(imported_procedures,done);
|
||||
@ -147,24 +150,32 @@ end;
|
||||
|
||||
procedure InitImport;
|
||||
begin
|
||||
{$ifdef i386}
|
||||
case target_info.target of
|
||||
{$ifdef i386}
|
||||
target_i386_Linux :
|
||||
importlib:=new(pimportliblinux,Init);
|
||||
target_i386_Win32 :
|
||||
importlib:=new(pimportlibwin32,Init);
|
||||
target_i386_OS2 :
|
||||
importlib:=new(pimportlibos2,Init);
|
||||
{$endif i386}
|
||||
{$ifdef m68k}
|
||||
target_m68k_Linux :
|
||||
importlib:=new(pimportliblinux,Init);
|
||||
{$endif m68k}
|
||||
else
|
||||
importlib:=new(pimportlib,Init);
|
||||
end;
|
||||
{$else i386}
|
||||
importlib:=new(pimportlib,Init);
|
||||
{$endif i386}
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.7 1998-10-19 15:41:02 peter
|
||||
Revision 1.8 1998-10-19 18:07:12 peter
|
||||
+ external dll_name name func support for linux
|
||||
|
||||
Revision 1.7 1998/10/19 15:41:02 peter
|
||||
* better splitname to support glib-1.1.dll alike names
|
||||
|
||||
Revision 1.6 1998/10/13 13:10:17 peter
|
||||
|
70
compiler/lin_targ.pas
Normal file
70
compiler/lin_targ.pas
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
$Id$
|
||||
Copyright (c) 1998 by Florian Klaempfl
|
||||
|
||||
This unit implements some support routines for the linux target like
|
||||
import/export handling
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
****************************************************************************
|
||||
}
|
||||
unit lin_targ;
|
||||
interface
|
||||
|
||||
uses import;
|
||||
|
||||
type
|
||||
pimportliblinux=^timportliblinux;
|
||||
timportliblinux=object(timportlib)
|
||||
procedure preparelib(const s:string);virtual;
|
||||
procedure importprocedure(const func,module:string;index:longint;const name:string);virtual;
|
||||
procedure generatelib;virtual;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
strings,cobjects,systems,globals,
|
||||
files,aasm,symtable;
|
||||
|
||||
|
||||
procedure timportliblinux.preparelib(const s : string);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure timportliblinux.importprocedure(const func,module : string;index : longint;const name : string);
|
||||
begin
|
||||
{ insert sharedlibrary }
|
||||
current_module^.linksharedlibs.insert(SplitName(module));
|
||||
{ do nothing with the procedure, only set the mangledname }
|
||||
aktprocsym^.definition^.setmangledname(name);
|
||||
end;
|
||||
|
||||
|
||||
procedure timportliblinux.generatelib;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 1998-10-19 18:07:13 peter
|
||||
+ external dll_name name func support for linux
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user