~helenos-nicf/helenos/nicf

« back to all changes in this revision

Viewing changes to tools/autotool.py

  • Committer: Radim Vansa
  • Date: 2011-09-20 21:55:59 UTC
  • mfrom: (697.1.517 HelenOS.mainline)
  • Revision ID: radim.vansa@matfyz.cz-20110920215559-7fjpai6wt5ieurcq
Merge with mainline

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
        outf.write(PROBE_TAIL)
243
243
        outf.close()
244
244
        
245
 
        args = [common['CC'], "-S", "-o", PROBE_OUTPUT, PROBE_SOURCE]
 
245
        args = [common['CC']]
 
246
        args.extend(common['CC_ARGS'])
 
247
        args.extend(["-S", "-o", PROBE_OUTPUT, PROBE_SOURCE])
246
248
        
247
249
        try:
248
250
                sys.stderr.write("Checking compiler properties ... ")
360
362
                typedefs.append({'oldtype': "unsigned %s" % probe['unsigned_sizes'][b], 'newtype': "uint%u_t" % (b * 8)})
361
363
                typedefs.append({'oldtype': "signed %s" % probe['signed_sizes'][b], 'newtype': "int%u_t" % (b * 8)})
362
364
                
 
365
                macros.append({'oldmacro': "unsigned %s" % probe['unsigned_sizes'][b], 'newmacro': "UINT%u_T" % (b * 8)})
 
366
                macros.append({'oldmacro': "signed %s" % probe['signed_sizes'][b], 'newmacro': "INT%u_T" % (b * 8)})
 
367
                
363
368
                macros.append({'oldmacro': "\"%so\"" % probe['unsigned_strcs'][b], 'newmacro': "PRIo%u" % (b * 8)})
364
369
                macros.append({'oldmacro': "\"%su\"" % probe['unsigned_strcs'][b], 'newmacro': "PRIu%u" % (b * 8)})
365
370
                macros.append({'oldmacro': "\"%sx\"" % probe['unsigned_strcs'][b], 'newmacro': "PRIx%u" % (b * 8)})
522
527
                check_app(["makedepend", "-f", "-"], "Makedepend utility", "usually part of imake or xutils")
523
528
                
524
529
                # Compiler
 
530
                common['CC_ARGS'] = []
525
531
                if (config['COMPILER'] == "gcc_cross"):
526
532
                        if (config['PLATFORM'] == "abs32le"):
527
533
                                check_config(config, "CROSS_TARGET")
535
541
                                
536
542
                                if (config['CROSS_TARGET'] == "mips32"):
537
543
                                        gnu_target = "mipsel-linux-gnu"
 
544
                                        common['CC_ARGS'].append("-mabi=32")
538
545
                        
539
546
                        if (config['PLATFORM'] == "amd64"):
540
547
                                target = config['PLATFORM']
554
561
                        
555
562
                        if (config['PLATFORM'] == "mips32"):
556
563
                                check_config(config, "MACHINE")
 
564
                                common['CC_ARGS'].append("-mabi=32")
557
565
                                
558
566
                                if ((config['MACHINE'] == "lgxemul") or (config['MACHINE'] == "msim")):
559
567
                                        target = config['PLATFORM']
563
571
                                        target = "mips32eb"
564
572
                                        gnu_target = "mips-linux-gnu"
565
573
                        
 
574
                        if (config['PLATFORM'] == "mips64"):
 
575
                                check_config(config, "MACHINE")
 
576
                                common['CC_ARGS'].append("-mabi=64")
 
577
                                
 
578
                                if (config['MACHINE'] == "msim"):
 
579
                                        target = config['PLATFORM']
 
580
                                        gnu_target = "mips64el-linux-gnu"
 
581
                        
566
582
                        if (config['PLATFORM'] == "ppc32"):
567
583
                                target = config['PLATFORM']
568
584
                                gnu_target = "ppc-linux-gnu"