Retargeting refers to having the compiler generate code for a different CPU or instruction set.
A different CPU would be X86 vs PowerPC.
A different instruction set would be ARM vs THUMB or x86 vs x86-64 (same CPU, but different mode).
Rehosting means running the code on a different machine than the code was compiled on.
The new machine usually has the same architecture.
Rehosting need not be trivial, because e.g. the filesystem may look different on the compiler system.
Easily modified to generate code for a different target language
Easily modified to run on a different machine
Collectively the two terms are often combined in the term
Code that is portable is not tied to an architecture (target) and not tied to the setup of a specific machine (host).
refering to your question
Rehosting does not mean compiling for another platform!
Retargeting is compiling for another platform.
Rehosting is moving your program to another computer (same platform) (and keeping your fingers crossed to see if it works)