mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 10:19:30 +02:00
put #ifdef TARGETOS / #endif around the gcclib section, otherwise the various host paths can cause a hard to debug mess during crosscompiling in some cases
git-svn-id: trunk@42243 -
This commit is contained in:
parent
5d4af28c0f
commit
25878f9eb2
@ -281,6 +281,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
end; {case}
|
||||
|
||||
{ ifdef everything above related to the target OS otherwise host linker/clib paths can leak
|
||||
into the target while cross-ing, and cause nonworking executables (Darwin-x86_64 to ARM-Linux
|
||||
for example on my setup), and while it's advised to use -n when crosscompiling, it can
|
||||
cause hard to identify issues if -n is forgotten... (KB) }
|
||||
if result <> '' then
|
||||
result := '#ifdef ' + BuildOSTarget + LineEnding +
|
||||
result + LineEnding +
|
||||
'#endif' + LineEnding;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user