mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 18:18:31 +02:00
* fixed problem with libprefix at the wrong place
* fixed lib generation with smartlinking and no -CS used
This commit is contained in:
parent
2d765331c1
commit
f002eb11a0
@ -311,7 +311,6 @@ unit files;
|
|||||||
p : dirstr;
|
p : dirstr;
|
||||||
n : NameStr;
|
n : NameStr;
|
||||||
e : ExtStr;
|
e : ExtStr;
|
||||||
s : string;
|
|
||||||
begin
|
begin
|
||||||
stringdispose(objfilename);
|
stringdispose(objfilename);
|
||||||
stringdispose(asmfilename);
|
stringdispose(asmfilename);
|
||||||
@ -320,18 +319,21 @@ unit files;
|
|||||||
stringdispose(sharedlibfilename);
|
stringdispose(sharedlibfilename);
|
||||||
stringdispose(exefilename);
|
stringdispose(exefilename);
|
||||||
stringdispose(path);
|
stringdispose(path);
|
||||||
|
{ Create names }
|
||||||
fsplit(fn,p,n,e);
|
fsplit(fn,p,n,e);
|
||||||
path:=stringdup(FixPath(p));
|
p:=FixPath(p);
|
||||||
s:=FixFileName(FixPath(p)+n);
|
n:=FixFileName(n);
|
||||||
objfilename:=stringdup(s+target_info.objext);
|
{ set path and obj,asm,ppu names }
|
||||||
asmfilename:=stringdup(s+target_info.asmext);
|
path:=stringdup(p);
|
||||||
ppufilename:=stringdup(s+target_info.unitext);
|
objfilename:=stringdup(p+n+target_info.objext);
|
||||||
|
asmfilename:=stringdup(p+n+target_info.asmext);
|
||||||
|
ppufilename:=stringdup(p+n+target_info.unitext);
|
||||||
{ lib and exe could be loaded with a file specified with -o }
|
{ lib and exe could be loaded with a file specified with -o }
|
||||||
if OutputFile<>'' then
|
if OutputFile<>'' then
|
||||||
s:=OutputFile;
|
n:=OutputFile;
|
||||||
staticlibfilename:=stringdup(target_os.libprefix+s+target_os.staticlibext);
|
staticlibfilename:=stringdup(p+target_os.libprefix+n+target_os.staticlibext);
|
||||||
sharedlibfilename:=stringdup(target_os.libprefix+s+target_os.sharedlibext);
|
sharedlibfilename:=stringdup(p+target_os.libprefix+n+target_os.sharedlibext);
|
||||||
exefilename:=stringdup(s+target_os.exeext);
|
exefilename:=stringdup(p+n+target_os.exeext);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -396,7 +398,8 @@ unit files;
|
|||||||
do_compile:=false;
|
do_compile:=false;
|
||||||
if (flags and uf_in_library)=0 then
|
if (flags and uf_in_library)=0 then
|
||||||
begin
|
begin
|
||||||
if (flags and uf_static_linked)<>0 then
|
if ((flags and uf_static_linked)<>0) or
|
||||||
|
((flags and uf_smartlink)<>0) then
|
||||||
begin
|
begin
|
||||||
objfiletime:=getnamedfiletime(staticlibfilename^);
|
objfiletime:=getnamedfiletime(staticlibfilename^);
|
||||||
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
|
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
|
||||||
@ -644,7 +647,11 @@ unit files;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.39 1998-08-25 16:44:16 pierre
|
Revision 1.40 1998-08-26 10:08:48 peter
|
||||||
|
* fixed problem with libprefix at the wrong place
|
||||||
|
* fixed lib generation with smartlinking and no -CS used
|
||||||
|
|
||||||
|
Revision 1.39 1998/08/25 16:44:16 pierre
|
||||||
* openppu was true even if the object file is missing
|
* openppu was true even if the object file is missing
|
||||||
this lead to trying to open a filename without extension
|
this lead to trying to open a filename without extension
|
||||||
and prevented the 'make cycle' to work for win32
|
and prevented the 'make cycle' to work for win32
|
||||||
|
@ -54,11 +54,13 @@ unit pmodules;
|
|||||||
|
|
||||||
{ When creating a library call the linker. And insert the output
|
{ When creating a library call the linker. And insert the output
|
||||||
of the linker files }
|
of the linker files }
|
||||||
if (cs_create_staticlib in aktmoduleswitches) then
|
|
||||||
Linker.MakeStaticLibrary(SmartLinkFilesCnt)
|
|
||||||
else
|
|
||||||
if (cs_create_sharedlib in aktmoduleswitches) then
|
if (cs_create_sharedlib in aktmoduleswitches) then
|
||||||
Linker.MakeSharedLibrary;
|
Linker.MakeSharedLibrary
|
||||||
|
else
|
||||||
|
if (cs_create_staticlib in aktmoduleswitches) or
|
||||||
|
(cs_smartlink in aktmoduleswitches) then
|
||||||
|
Linker.MakeStaticLibrary(SmartLinkFilesCnt);
|
||||||
|
|
||||||
{ add the files for the linker from current_module }
|
{ add the files for the linker from current_module }
|
||||||
Linker.AddModuleFiles(current_module);
|
Linker.AddModuleFiles(current_module);
|
||||||
end;
|
end;
|
||||||
@ -67,14 +69,17 @@ unit pmodules;
|
|||||||
procedure insertobjectfile;
|
procedure insertobjectfile;
|
||||||
{ Insert the used object file for this unit in the used list for this unit }
|
{ Insert the used object file for this unit in the used list for this unit }
|
||||||
begin
|
begin
|
||||||
if (cs_create_staticlib in aktmoduleswitches) then
|
|
||||||
current_module^.linkstaticlibs.insert(current_module^.staticlibfilename^)
|
|
||||||
else
|
|
||||||
if (cs_create_sharedlib in aktmoduleswitches) then
|
if (cs_create_sharedlib in aktmoduleswitches) then
|
||||||
current_module^.linksharedlibs.insert(current_module^.sharedlibfilename^)
|
current_module^.linksharedlibs.insert(current_module^.sharedlibfilename^)
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if (cs_create_staticlib in aktmoduleswitches) or
|
||||||
|
(cs_smartlink in aktmoduleswitches) then
|
||||||
|
current_module^.linkstaticlibs.insert(current_module^.staticlibfilename^)
|
||||||
else
|
else
|
||||||
current_module^.linkofiles.insert(current_module^.objfilename^);
|
current_module^.linkofiles.insert(current_module^.objfilename^);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure insertsegment;
|
procedure insertsegment;
|
||||||
@ -896,7 +901,11 @@ unit pmodules;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.42 1998-08-19 18:04:54 peter
|
Revision 1.43 1998-08-26 10:08:47 peter
|
||||||
|
* fixed problem with libprefix at the wrong place
|
||||||
|
* fixed lib generation with smartlinking and no -CS used
|
||||||
|
|
||||||
|
Revision 1.42 1998/08/19 18:04:54 peter
|
||||||
* fixed current_module^.in_implementation flag
|
* fixed current_module^.in_implementation flag
|
||||||
|
|
||||||
Revision 1.41 1998/08/17 10:10:08 peter
|
Revision 1.41 1998/08/17 10:10:08 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user