The CPPFLAGS, CC and CXX all go on the ./configure line before ./configure.
The flags given ensure that your build will work on armv6, armv7 and armv7l - you can change them if you wish to build for a specific RPi.
CPPFLAGS="-I/usr/local/include/ncursesw" CC="gcc -flto -fuse-linker-plugin
-march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe" CXX="g++ -flto -fuse-linker-plugin
-march=armv7 -mtu
ne=arm1176jzf-s -mfpu=vfp -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --localstatedir=/var --enable-shared --with-system-expat --with-system-ffi --with-ensurepip=yes --with-tcltk-i
ncludes='-I/usr/local/include' --with-tcltk-libs='-L/usr/local/lib -ltk8.6 -ltcl8.6'
configure: WARNING: unrecognized options: --with-tcltk-includes, --with-tcltk-libschecking build system type... armv7l-unknown-linux-gnueabihf
checking host system type... armv7l-unknown-linux-gnueabihf
checking for Python interpreter freezing... ./_bootstrap_python
checking for python3.11... no
checking for python3.10... no
checking for python3.9... no
checking for python3.8... python3.8
checking Python for regen version... Python 3.8.7
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "linux"
checking for gcc... gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe accepts -g... yes
checking for gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -E
checking for grep that handles long lines and -e... /usr/local/bin/grep
checking for a sed that does not truncate output... /usr/local/bin/sed
checking for egrep... /usr/local/bin/grep -E
checking for CC compiler name... gcc
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for --with-cxx-main=<compiler>... no
checking for the platform triplet based on compiler characteristics... arm-linux-gnueabihf
checking for multiarch...
checking for PEP 11 support tier... armv7l-unknown-linux-gnueabihf/gcc has tier 3 (partially supported)
checking for -Wl,--no-as-needed... yes
checking for the Android API level... not Android
checking for --with-emscripten-target...
checking for --enable-wasm-dynamic-linking... missing
checking for --enable-wasm-pthreads... missing
checking for --with-suffix...
checking for case-insensitive build directory... no
checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a
checking LINKCC... $(PURIFY) $(MAINCC)
checking EXPORTSYMS...
checking for GNU ld... yes
checking for --enable-shared... yes
checking for --with-static-libpython... yes
checking for --enable-profiling... no
checking LDLIBRARY... checking HOSTRUNNER...
libpython$(LDVERSION).so
checking for ar... ar
checking for readelf... readelf
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for --with-pydebug... no
checking for --with-trace-refs... no
checking for --enable-pystats... no
checking for --with-assertions... no
checking for --enable-optimizations... no
checking PROFILE_TASK... -m test --pgo --timeout=$(TESTTIMEOUT)
checking for --with-lto... no
checking for llvm-profdata... no
checking if gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe supports -Og optimization level... yes
checking if we can add -Wextra... yes
checking whether gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -fno-strict-aliasing accepts and needs -fno-strict-aliasing... no
checking if we can disable gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe unused-parameter warning... yes
checking if we can disable gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe missing-field-initializers warning... yes
checking if we can enable gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe sign-compare warning... yes
checking if we can enable gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe unreachable-code warning... yes
checking if we can enable gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe strict-prototypes warning... no
checking if we can make implicit function declaration an error in gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -Werror=implicit-function-declaration... yes
checking if we can use visibility in gcc -flto -fuse-linker-plugin -march=armv7 -mtune=arm1176jzf-s -mfpu=vfp -Os -pipe -fvisibility=hidden... yes
checking whether pthreads are available without options... no
TRUNCATED
checking for gethostbyname_r... yes
checking gethostbyname_r with 6 args... yes
checking for __fpu_control... yes
checking for --with-libm=STRING... default LIBM="-lm"
checking for --with-libc=STRING... default LIBC=""
checking for x64 gcc inline assembler... no
checking whether float word ordering is bigendian... unknown
configure: error:
Unknown float word ordering. You need to manually preset
ax_cv_c_float_words_bigendian=no (or yes) according to your system.I'll try with armv6zk arch
EDIT: It is the same for armv6zk unfortunately
When I follow this guide it does compile and work but with the curses missing
This specific part with tce-load -i all required tcz:
https://www.scivision.dev/compile-install-python-beta-raspberry-pi/