mirror of
https://github.com/mysensors/MySensors.git
synced 2026-02-19 17:11:28 +01:00
Fix mysgw configure script and building RFM69 gw on 64-bit OS (#1552)
* Fix configure script errors on 64-bit OS (#1550) Use only gcc flags relevant to aarch64 for 64-bit RPI SoCs on 64-bit OS version * Fix mysgw build errors on 64-bit OS (#1551) Force data type for the parameter of min() function to avoid conflicts
This commit is contained in:
committed by
GitHub
parent
8d45e7bad7
commit
27849cbc88
15
configure
vendored
15
configure
vendored
@@ -258,6 +258,7 @@ function detect_machine {
|
||||
|
||||
function gcc_cpu_flags {
|
||||
local soc=$1
|
||||
local cpu=$2
|
||||
case $soc in
|
||||
BCM2835)
|
||||
flags="-march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard"
|
||||
@@ -266,10 +267,18 @@ function gcc_cpu_flags {
|
||||
flags="-march=armv7-a -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard"
|
||||
;;
|
||||
BCM2837)
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||
if [[ ${cpu} == "aarch64" ]]; then
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a53"
|
||||
else
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||
fi
|
||||
;;
|
||||
BCM2711)
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||
if [[ ${cpu} == "aarch64" ]]; then
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a72"
|
||||
else
|
||||
flags="-march=armv8-a+crc -mtune=cortex-a72 -mfpu=neon-fp-armv8 -mfloat-abi=hard"
|
||||
fi
|
||||
;;
|
||||
AM33XX)
|
||||
flags="-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=hard"
|
||||
@@ -573,7 +582,7 @@ if [ -z "${SOC}" ]; then
|
||||
fi
|
||||
|
||||
if [ -z "${CPUFLAGS}" ]; then
|
||||
CPUFLAGS=$(gcc_cpu_flags $SOC)
|
||||
CPUFLAGS=$(gcc_cpu_flags "${SOC}" "${CPU}")
|
||||
fi
|
||||
|
||||
if [[ $SOC == "BCM2835" || $SOC == "BCM2836" || $SOC == "BCM2837" || $SOC == "BCM2711" ]]; then
|
||||
|
||||
@@ -278,7 +278,8 @@ LOCAL void RFM69_interruptHandling(void)
|
||||
RFM69.currentPacket.header.packetLen - 1);
|
||||
|
||||
if (RFM69.currentPacket.header.version >= RFM69_MIN_PACKET_HEADER_VERSION) {
|
||||
RFM69.currentPacket.payloadLen = min(RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1),
|
||||
RFM69.currentPacket.payloadLen = min(static_cast<uint>
|
||||
(RFM69.currentPacket.header.packetLen - (RFM69_HEADER_LEN - 1)),
|
||||
RFM69_MAX_PACKET_LEN);
|
||||
RFM69.ackReceived = RFM69_getACKReceived(RFM69.currentPacket.header.controlFlags);
|
||||
RFM69.dataReceived = !RFM69.ackReceived;
|
||||
|
||||
Reference in New Issue
Block a user