Skip to content

Instantly share code, notes, and snippets.

@Sg4Dylan
Last active August 15, 2021 16:32
Show Gist options
  • Save Sg4Dylan/e1259c165e70f089b0e930c1f92de0a6 to your computer and use it in GitHub Desktop.
Save Sg4Dylan/e1259c165e70f089b0e930c1f92de0a6 to your computer and use it in GitHub Desktop.
silk-v3-decoder 树莓派编译手记

不要汇编优化

修改 Makefile

CC     = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX) -DNO_ASM
CXX    = $(TOOLCHAIN_PREFIX)g++$(TOOLCHAIN_SUFFIX) -DNO_ASM

要汇编优化

特别适用于 ArchLinux ARM 选手,其他发行版需稍作修改

修改 Makefile

CC     = $(TOOLCHAIN_PREFIX)gcc$(TOOLCHAIN_SUFFIX)
CXX    = $(TOOLCHAIN_PREFIX)g++$(TOOLCHAIN_SUFFIX)
AR     = $(TOOLCHAIN_PREFIX)gcc-ar
RANLIB = $(TOOLCHAIN_PREFIX)gcc-ranlib
CP     = $(TOOLCHAIN_PREFIX)gcc-cp

编译

export TOOLCHAIN_PREFIX=/usr/bin/armv7l-unknown-linux-gnueabihf-
make

特别感谢 @404neko 提供的解决方案

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment