Skip to content

Commit da15f6b

Browse files
committed
fixed compile error on Arch Linux with gcc
1 parent 848ebad commit da15f6b

File tree

2 files changed

+19
-14
lines changed

2 files changed

+19
-14
lines changed

Makefile.Linux

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ OBJSUFFIX = .o
99
.SUFFIXES:
1010
.SUFFIXES: $(OBJSUFFIX) .cpp .h
1111

12-
TARGET = onscripter$(EXESUFFIX) \
13-
sardec$(EXESUFFIX) \
14-
nsadec$(EXESUFFIX) \
15-
sarconv$(EXESUFFIX) \
16-
nsaconv$(EXESUFFIX)
12+
TARGET = onscripter$(EXESUFFIX)
1713
EXT_OBJS =
1814

1915
# mandatory: SDL, SDL_ttf, SDL_image, SDL_mixer, bzip2
@@ -51,12 +47,21 @@ LIBS += -logg -lvorbis -lvorbisfile
5147

5248
# optional: lua
5349
DEFS += -DUSE_LUA
54-
INCS += -I/usr/include/lua
55-
LIBS += -llua
50+
INCS += -I/usr/include/lua5.1
51+
LIBS += -llua5.1
5652
EXT_OBJS += LUAHandler$(OBJSUFFIX)
5753

5854
# optional: SIMD optimizing
59-
DEFS += -DUSE_SIMD -DUSE_SIMD_X86_SSE2
55+
ARCH = $(shell uname -m)
56+
DEFS += -DUSE_SIMD
57+
ifneq ($(filter i686 x86_64,$(ARCH)),)
58+
DEFS += -DUSE_SIMD_X86_SSE2
59+
else
60+
ifneq ($(filter armv7h armv7l,$(ARCH)),)
61+
DEFS += -DUSE_SIMD_ARM_NEON
62+
EXT_FLAGS += -mfpu=neon
63+
endif
64+
endif
6065

6166
# optional: multicore rendering
6267
DEFS += -DUSE_OMP_PARALLEL

simd/int8x16.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ namespace simd {
105105

106106
inline void store_u_32(void* m, uint8x16 a) {
107107
#ifdef USE_SIMD_X86_SSE2
108-
#if !defined(__clang_major__) || __clang_major__ >= 8
109-
_mm_storeu_si32(reinterpret_cast<__m128i*>(m), a);
110-
#else
111-
// _mm_storeu_si32 is unavailable in Clang 7;
108+
//#if !defined(__clang_major__) || __clang_major__ >= 8
109+
// _mm_storeu_si32(reinterpret_cast<__m128i*>(m), a);
110+
//#else
111+
// // _mm_storeu_si32 is unavailable in Clang 7;
112112
_mm_store_ss(reinterpret_cast<float*>(m), _mm_castsi128_ps(a));
113-
#endif
113+
//#endif
114114
#elif USE_SIMD_ARM_NEON
115115
vst1q_lane_u32(reinterpret_cast<uint32_t*>(m), a, 1);
116116
#endif
@@ -139,4 +139,4 @@ namespace simd {
139139
return vmovl_u8(vget_low_u8(a));
140140
#endif
141141
}
142-
}
142+
}

0 commit comments

Comments
 (0)