diff --git a/compiler/fppu.pas b/compiler/fppu.pas index ba23b6a5e1..ef5a5b841e 100644 --- a/compiler/fppu.pas +++ b/compiler/fppu.pas @@ -293,6 +293,9 @@ var function tppumodule.openppu(ppufiletime:longint):boolean; function checkheader: boolean; + var + psi: psysteminfo; + system_name: shortstring; begin result:=false; { check for a valid PPU file } @@ -310,13 +313,18 @@ var { check the target processor } if tsystemcpu(ppufile.header.common.cpu)<>target_cpu then begin - Message(unit_u_ppu_invalid_processor,@queuecomment); + Message1(unit_u_ppu_invalid_processor,cpu2str[tsystemcpu(ppufile.header.common.cpu)],@queuecomment); exit; end; { check target } if tsystem(ppufile.header.common.target)<>target_info.system then begin - Message(unit_u_ppu_invalid_target,@queuecomment); + psi:=targetinfos[tsystem(ppufile.header.common.target)]; + if assigned(psi) then + system_name:=psi^.shortname + else + system_name:='invalid'; + Message1(unit_u_ppu_invalid_target,system_name,@queuecomment); exit; end; {$ifdef cpufpemu} diff --git a/compiler/msg/errore.msg b/compiler/msg/errore.msg index b53f971ab2..7ca36dd9d8 100644 --- a/compiler/msg/errore.msg +++ b/compiler/msg/errore.msg @@ -3332,10 +3332,10 @@ unit_u_ppu_invalid_header=10007_U_PPU Invalid Header (no PPU at the begin) unit_u_ppu_invalid_version=10008_U_PPU Invalid Version $1 % This unit file was compiled with a different version of the compiler, and % cannot be read. -unit_u_ppu_invalid_processor=10009_U_PPU is compiled for another processor +unit_u_ppu_invalid_processor=10009_U_PPU is compiled for another processor %1 % This unit file was compiled for a different processor type, and % cannot be read. -unit_u_ppu_invalid_target=10010_U_PPU is compiled for another target +unit_u_ppu_invalid_target=10010_U_PPU is compiled for another target %1 % This unit file was compiled for a different target, and % cannot be read. unit_u_ppu_source=10011_U_PPU Source: $1