diff options
author | buddyabaddon <33861511+buddyabaddon@users.noreply.github.com> | 2018-04-04 21:01:22 +0300 |
---|---|---|
committer | Dan Moseley <danmose@microsoft.com> | 2018-04-04 21:01:22 +0300 |
commit | 9693747e046fc3e4da7ac5da8a1b101e549e8e01 (patch) | |
tree | 499202860ce0e21b8277652f48220dba17ad7105 /src | |
parent | 0b6a914dd83c0ddafb4e0698f16517515b3e1ee9 (diff) |
build-native.sh fails when using 'uname -p' to determine arch. (#28762)
* build-native.sh fails when using 'uname -p' to determine arch.
uname -p actually returns the processor type, not the 'platform' as the comment suggested.
Quote the $CPUName variable when referencing it as the processor type returned via 'uname -p' can contain spaces.
Examples:
> uname -p
Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz
> uname -p
Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz
* Rely on 'uname -m' for arch type as 'uname -p' gives processor type.
Diffstat (limited to 'src')
-rwxr-xr-x | src/Native/build-native.sh | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/Native/build-native.sh b/src/Native/build-native.sh index 4397f51727..364765134d 100755 --- a/src/Native/build-native.sh +++ b/src/Native/build-native.sh @@ -173,13 +173,8 @@ __ClangMinorVersion=0 __StaticLibLink=0 __PortableBuild=0 -CPUName=$(uname -p) -# Some Linux platforms report unknown for platform, but the arch for machine. -if [ $CPUName == "unknown" ]; then - CPUName=$(uname -m) -fi - -if [ $CPUName == "i686" ]; then +CPUName=$(uname -m) +if [ "$CPUName" == "i686" ]; then __BuildArch=x86 fi |