Add code which tries to load a unit from a package first and only then as usual.

fppu.pas, tppumodule:
  + new method loadfrompackage which searches all available packages for the unit and loads it from there if found
  * loadppu: first try to load the unit from a package if any are available

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28850 3ad0048d-3df7-0310-abae-a5850022a9f2
Generate the import library for each used package.

pkgutil.pas:
  - remove function createimportlibfromexports
  + new function createimportlibfromexternals which uses the imported unit symbols (preferred) and the external/global assembler symbols of a unit to generate the correct import library for each used package used in a program or library
pmodules.pas, proc_program:
  * move the generation of the import library further down until all tables were generated of which entries might reside in a package
  * use createimportlibfromexternals to generate the import library for the program/library

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28851 3ad0048d-3df7-0310-abae-a5850022a9f2
Don't link objects files of a unit that is provided by a package.

pmodules.pas, proc_program:
  * if a unit has uf_in_library set we must not include it in the units we link against

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28852 3ad0048d-3df7-0310-abae-a5850022a9f2
Until package PPU are stored inside the PCP we use .ppl.ppu as extension (instead of .ppu) to find the PPU files that were adjusted for usage in a package.

pmodules.pas, proc_package:
  * change the file extension of the new unit to .ppl.ppu from .ppu

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28853 3ad0048d-3df7-0310-abae-a5850022a9f2
Export all global assembler symbols from a package.

pkgutil.pas:
  * export_unit: instead of exporting only a selected set of assembler symbols we export all global assembler symbols of a unit

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28854 3ad0048d-3df7-0310-abae-a5850022a9f2