diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2024-03-19 18:26:44 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2024-03-19 19:07:40 +0300 |
commit | ac62876a4c7633d486f2ecb111720a426a7da258 (patch) | |
tree | ac4873ef102f441c13c821ed2cc4295b08e63fd4 /contrib | |
parent | 420ebb8f4b2427159ef1b713a5f68d52d747c900 (diff) | |
download | ydb-ac62876a4c7633d486f2ecb111720a426a7da258.tar.gz |
Revert commit rXXXXXX, Acknowledge powerpc64 supporting patch upstream
66d561a885456063f0ad0ce50b463d45c9f93020
Diffstat (limited to 'contrib')
-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, 47 insertions, 52 deletions
diff --git a/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h b/contrib/tools/python3/Modules/_decimal/libmpdec/mpdecimal.h index 7c74f1a8ad..8a5aa26b7b 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 defined(UNIVERSAL) +#if 1 #if defined(CONFIG_64) || defined(CONFIG_32) #error "cannot use CONFIG_64 or CONFIG_32 with UNIVERSAL." #endif - #if defined(__ppc64__) || defined(__powerpc64__) + #if defined(__powerpc64__) || defined(_M_AMD64) || defined(__aarch64__) #define CONFIG_64 #define ANSI - #elif defined(__ppc__) + #elif defined(__powerpc__) #define CONFIG_32 #define ANSI - #elif defined(__i386__) + #elif defined(__i386__) || defined(_M_IX86) #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 deleted file mode 100644 index 4622179540..0000000000 --- a/contrib/tools/python3/Modules/_decimal/ya.make +++ /dev/null @@ -1,46 +0,0 @@ -# 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 9d09f25e68..9927d22ac6 100644 --- a/contrib/tools/python3/patches/all-changes.patch +++ b/contrib/tools/python3/patches/all-changes.patch @@ -194,6 +194,32 @@ #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 e71f2a47bc..24173194fc 100644 --- a/contrib/tools/python3/ya.make +++ b/contrib/tools/python3/ya.make @@ -16,7 +16,6 @@ PEERDIR( contrib/libs/openssl contrib/libs/zlib contrib/restricted/libffi - contrib/tools/python3/Modules/_decimal library/cpp/sanitizer/include ) @@ -27,6 +26,7 @@ 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,6 +83,22 @@ 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 @@ -330,7 +346,6 @@ END() RECURSE( Lib - Modules/_decimal Modules/_sqlite bin ) |