I believe I found a better solution to the problem. In fprepos.pp two function OSToString and CPUToString are defined.

So a string ./units/$(CPU_TARGET)-$(OS_TARGET)

would be represented as './units/' + CPUToString(Defaults.CPU) + '-' + OSToString(Defaults.OS)

Darius

Jonas Maebe wrote:

On 12 Aug 2007, at 10:43, Darius Blaszijk wrote:

Jonas Maebe wrote:

On 12 Aug 2007, at 09:51, Darius Blaszijk wrote:

If Host = i386-linux and Target = i386-win32 then {$I %FPCTARGETOS%} = linux? Instead of the expected {$I %FPCTARGETOS%} = win. Which is ok because the target IS i386-win32.

Not the target for which you compile fpmake, because fpmake has to run on the host.
Must be my ignorance regarding cross-compiling, but don't you use two compilers in that case? I mean how is a win cross-compiler going to create valid executables on a linux host?

Using a cross-assembler and cross-linker (either external or internal to the compiler). You only need a separate compiler if you compile for a different cpu platform. And even then you may also want to cross-compile the entire code on the host platform and only copy the resulting binary to the target platform.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to