Changeset 85369b1 in mainline for tools/autotool.py
- Timestamp:
- 2010-11-24T17:59:02Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 475fe35
- Parents:
- dc0b964
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/autotool.py
rdc0b964 r85369b1 271 271 unsigned_sizes[name] = value_int 272 272 unsigned_tags[tag] = value_int 273 if (strc != ""): 274 unsigned_strcs[strc] = value_int 275 if (conc != ""): 276 unsigned_concs[conc] = value_int 273 unsigned_strcs[strc] = value_int 274 unsigned_concs[conc] = value_int 277 275 elif (subcategory == "signed"): 278 276 signed_sizes[name] = value_int 279 277 signed_tags[tag] = value_int 280 if (strc != ""): 281 signed_strcs[strc] = value_int 282 if (conc != ""): 283 signed_concs[conc] = value_int 278 signed_strcs[strc] = value_int 279 signed_concs[conc] = value_int 284 280 else: 285 281 print_error(["Unexpected keyword \"%s\" in \"%s\" on line %s." % (subcategory, PROBE_OUTPUT, j), COMPILER_FAIL]) … … 329 325 330 326 if (not fnd): 331 macros.append({'oldmacro': "\"o\"", 'newmacro': "PRIo%u" % (b * 8)}) 332 macros.append({'oldmacro': "\"u\"", 'newmacro': "PRIu%u" % (b * 8)}) 333 macros.append({'oldmacro': "\"x\"", 'newmacro': "PRIx%u" % (b * 8)}) 334 macros.append({'oldmacro': "\"X\"", 'newmacro': "PRIX%u" % (b * 8)}) 327 print_error(['Unable to find appropriate unsigned printf formatter for %u bytes' % b, 328 COMPILER_FAIL]) 335 329 336 330 … … 343 337 344 338 if (not fnd): 345 macros.append({'oldmacro': "\"d\"", 'newmacro': "PRId%u" % (b * 8)}) 339 print_error(['Unable to find appropriate signed printf formatter for %u bytes' % b, 340 COMPILER_FAIL]) 346 341 347 342 … … 349 344 for name, value in probe['unsigned_concs'].items(): 350 345 if (value == b): 351 macros.append({'oldmacro': "c ## U%s" % name, 'newmacro': "UINT%u_C(c)" % (b * 8)}) 352 fnd = True 353 break 354 355 if (not fnd): 356 macros.append({'oldmacro': "c ## U", 'newmacro': "UINT%u_C(c)" % (b * 8)}) 346 if ((name.startswith('@')) or (name == "")): 347 macros.append({'oldmacro': "c ## U", 'newmacro': "UINT%u_C(c)" % (b * 8)}) 348 else: 349 macros.append({'oldmacro': "c ## U%s" % name, 'newmacro': "UINT%u_C(c)" % (b * 8)}) 350 fnd = True 351 break 352 353 if (not fnd): 354 print_error(['Unable to find appropriate unsigned literal macro for %u bytes' % b, 355 COMPILER_FAIL]) 357 356 358 357 … … 360 359 for name, value in probe['signed_concs'].items(): 361 360 if (value == b): 362 macros.append({'oldmacro': "c ## %s" % name, 'newmacro': "INT%u_C(c)" % (b * 8)}) 363 fnd = True 364 break 365 366 if (not fnd): 367 macros.append({'oldmacro': "c", 'newmacro': "INT%u_C(c)" % (b * 8)}) 361 if ((name.startswith('@')) or (name == "")): 362 macros.append({'oldmacro': "c", 'newmacro': "INT%u_C(c)" % (b * 8)}) 363 else: 364 macros.append({'oldmacro': "c ## %s" % name, 'newmacro': "INT%u_C(c)" % (b * 8)}) 365 fnd = True 366 break 367 368 if (not fnd): 369 print_error(['Unable to find appropriate unsigned literal macro for %u bytes' % b, 370 COMPILER_FAIL]) 368 371 369 372 for tag in ['CHAR', 'SHORT', 'INT', 'LONG', 'LLONG']: … … 568 571 probe = probe_compiler(common, 569 572 [ 570 {'type': 'char', 'tag': 'CHAR', 'strc': '"hh"', 'conc': '" "'},571 {'type': 'short int', 'tag': 'SHORT', 'strc': '"h"', 'conc': '" "'},573 {'type': 'char', 'tag': 'CHAR', 'strc': '"hh"', 'conc': '"@@"'}, 574 {'type': 'short int', 'tag': 'SHORT', 'strc': '"h"', 'conc': '"@"'}, 572 575 {'type': 'int', 'tag': 'INT', 'strc': '""', 'conc': '""'}, 573 576 {'type': 'long int', 'tag': 'LONG', 'strc': '"l"', 'conc': '"L"'},
Note:
See TracChangeset
for help on using the changeset viewer.