mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-05-30 20:22:32 +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;
|
||||
n : NameStr;
|
||||
e : ExtStr;
|
||||
s : string;
|
||||
begin
|
||||
stringdispose(objfilename);
|
||||
stringdispose(asmfilename);
|
||||
@ -320,18 +319,21 @@ unit files;
|
||||
stringdispose(sharedlibfilename);
|
||||
stringdispose(exefilename);
|
||||
stringdispose(path);
|
||||
{ Create names }
|
||||
fsplit(fn,p,n,e);
|
||||
path:=stringdup(FixPath(p));
|
||||
s:=FixFileName(FixPath(p)+n);
|
||||
objfilename:=stringdup(s+target_info.objext);
|
||||
asmfilename:=stringdup(s+target_info.asmext);
|
||||
ppufilename:=stringdup(s+target_info.unitext);
|
||||
p:=FixPath(p);
|
||||
n:=FixFileName(n);
|
||||
{ set path and obj,asm,ppu names }
|
||||
path:=stringdup(p);
|
||||
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 }
|
||||
if OutputFile<>'' then
|
||||
s:=OutputFile;
|
||||
staticlibfilename:=stringdup(target_os.libprefix+s+target_os.staticlibext);
|
||||
sharedlibfilename:=stringdup(target_os.libprefix+s+target_os.sharedlibext);
|
||||
exefilename:=stringdup(s+target_os.exeext);
|
||||
n:=OutputFile;
|
||||
staticlibfilename:=stringdup(p+target_os.libprefix+n+target_os.staticlibext);
|
||||
sharedlibfilename:=stringdup(p+target_os.libprefix+n+target_os.sharedlibext);
|
||||
exefilename:=stringdup(p+n+target_os.exeext);
|
||||
end;
|
||||
|
||||
|
||||
@ -396,7 +398,8 @@ unit files;
|
||||
do_compile:=false;
|
||||
if (flags and uf_in_library)=0 then
|
||||
begin
|
||||
if (flags and uf_static_linked)<>0 then
|
||||
if ((flags and uf_static_linked)<>0) or
|
||||
((flags and uf_smartlink)<>0) then
|
||||
begin
|
||||
objfiletime:=getnamedfiletime(staticlibfilename^);
|
||||
if (ppufiletime<0) or (objfiletime<0) or (ppufiletime>objfiletime) then
|
||||
@ -644,7 +647,11 @@ unit files;
|
||||
end.
|
||||
{
|
||||
$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
|
||||
this lead to trying to open a filename without extension
|
||||
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
|
||||
of the linker files }
|
||||
if (cs_create_staticlib in aktmoduleswitches) then
|
||||
Linker.MakeStaticLibrary(SmartLinkFilesCnt)
|
||||
if (cs_create_sharedlib in aktmoduleswitches) then
|
||||
Linker.MakeSharedLibrary
|
||||
else
|
||||
if (cs_create_sharedlib in aktmoduleswitches) then
|
||||
Linker.MakeSharedLibrary;
|
||||
if (cs_create_staticlib in aktmoduleswitches) or
|
||||
(cs_smartlink in aktmoduleswitches) then
|
||||
Linker.MakeStaticLibrary(SmartLinkFilesCnt);
|
||||
|
||||
{ add the files for the linker from current_module }
|
||||
Linker.AddModuleFiles(current_module);
|
||||
end;
|
||||
@ -67,13 +69,16 @@ unit pmodules;
|
||||
procedure insertobjectfile;
|
||||
{ Insert the used object file for this unit in the used list for this unit }
|
||||
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^)
|
||||
else
|
||||
current_module^.linkofiles.insert(current_module^.objfilename^);
|
||||
begin
|
||||
if (cs_create_staticlib in aktmoduleswitches) or
|
||||
(cs_smartlink in aktmoduleswitches) then
|
||||
current_module^.linkstaticlibs.insert(current_module^.staticlibfilename^)
|
||||
else
|
||||
current_module^.linkofiles.insert(current_module^.objfilename^);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -896,7 +901,11 @@ unit pmodules;
|
||||
end.
|
||||
{
|
||||
$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
|
||||
|
||||
Revision 1.41 1998/08/17 10:10:08 peter
|
||||
|
Loading…
Reference in New Issue
Block a user