diff options
author | thegeorg <thegeorg@yandex-team.com> | 2024-03-19 00:07:49 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2024-03-19 00:29:52 +0300 |
commit | fdb6d908123026b562a0781a6656c74217cbae88 (patch) | |
tree | 079d989d2c3fc78cd0b6ab33583de96f79df9f25 /contrib/tools/python3 | |
parent | 026a62a52ed322d56c219ff83a92d72921d0eca1 (diff) | |
download | ydb-fdb6d908123026b562a0781a6656c74217cbae88.tar.gz |
Acknowledge powerpc64 supporting patch upstream
5cc63398eec743d9095bc0a8366ce64dc56680a5
Diffstat (limited to 'contrib/tools/python3')
-rw-r--r-- | contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h | 8 | ||||
-rw-r--r-- | contrib/tools/python3/Modules/_decimal/ya.make | 46 | ||||
-rw-r--r-- | contrib/tools/python3/patches/all-changes.patch | 26 | ||||
-rw-r--r-- | contrib/tools/python3/ya.make | 19 |
4 files changed, 52 insertions, 47 deletions
diff --git a/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h b/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h index 8a5aa26b7b..7c74f1a8ad 100644 --- a/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h +++ b/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h @@ -96,17 +96,17 @@ const char *mpd_version(void); /* Configuration */ /******************************************************************************/ -#if 1 +#if defined(UNIVERSAL) #if defined(CONFIG_64) || defined(CONFIG_32) #error "cannot use CONFIG_64 or CONFIG_32 with UNIVERSAL." #endif - #if defined(__powerpc64__) || defined(_M_AMD64) || defined(__aarch64__) + #if defined(__ppc64__) || defined(__powerpc64__) #define CONFIG_64 #define ANSI - #elif defined(__powerpc__) + #elif defined(__ppc__) #define CONFIG_32 #define ANSI - #elif defined(__i386__) || defined(_M_IX86) + #elif defined(__i386__) #define CONFIG_32 #define ANSI #elif defined(__x86_64__) diff --git a/contrib/tools/python3/Modules/_decimal/ya.make b/contrib/tools/python3/Modules/_decimal/ya.make new file mode 100644 index 0000000000..4622179540 --- /dev/null +++ b/contrib/tools/python3/Modules/_decimal/ya.make @@ -0,0 +1,46 @@ +# Generated by devtools/yamaker. + +LIBRARY() + +VERSION(3.12.2) + +ORIGINAL_SOURCE(https://github.com/python/cpython/archive/v3.12.2.tar.gz) + +LICENSE(Python-2.0) + +ADDINCL( + contrib/tools/python3/Include + contrib/tools/python3/Include/internal + contrib/tools/python3/Modules/_decimal/libmpdec +) + +PYTHON3_ADDINCL() + +NO_COMPILER_WARNINGS() + +NO_RUNTIME() + +CFLAGS( + -DUNIVERSAL +) + +SRCS( + _decimal.c + libmpdec/basearith.c + libmpdec/constants.c + libmpdec/context.c + libmpdec/convolute.c + libmpdec/crt.c + libmpdec/difradix2.c + libmpdec/fnt.c + libmpdec/fourstep.c + libmpdec/io.c + libmpdec/mpalloc.c + libmpdec/mpdecimal.c + libmpdec/mpsignal.c + libmpdec/numbertheory.c + libmpdec/sixstep.c + libmpdec/transpose.c +) + +END() diff --git a/contrib/tools/python3/patches/all-changes.patch b/contrib/tools/python3/patches/all-changes.patch index 9927d22ac6..9d09f25e68 100644 --- a/contrib/tools/python3/patches/all-changes.patch +++ b/contrib/tools/python3/patches/all-changes.patch @@ -194,32 +194,6 @@ #include "typearith.h" ---- contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h (index) -+++ contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h (working tree) -@@ -96,17 +96,17 @@ const char *mpd_version(void); - /* Configuration */ - /******************************************************************************/ - --#if defined(UNIVERSAL) -+#if 1 - #if defined(CONFIG_64) || defined(CONFIG_32) - #error "cannot use CONFIG_64 or CONFIG_32 with UNIVERSAL." - #endif -- #if defined(__ppc__) -- #define CONFIG_32 -- #define ANSI -- #elif defined(__ppc64__) -+ #if defined(__powerpc64__) || defined(_M_AMD64) || defined(__aarch64__) - #define CONFIG_64 - #define ANSI -- #elif defined(__i386__) -+ #elif defined(__powerpc__) -+ #define CONFIG_32 -+ #define ANSI -+ #elif defined(__i386__) || defined(_M_IX86) - #define CONFIG_32 - #define ANSI - #elif defined(__x86_64__) --- contrib/tools/python3/Modules/getpath.c (index) +++ contrib/tools/python3/Modules/getpath.c (working tree) @@ -1,3 +1,4 @@ diff --git a/contrib/tools/python3/ya.make b/contrib/tools/python3/ya.make index 24173194fc..e71f2a47bc 100644 --- a/contrib/tools/python3/ya.make +++ b/contrib/tools/python3/ya.make @@ -16,6 +16,7 @@ PEERDIR( contrib/libs/openssl contrib/libs/zlib contrib/restricted/libffi + contrib/tools/python3/Modules/_decimal library/cpp/sanitizer/include ) @@ -26,7 +27,6 @@ ADDINCL( contrib/tools/python3/Include contrib/tools/python3/Include/internal contrib/tools/python3/Modules - contrib/tools/python3/Modules/_decimal/libmpdec contrib/tools/python3/Modules/_hacl/include contrib/tools/python3/PC ) @@ -83,22 +83,6 @@ SRCS( Modules/_ctypes/cfield.c Modules/_ctypes/stgdict.c Modules/_datetimemodule.c - Modules/_decimal/_decimal.c - Modules/_decimal/libmpdec/basearith.c - Modules/_decimal/libmpdec/constants.c - Modules/_decimal/libmpdec/context.c - Modules/_decimal/libmpdec/convolute.c - Modules/_decimal/libmpdec/crt.c - Modules/_decimal/libmpdec/difradix2.c - Modules/_decimal/libmpdec/fnt.c - Modules/_decimal/libmpdec/fourstep.c - Modules/_decimal/libmpdec/io.c - Modules/_decimal/libmpdec/mpalloc.c - Modules/_decimal/libmpdec/mpdecimal.c - Modules/_decimal/libmpdec/mpsignal.c - Modules/_decimal/libmpdec/numbertheory.c - Modules/_decimal/libmpdec/sixstep.c - Modules/_decimal/libmpdec/transpose.c Modules/_elementtree.c Modules/_functoolsmodule.c Modules/_hacl/Hacl_Hash_MD5.c @@ -346,6 +330,7 @@ END() RECURSE( Lib + Modules/_decimal Modules/_sqlite bin ) |