From e92f729cc9118914692e4ff350fcb019ffe97d24 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 11 Sep 2017 15:51:07 +0000 Subject: [PATCH] fixed compiling on raspberry pi. (#1497) --- bam.lua | 2 ++ src/base/detect.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/bam.lua b/bam.lua index 9bc2c87d3..56a422a5c 100644 --- a/bam.lua +++ b/bam.lua @@ -167,6 +167,8 @@ function GenerateLinuxSettings(settings, conf, arch, compiler) elseif arch == "x86_64" then settings.cc.flags:Add("-m64") settings.link.flags:Add("-m64") + elseif arch == "armv7l" then + -- arm 32 bit else print("Unknown Architecture '" .. arch .. "'. Supported: x86, x86_64") os.exit(1) diff --git a/src/base/detect.h b/src/base/detect.h index 3aca358e5..50931623e 100644 --- a/src/base/detect.h +++ b/src/base/detect.h @@ -140,6 +140,14 @@ #endif #endif +#if defined(__arm__) + #define CONF_ARCH_ARM 1 + #define CONF_ARCH_STRING "arm" + #if !defined(CONF_ARCH_ENDIAN_LITTLE) && !defined(CONF_ARCH_ENDIAN_BIG) + #define CONF_ARCH_ENDIAN_LITTLE 1 + #endif +#endif + #ifndef CONF_FAMILY_STRING #define CONF_FAMILY_STRING "unknown"