Changeset 1153

Show
Ignore:
Timestamp:
05/09/08 23:51:40 (14 years ago)
Author:
holin
Message:

add 64-bit build target

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/SConstruct

    r1151 r1153  
    8080""", True ), 
    8181    BoolOption( "BUILD_STATIC_TOOLS", "Build a statically linked version of the FFADO tools.", False ), 
    82     EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'none' ), ignorecase=2), 
     82    EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'powerpc64', 'none' ), ignorecase=2), 
    8383    BoolOption( "ENABLE_OPTIMIZATIONS", "Enable optimizations and the use of processor specific extentions (MMX/SSE/...).", False ), 
    8484 
     
    342342    elif re.search("i[0-5]86", config[config_cpu]) != None: 
    343343        env['DIST_TARGET'] = 'i386' 
     344    elif re.search("powerpc64", config[config_cpu]) != None: 
     345        env['DIST_TARGET'] = 'powerpc64' 
    344346    elif re.search("powerpc", config[config_cpu]) != None: 
    345347        env['DIST_TARGET'] = 'powerpc' 
     
    377379                opt_flags.append ("-march=i686") 
    378380 
    379         elif env['DIST_TARGET'] == 'powerpc'
     381        elif (env['DIST_TARGET'] == 'powerpc') or (env['DIST_TARGET'] == 'powerpc64')
    380382 
    381383            cpu_line = os.popen ("cat /proc/cpuinfo | grep '^cpu'").read()[:-1] 
     
    386388                opt_flags.append ("-mabi=altivec") 
    387389 
    388             ppc_type = ppc_type.split (",")[0] 
     390            ppc_type = ppc_type.split (", ")[0] 
    389391            if re.match ("74[0145][0578]A?", ppc_type) != None: 
    390392                opt_flags.append ("-mcpu=7400") 
     
    415417        #env['USE_SSE3'] = 1 
    416418 
     419    # build for 64-bit userland? (TODO: add x86_64 here, too?) 
     420    if env['DIST_TARGET'] == "powerpc64": 
     421        print "Doing a 64-bit build" 
     422        env.AppendUnique( CCFLAGS=["-m64"] ) 
     423        env.AppendUnique( CFLAGS=["-m64"] ) 
     424    else: 
     425        print "Doing a 32-bit build" 
     426        env.AppendUnique( CCFLAGS=["-m32"] ) 
     427        env.AppendUnique( CFLAGS=["-m32"] ) 
     428 
    417429# end of processor-specific section 
    418430if env['ENABLE_OPTIMIZATIONS']: