mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 03:09:11 +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.done;
|
||||||
used_units.init;
|
used_units.init;
|
||||||
linkofiles.done;
|
linkofiles.done;
|
||||||
linkofiles.init;
|
linkofiles.init_no_double;
|
||||||
linkstaticlibs.done;
|
linkstaticlibs.done;
|
||||||
linkstaticlibs.init;
|
linkstaticlibs.init_no_double;
|
||||||
linksharedlibs.done;
|
linksharedlibs.done;
|
||||||
linksharedlibs.init;
|
linksharedlibs.init_no_double;
|
||||||
uses_imports:=false;
|
uses_imports:=false;
|
||||||
do_assemble:=false;
|
do_assemble:=false;
|
||||||
do_compile:=false;
|
do_compile:=false;
|
||||||
@ -912,9 +912,9 @@ unit files;
|
|||||||
setfilename(p+n,true);
|
setfilename(p+n,true);
|
||||||
used_units.init;
|
used_units.init;
|
||||||
new(sourcefiles,init);
|
new(sourcefiles,init);
|
||||||
linkofiles.init;
|
linkofiles.init_no_double;
|
||||||
linkstaticlibs.init;
|
linkstaticlibs.init_no_double;
|
||||||
linksharedlibs.init;
|
linksharedlibs.init_no_double;
|
||||||
ppufile:=nil;
|
ppufile:=nil;
|
||||||
scanner:=nil;
|
scanner:=nil;
|
||||||
map:=nil;
|
map:=nil;
|
||||||
@ -1022,7 +1022,10 @@ unit files;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* close include files immediately after end reading
|
||||||
instead of waiting until unit compilation ended !
|
instead of waiting until unit compilation ended !
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ uses
|
|||||||
,os2_targ
|
,os2_targ
|
||||||
,win_targ
|
,win_targ
|
||||||
{$endif}
|
{$endif}
|
||||||
|
,lin_targ
|
||||||
;
|
;
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -81,6 +82,7 @@ begin
|
|||||||
lab:=nil;
|
lab:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor timported_procedure.done;
|
destructor timported_procedure.done;
|
||||||
begin
|
begin
|
||||||
stringdispose(name);
|
stringdispose(name);
|
||||||
@ -99,6 +101,7 @@ begin
|
|||||||
imported_procedures:=new(plinkedlist,init);
|
imported_procedures:=new(plinkedlist,init);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor timportlist.done;
|
destructor timportlist.done;
|
||||||
begin
|
begin
|
||||||
dispose(imported_procedures,done);
|
dispose(imported_procedures,done);
|
||||||
@ -147,24 +150,32 @@ end;
|
|||||||
|
|
||||||
procedure InitImport;
|
procedure InitImport;
|
||||||
begin
|
begin
|
||||||
{$ifdef i386}
|
|
||||||
case target_info.target of
|
case target_info.target of
|
||||||
|
{$ifdef i386}
|
||||||
|
target_i386_Linux :
|
||||||
|
importlib:=new(pimportliblinux,Init);
|
||||||
target_i386_Win32 :
|
target_i386_Win32 :
|
||||||
importlib:=new(pimportlibwin32,Init);
|
importlib:=new(pimportlibwin32,Init);
|
||||||
target_i386_OS2 :
|
target_i386_OS2 :
|
||||||
importlib:=new(pimportlibos2,Init);
|
importlib:=new(pimportlibos2,Init);
|
||||||
|
{$endif i386}
|
||||||
|
{$ifdef m68k}
|
||||||
|
target_m68k_Linux :
|
||||||
|
importlib:=new(pimportliblinux,Init);
|
||||||
|
{$endif m68k}
|
||||||
else
|
else
|
||||||
importlib:=new(pimportlib,Init);
|
importlib:=new(pimportlib,Init);
|
||||||
end;
|
end;
|
||||||
{$else i386}
|
|
||||||
importlib:=new(pimportlib,Init);
|
|
||||||
{$endif i386}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* better splitname to support glib-1.1.dll alike names
|
||||||
|
|
||||||
Revision 1.6 1998/10/13 13:10:17 peter
|
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