Fix Sim & checkwps for newer distros

__builtin found fix for rbendian.h
tools/configure defines SIM_USE_BYTESWAP_H if byteswap.h is found in
/usr/include/ maybe there is a better mechanism for this

Change-Id: I4d004e68313e8b32aa5587582be36bc459fdaf6b
This commit is contained in:
William Wilgus 2018-12-08 03:19:14 -06:00
parent 69c6c77680
commit 0f5f5c3390
2 changed files with 7 additions and 2 deletions

View File

@ -23,7 +23,7 @@
#include "config.h"
#ifdef SIM_USE_BYTESWAP_H
#ifdef OS_USE_BYTESWAP_H
#include <byteswap.h>
#endif

7
tools/configure vendored
View File

@ -4394,6 +4394,7 @@ fi
;;
[Cc])
uname=`uname`
checkwps="yes"
simcc "checkwps"
toolset='';
t_cpu='';
@ -4474,9 +4475,13 @@ fi
if [ "yes" = "$simulator" ]; then
echo Unsetting APPLICATION define for SIMULATOR build
unset application
fi
# newer glibc implementations use byteswap.h
if [ "$simulator" = "yes" ] || [ "$checkwps" = "yes" ]; then
if test -f "$BYTESWP"; then
echo Using "$BYTESWP"
extradefines="$extradefines -DSIM_USE_BYTESWAP_H=$BYTESWP"
extradefines="$extradefines -DOS_USE_BYTESWAP_H=$BYTESWP"
fi
fi