mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 06:28:55 +02:00
* RiscV: if shared libraries are involved, we have to link always against the crt*S.o variants
git-svn-id: trunk@48946 -
This commit is contained in:
parent
a399627aee
commit
1e5cbfe546
@ -538,7 +538,13 @@ begin
|
||||
Message1(exec_w_init_file_not_found,'crti.o');
|
||||
|
||||
{ then the crtbegin* }
|
||||
if cs_create_pic in current_settings.moduleswitches then
|
||||
if (cs_create_pic in current_settings.moduleswitches)
|
||||
{$ifdef RISCV}
|
||||
{ on RISC-V we need to use always the *S.o variants
|
||||
if shared libraries are involved }
|
||||
or (not SharedLibFiles.Empty)
|
||||
{$endif RISCV}
|
||||
then
|
||||
begin
|
||||
if librarysearchpath.FindFile('crtbeginS.o',false,s) then
|
||||
AddFileName(s)
|
||||
@ -649,7 +655,13 @@ begin
|
||||
{ objects which must be at the end }
|
||||
if linklibc and (libctype<>uclibc) then
|
||||
begin
|
||||
if cs_create_pic in current_settings.moduleswitches then
|
||||
if (cs_create_pic in current_settings.moduleswitches)
|
||||
{$ifdef RISCV}
|
||||
{ on RISC-V we need to use always the *S.o variants
|
||||
if shared libraries are involved }
|
||||
or linksToSharedLibFiles
|
||||
{$endif RISCV}
|
||||
then
|
||||
begin
|
||||
found1:=librarysearchpath.FindFile('crtendS.o',false,s1);
|
||||
if not(found1) then
|
||||
|
Loading…
Reference in New Issue
Block a user