cmake: set system name correctly

For unknown reasons, the cmake class is using SDK_OS as the
target system OS. This makes no sense but only shows up as a problem
when you try a different SDK OS. Fix it to use TARGET_OS which is
the correct thing to do. For the vast majority of users this will
make no difference.

(From OE-Core master rev: 57be84259f0885865c85d7bac350979430b956b5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cmake.bbclass: ensure CMAKE_SYSTEM_NAME is correct

Using TARGET_OS can add the ABIEXTENSION so ensure that is is removed for the Linux
TARGET_OS, we might have other TARGET_OSes so don't hard code CMAKE_SYSTEM_NAME

[YOCTO #5145]

(From OE-Core master rev: 7d8b700242b1b32c6b6d0735b497701800f54fc4)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>