Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
smsxgli opened this issue Feb 6, 2021 · 0 comments

Comments

@smsxgli
Copy link

smsxgli commented Feb 6, 2021

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):

  • OS: Arch Linux
  • Compiler: gcc (GCC) 10.2.0
  • yasm: 1.3.0

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant