llvm.org GIT mirror llvm / e9a6c35
Validation fixes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42227 91177308-0d34-0410-b5e6-96231b3b80d8 Bill Wendling 13 years ago
1 changed file(s) with 66 addition(s) and 72 deletion(s). Raw diff Collapse all Expand all
5252
  • After Subversion update, rebuilding gives the error "No rule to make
  • 5353 target".
    5454
  • The llvmc program gives me errors/doesn't
  • 55 work.li>>
    55 work.a>>
    5656
    5757
    5858
  • Source Languages
  • 181181

    Some porting problems may exist in the following areas:

    182182
    183183
    184
    185184
  • The GCC front end code is not as portable as the LLVM suite, so it may not
  • 186 compile as well on unsupported platforms.
    185 compile as well on unsupported platforms.
    187186
    188187
  • The LLVM build system relies heavily on UNIX shell tools, like the Bourne
  • 189 Shell and sed. Porting to systems without these tools (MacOS 9, Plan 9) will
    190 require more effort.
    191
    188 Shell and sed. Porting to systems without these tools (MacOS 9, Plan 9)
    189 will require more effort.
    192190
    193191
    194192
    226224 it:

    227225
    228226
    229
    230227
  • Adjust your PATH environment variable so that the correct

  • 231 program appears first in the PATH. This may work, but may not be
    232 convenient when you want them first in your path for other
    233 work.

    228 program appears first in the PATH. This may work, but may not be
    229 convenient when you want them first in your path for other
    230 work.

    234231
    235232
  • Run configure with an alternative PATH that is

  • 236 correct. In a Borne compatible shell, the syntax would be:

    237
    238

    PATH=[the path without the bad program] ./configure ...

    233 correct. In a Borne compatible shell, the syntax would be:

    234
    235
    236
    
                      
                    
    237 % PATH=[the path without the bad program] ./configure ...
    238
    239
    239240
    240241

    This is still somewhat inconvenient, but it allows configure

    241 to do its work without having to adjust your PATH
    242 permanently.

    243
    242 to do its work without having to adjust your PATH
    243 permanently.

    244244
    245245
    246246
    256256
    257257
    258258
    259

    I've updated my source tree from Subversion, and now my build is trying to

    260 use a file/directory that doesn't exist.

    259

    I've updated my source tree from Subversion, and now my build is trying to

    260 use a file/directory that doesn't exist.

    261261
    262262
    263263
    272272
    273273
    274274
    275
    276275

    If the Makefile already exists in your object tree, you

    277276 can just run the following command in the top level directory of your object
    278277 tree:

    279278
    280 <p>./config.status <relative path to Makefile>>
    279 <div class="doc_code">
    280
    % ./config.status <relative path to Makefile>
    281
    281282
    282283

    If the Makefile is new, you will have to modify the configure script to copy

    283284 it over.

    313314

    For example, if you built LLVM with the command:

    314315
    315316
    316
    
                      
                    
    317 % gmake ENABLE_PROFILING=1
    318 </pre>
    317 <pre>% gmake ENABLE_PROFILING=1</pre>
    319318
    320319
    321320

    ...then you must run the tests with the following commands:

    353352
    354353
    355354

    This is a bug in GCC, and

    356 affects projects other than LLVM. Try upgrading or downgrading your GCC.

    357
    358
    359
    360

    After Subversion update, rebuilding gives the error

    361 "No rule to make target".

    355 affects projects other than LLVM. Try upgrading or downgrading your GCC.

    356
    357
    358
    359

    After Subversion update, rebuilding gives the error "No rule to make

    360 target".

    362361
    363362
    364363
    388387 rebuilding.

    389388
    390389
    391
    392 The llvmc program gives me errors/doesn't
    393 work.

    394
    395
    396
    397

    llvmc is experimental and isn't really supported. We suggest

    398 using llvm-gcc instead.>
    390
    391 The llvmc program gives me errors/doesn't work.

    392
    393
    394
    395

    llvmc is experimental and isn't really supported. We suggest

    396 using llvm-gcc instead.

    399397
    400398
    401399
    416414

    The PyPy developers are working on integrating LLVM into the PyPy backend

    417415 so that PyPy language can translate to LLVM.

    418416
    419
    420

    What support is there for a higher level source language constructs for

    417
    418 What support is there for a higher level source language constructs for
    421419 building a compiler?

    422420
    423421
    430428 of running optimizations, linking, and executable generation.

    431429
    432430
    433
    434

    I don't understand the GetElementPtr

    435 instruction. Help!>
    431
    432 I don't understand the GetElementPtr instruction. Help!

    436433
    437434
    438435

    See The Often Misunderstood GEP

    439 Instruction.li>
    436 Instruction.p>
    440437
    441438
    442439
    532529

    Use commands like this:

    533530
    534531
    535
  • Compile your program as normal with llvm-g++:

    >
  • 532
  • Compile your program as normal with llvm-g++:>

  • 536533
    537534
    538535
    
                      
                    
    540537
    541538
    542539
    543

    or:

    540

    or:

    544541
    545542
    546543
    
                      
                    
    550547
    551548
    552549
    553

    With llvm-gcc3, this will generate program and program.bc. The .bc file is

    554 the LLVM version of the program all linked together.

    555
    556
  • Convert the LLVM code to C code, using the LLC tool with the C

  • 557 backend:

    550

    With llvm-gcc3, this will generate program and program.bc. The .bc

    551 file is the LLVM version of the program all linked together.

    552
    553
  • Convert the LLVM code to C code, using the LLC tool with the C

  • 554 backend:

    558555
    559556
    560557
    
                      
                    
    561558 % llc -march=c program.bc -o program.c
    562559
    563
    564
    565 <li>

    Finally, compile the c file:>

    560 </div>
    561
    562
  • Finally, compile the C file:

  • 566563
    567564
    568565
    
                      
                    
    569566 % cc x.c
    570567
    571
    568
    572569
    573570
    574571
    575

    Note that, by default, the C backend does not support exception handling.

    576 If you want/need it for a certain program, you can enable it by passing
    577 "-enable-correct-eh-support" to the llc program. The resultant code will
    578 use setjmp/longjmp to implement exception support that is correct but
    579 relatively slow.
    580

    581
    582

    Also note: this specific sequence of commands won't work if you use a

    583 function defined in the C++ runtime library (or any other C++ library). To
    584 access an external C++ library, you must manually
    585 compile libstdc++ to LLVM bitcode, statically link it into your program, then
    586 use the commands above to convert the whole result into C code. Alternatively,
    587 you can compile the libraries and your application into two different chunks
    588 of C code and link them.

    589
    590
    591
    592
    572

    Note that, by default, the C backend does not support exception handling. If

    573 you want/need it for a certain program, you can enable it by passing
    574 "-enable-correct-eh-support" to the llc program. The resultant code will use
    575 setjmp/longjmp to implement exception support that is correct but relatively
    576 slow.

    577
    578

    Also note: this specific sequence of commands won't work if you use a

    579 function defined in the C++ runtime library (or any other C++ library). To
    580 access an external C++ library, you must manually compile libstdc++ to LLVM
    581 bitcode, statically link it into your program, then use the commands above to
    582 convert the whole result into C code. Alternatively, you can compile the
    583 libraries and your application into two different chunks of C code and link
    584 them.

    585
    586
    593587
    594588
    595589