Skip to content

Conversation

@jameshilliard
Copy link
Contributor

We need a way to disable these when cross compiling as these flags will break due to picking up the host rather than the target.

Should fix:

/home/buildroot/buildroot/output/per-package/python-librt/host/bin/aarch64-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0 -D_FORTIFY_SOURCE=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I. -Ibase64 -I/home/buildroot/buildroot/output/build/python3-3.13.11/Include -I/home/buildroot/buildroot/output/build/python3-3.13.11 -c base64/arch/avx/codec.c -o build/temp.linux-aarch64-cpython-313/base64/arch/avx/codec.o -O3 -Wno-unused-function -mavx
aarch64-linux-gcc.br_real: error: unrecognized command-line option ‘-mavx’
error: command '/home/buildroot/buildroot/output/per-package/python-librt/host/bin/aarch64-linux-gcc' failed with exit code 1

We need a way to disable these when cross compiling as these
flags will break due to picking up the host rather than the
target.
@jameshilliard jameshilliard changed the title Allow disabling extra flags with LIBRT_NO_EXTRA_FLAGS env variable Allow disabling extra flags with MYPYC_NO_EXTRA_FLAGS env variable Jan 1, 2026
@ilevkivskyi ilevkivskyi merged commit 704aee6 into python:master Jan 1, 2026
16 checks passed
@jameshilliard jameshilliard deleted the no-extra-flags branch January 1, 2026 18:14
@ilevkivskyi
Copy link
Member

This should now be available in librt v0.7.6

@jameshilliard
Copy link
Contributor Author

Oh, just noticed a bug in that change, fixed in #20510

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

Successfully merging this pull request may close these issues.

2 participants