[fpc-devel]Smartlinking in the BeOS port of FPK 1.0.8

BiPolar BiPolar at SoftHome.net
Fri Sep 26 04:35:52 CEST 2003

Hello guys. My name is Oscar Lesta, from Argentina.
I'm not subscribed to the list so, please send me a copy of your 
replies, if any ;-)

First I want to say:
Thanks to all of you for your work on FPK.

Now, to the complains ;-)

I use FPK under BeOS (for some little utils and for BePascal, a pascal 
binding around the API of BeOS). Since I switched to BeOS and FPK I was 
trying to use the smartlinking feature of FPK, because without it the 
executables are too big.
I had no luck with 1.0.6 or 1.0.7.

Now, using 1.0.8, I tried to recompile the RTL doing "make rtl smart", 
and the compiler says:
"Error: Can't call the linker, switching to external linking"
"Closing script ppas.sh"

but every time I run that ppas.sh script, the lib[something].a gets 

Doing that for the whole RTL, and then doing "ppc386 -XX -CX qsort" (in 
the examples directory) I get the same error one more time (this time, 
after running the ppas.sh I get the libqsort.a file). Then I used 
"ppc386 -XX qsort" and the program gets created without any errors. 
"qsort" runs fine and its size is really smaller!

Sadly, other demos fails to compile this way (some problems while 
linking libdos.a).

The content of the ppas.sh follows:
DoExitAsm ()
{ echo "An error occurred while assembling $1"; exit 1; }
DoExitLink ()
{ echo "An error occurred while linking $1"; exit 1; }
/boot/develop/tools/gnupro/bin/ar rs libqsort.a quicksort.sl/qsort*.o
if [ $? != 0 ]; then DoExitLink ; fi
rm quicksort.sl/qsort*.o
rmdir quicksort.sl/

I tell all this to you because it seems that smartlinking on BeOS is 
not too far away (I hope that the problem is small, and easy to fix to 
someone familiar with the compiler code).

I now that all of you are busy with the upcoming 1.2, and that 1.0.10 
is the LAST bugfix release but... if you can, please take a look at 
this issue. You'll make happy to several pascal and BeOS "die hard"s

Another small question/suggestion: would be possible to you to make the 
FPK files  available as separate .zips instead of only one big file?

Well, that's all. Again folks, many, many thanks for your work.


More information about the fpc-devel mailing list