[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat
Matthias Schoepfer added the comment: Hi! I submitted this patch, it even is now on yocto zeus. Any progress, will someone review it?! Thanks and Regards, Matthias -- ___ Python tracker <https://bugs.python.org/issue36852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat
Matthias Schoepfer added the comment: Hi Matthias, thanks for your comment. I am not sure, if I understand correctly or if it is really the problem here. So, if you take a look at the patch, or at the current version of configure.ac right now, there is s section: AC_MSG_CHECKING([for the platform triplet based on compiler characteristics]) There is a handcrafted C Program (well, rather C-Preprocessor), which tries to guess, for what Platform the compiler is used for. The initial problem with my platform is this line: # elif defined(__mips_hard_float) The reason beeing, on mips soft float, __mips_hard_float is not defined. But the triplet should be mips-linux-gnu. Otherwise, the build will fail later down the road. One could add || defined (__mips_soft_float) to fix this issue. Indeed, that was my first patch. But I was not really satisfied. I think, using a custom C program for finding out the target triplet is generally not the right approach, because, you will always miss an architecture or fail to correctly guess the triplet (my guess). I think, it is much better, to rely on autotools for this. At the end of the day, autotools where made for that purpose, right? So I replaced the whole program with AC_CANONICAL_TARGET. It should always do the right thing *and* is Cross-Compiler aware. In the end, the triplet is mips-linux-gnu. It also removes lots of hard to maintain code (seems, like nobody really knows its internals?!). My trouble is, that I do not know, what other side effects this might have. On the latest release of yocto, my patch is used, and at least, I am not aware of any problems, but that does not mean, that there are none... Regards, Matthias -- ___ Python tracker <https://bugs.python.org/issue36852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat
Matthias Schoepfer added the comment: Hi Matthias, thanks for clarification. Maybe I am under a totally wrong impression, but to me is having soft float comparable to not having some special SSE instruction sets with x86. You are missing some instructions, that your code may or may not need, and the compiler replaces them with some other, not hardware accelerated functions. To what extend is the handcrafted version better than the one, autotools are providing? I really like to learn here. Many thanks already! -- ___ Python tracker <https://bugs.python.org/issue36852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue36852] Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat
New submission from Matthias Schoepfer : Python 3.7.2 fails to cross compile for yocto / openembedded when target is mips softfloat, because the OS triple is not detected correctly by configure.ac. The configure script magic just catches for __mips__hard_float defines, but I guess, __mips__soft_float also indicates a mips architecture. Added patch -- components: Cross-Build files: 0001-fixing-finding-of-triplet-on-softfloat-mips.patch keywords: patch messages: 341894 nosy: Alex.Willmer, mschoepf priority: normal severity: normal status: open title: Python3.7.2 fails to cross-compile (yocto / openembedded) when target is mips softfloat versions: Python 3.7 Added file: https://bugs.python.org/file48318/0001-fixing-finding-of-triplet-on-softfloat-mips.patch ___ Python tracker <https://bugs.python.org/issue36852> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com