pkuvcl / davs2

An open-source decoder of AVS2-P2/IEEE1857.4 video coding standard
GNU General Public License v2.0
129 stars 52 forks source link

linux configure $CFLAGS 环境变量导致大小端测试失败("endian test failed") #27

Open smsxgli opened 3 years ago

smsxgli commented 3 years ago

Describe the bug

linux环境下,在build/linux/目录下,执行./configure,当存在“CFLAGS”环境变量时,会干扰大小端的测试,导致configure失败,终端输出“endian test failed”

To Reproduce

设置环境变量CFLAGS: export CFLAGS="-march=native -O2 -ftree-loop-vectorize -pipe -fstack-protector-strong -fstack-clash-protection -fno-plt -fexceptions -fasynchronous-unwind-tables -flto -grecord-gcc-switches" 执行./configure 输出:endian test failed

Expected behavior

在编译发布版本时,使用上述CFLAGS以获得更好的优化是很常见的,configure不应当因此而失败。

Screenshots

image

Desktop (please complete the following information):

个人解决方案: 见附件 fix-endian-test-failed-with-cflags.patch.txt