URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [lto/] [README] - Rev 689
Compare with Previous | Blame | View Log
This directory contains tests for link-time optimization (LTO).Tests in this directory may span multiple files, so the naming ofthe files is significant.The name of every file must end with '_N' where N is an integer.All the files with the same name base and different _N suffixeswill be compiled separately and linked together to form the finalexecutable.By default, each set of files will be compiled with list ofoptions listed in LTO_OPTIONS (../../lib/lto.exp), which can beoverwritten in the shell environment or using the 'dg-lto-options'command in the main file of the set (i.e., the file with _0suffix).For example, given the files a_0.C a_1.C a_2.C, they will becompiled as:$ g++ -c <flags> a_0.C$ g++ -c <flags> a_1.C$ g++ -c <flags> a_2.C$ g++ -o <executable> a_0.o a_1.o a_2.oTests that do not need more than one file are a special casewhere there is a single file named 'foo_0.C'.The only supported dg-lto-do option are 'assemble', 'run' and 'link'.Additionally, these can only be used in the main file. If'assemble' is used, only the individual object files aregenerated. If 'link' is used, the final executable is generatedbut not executed (in this case, function main() needs to existbut it does not need to do anything). If 'run' is used, thefinal executable is generated and the resulting binary executed.The default value for dg-lto-do is 'run'.
