Ticket #64916: patch-universal-powerpc.diff

File patch-universal-powerpc.diff, 3.6 KB (added by barracuda156, 2 years ago)

Patch I made to fix ppc+ppc64 build:

  • configure

    # Patch allowing building universal Python (ppc+ppc64). Supported only for 10.5.x
    
    old new  
    15231523                          specify the kind of macOS universal binary that
    15241524                          should be created. This option is only valid when
    15251525                          --enable-universalsdk is set; options are:
    1526                           ("universal2", "intel-64", "intel-32", "intel",
     1526                          ("universal2", "intel-64", "intel-32", "intel", "powerpc",
    15271527                          "32-bit", "64-bit", "3-way", or "all") see
    15281528                          Mac/README.rst
    15291529  --with-framework-name=FRAMEWORK
     
    75197519               LIPO_INTEL64_FLAGS="-extract x86_64"
    75207520               ARCH_RUN_32BIT="true"
    75217521               ;;
     7522            powerpc)
     7523               UNIVERSAL_ARCH_FLAGS="-arch ppc -arch ppc64"
     7524               LIPO_32BIT_FLAGS="-extract ppc7400"
     7525               ARCH_RUN_32BIT="/usr/bin/arch -ppc"
     7526               ;;
    75227527            intel)
    75237528               UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
    75247529               LIPO_32BIT_FLAGS="-extract i386"
     
    75407545               ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
    75417546               ;;
    75427547            *)
    7543                as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|3-way" "$LINENO" 5
     7548               as_fn_error $? "proper usage is --with-universal-arch=universal2|32-bit|64-bit|all|intel|powerpc|3-way" "$LINENO" 5
    75447549               ;;
    75457550            esac
    75467551
     
    75847589            if test ${enable_universalsdk}
    75857590            then
    75867591                case "$UNIVERSAL_ARCHS" in
    7587                 all|3-way|intel|64-bit)
     7592                all|3-way|intel|powerpc|64-bit)
    75887593                    # These configurations were first supported in 10.5
    75897594                    cur_target='10.5'
    75907595                    ;;
  • Mac/BuildScript/build-installer.py

    old new  
    123123universal_opts_map = { 'universal2': ('arm64', 'x86_64'),
    124124                       '32-bit': ('i386', 'ppc',),
    125125                       '64-bit': ('x86_64', 'ppc64',),
    126                        'intel':  ('i386', 'x86_64'),
    127                        'intel-32':  ('i386',),
    128                        'intel-64':  ('x86_64',),
    129                        '3-way':  ('ppc', 'i386', 'x86_64'),
    130                        'all':    ('i386', 'ppc', 'x86_64', 'ppc64',) }
     126                       'intel': ('i386', 'x86_64'),
     127                       'intel-32': ('i386',),
     128                       'intel-64': ('x86_64',),
     129                       'powerpc': ('ppc', 'ppc64'),
     130                       '3-way': ('ppc', 'i386', 'x86_64'),
     131                       'all': ('i386', 'ppc', 'x86_64', 'ppc64',) }
    131132default_target_map = {
    132133        'universal2': '10.9',
    133134        '64-bit': '10.5',
     
    135136        'intel': '10.5',
    136137        'intel-32': '10.4',
    137138        'intel-64': '10.5',
     139        'powerpc': '10.5',
    138140        'all': '10.5',
    139141}
    140142
  • Lib/_osx_support.py

    old new  
    547547                machine = 'fat'
    548548            elif archs == ('i386', 'x86_64'):
    549549                machine = 'intel'
     550            elif archs == ('ppc', 'ppc64'):
     551                machine = 'powerpc'
    550552            elif archs == ('i386', 'ppc', 'x86_64'):
    551553                machine = 'fat3'
    552554            elif archs == ('ppc64', 'x86_64'):