[CS-FSLUG] off topic? gcc help

warm38 at juno.com warm38 at juno.com
Tue Jul 20 09:42:55 CDT 2010


On Mon, 19 Jul 2010 10:55:59 -0500 christiansource-request at ofb.biz
writes:
> Date: Mon, 19 Jul 2010 06:46:13 -0500
> From: Tim Young <Tim.Young at LightSys.org>
> Subject: Re: [CS-FSLUG] off topic? gcc help
> Message-ID: <4C443B05.4020402 at LightSys.org>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> 
>   Well, looking at DejaGnu more, it looks like the runtest actually 
> does the compiling, running, and verification of the results. I did 
> not actually see what tests were for gcc.
> runtest needs "expect" and "tcl."
> and you also have: (http://gcc.gnu.org/install/test.html)
 
/usr/src/gcc-4.4.3/gcc/testsuite/{gcc.c-torture | gcc.dg | c-c++common |
somethingElse}
 
I have all the "stuff" to run, I just don't yet know how.  
AND I have to be able to move the code to a simulator which uses command
line inputs so that is easy.  My problem (not good at Makefile or scrpts)
is that I need to get it to run a perl script in the code that (if
compile is successful) will run a perl script to strip out stuff from the
.elf file and run them into the simulator that will return 1 or 0
(0=PASS; else FAIL)
 
>       /How can you run the testsuite on selected tests?/
> 
> /In order to run sets of tests selectively, there are targets `make 
> 
> check-gcc' and `make check-g++' in the gccmake check' in a 
> subdirectory of the object directory. / subdirectory of the object 
> directory. You can also just run `
> 
> /A more selective way to just run all gcc execute tests in the 
> testsuite is to use /
> 
> /          make check-gcc RUNTESTFLAGS="execute.expother-options"
> /
 
so I would have 
make check-gcc.c-torture  RUNTESTFLAGS="execute.expother-options"
make check-gcc.dg  RUNTESTFLAGS="execute.expother-options"
make check-gcc.c-c++common RUNTESTFLAGS="execute.expother-options"
 
 
> /Likewise, in order to run only the g++ ?old-deja? tests in the 
> testsuite with filenames matching `9805*', you would use /
> 
> /          make check-g++ 
> RUNTESTFLAGS="old-deja.exp=9805*other-options"
> /
> 
> /The *.exp files are located in the testsuite directories of the GCC 
 
Yes, I saw those.
 
> source, the most important ones being compile.exp, execute.exp, 
> dg.exp and old-deja.exp. To get a list of the possible *.exp files, 
> 
> pipe the output of `make check' into a file and look at the `Running 
> 
> ... .exp' lines. /
> 
> / /- Tim Young/
> /
 
> > Hello world comes out to be 346 instructions. Now to test:

 
I've got to work on the testsuite and make sure I have coverage for the
list which I replaced and added my thoughts.
I gotta present my ideas on this stuff today.  

     1. Recursive function calls (to test 'call stack'-related
functionality)
            There are tests for this in the testsuite, but probably will
require modification.
    2. Pointers
        (a) Array-pointer interchangeability
               There are tests for this in the testsuite, but may require
modification.
        (b) Type casting
                There are tests for this in the testsuite, but may
require modification.
        (c) Function arguments
                There are tests for this in the testsuite, but may
require modification.
    3. typedef
            There are tests for this in the testsuite, but may require
modification.
    4. multi-dimensional arrays
            There are tests for this in the testsuite, but probably will
require modification because of space constraints.
    5. Statements:
        (a) switch (including nested switch)
                There are tests for this in the testsuite, but probably
will require modification because of space constraints.
        (b) do/while
                There are tests for this in the testsuite, and may not
require modification.
        (c) goto, break, continue
                There are tests for this in the testsuite, but may not
require modification.
        (d) for (includes tests for exclusion of the initialization,
test, and update parts of the for statement)
                There are tests for this in the testsuite, but probably
will require modification because of space constraints.
    6. Structures (accessing members of structures, operations on
members, pointers to structures)
            There are tests for this in the testsuite, but probably will
require modification.
    7. Returning Arrays (as static array or pointer-based function
argument)
            There are tests for this in the testsuite, but probably will
require modification because of space constraints.
    8. Preprocessor
        (a) Macro definition and expansion for simple values and
function-like macros)
                There are tests for this in the testsuite, but may not
require modification.
        (b) Variadic Macros
                There are tests for this in the testsuite, but may not
require modification.
        (c) Conditional inclusion
                There are tests for this in the testsuite, and may not
require modification.
    9. Variable-length argument lists
            There are tests for this in the testsuite, but probably will
require modification because of space constraints.
    10. Special keywords (const, volatile, extern, inline, sizeof,
static)
            There are tests for this in the testsuite, and may not
require modification.
    11. Operators:
        (a) Arithmetic (+, -, *, /, %)
               This will be where the work needs to be done.
                1) no math library
                2) no available multiply nor divide instruction, so a
library is needed for those functions
                3) no divide, so '%' will require a "library" function
        (b) Boolean (!, &&, ||)
                There are tests for this in the testsuite, and may not
require modification.
        (c) Bitwise (~, &, |, ^, >>, <<)
                There are tests for this in the testsuite, and may not
require modification.
        (d) Referencing and dereferencing (related to pointer
manipulation)
                There are tests for this in the testsuite, but probably
will require modification because of space constraints.
        (e) Conditional evaluation
                There are tests for this in the testsuite, and may not
require modification.
        (f) Member selection (for structures, unions, pointer-based, etc)
                There are tests for this in the testsuite, but may
require modification.
    12. Nests:
        (a) Loops
                There are tests for this in the testsuite, and may not
require modification.
        (b) Function calls
                There are tests for this in the testsuite, but may
require modification.
        (c) Preprocessor Macros
                There are tests for this in the testsuite, and may not
require modification.
        (d) Structures
                There are tests for this in the testsuite, but may
require modification.

    13. Interrupt handling
            Work will need to be done here but may not be possible with
just the simulator because something controlled exteranlly needs to trip
the interrupt.
 
<snip> 
> > > > wade
> ------------------------------
> 
> Message: 4
> Date: Mon, 19 Jul 2010 08:33:24 -0500
> From: Tim Young <Tim.Young at LightSys.org>
> Subject: Re: [CS-FSLUG] off topic? gcc help
 
>   Sorry my response below was so cryptic. I was needing to run off to 
> do some stuff and wanted to at least get that information out there 
> before I ran out the door. I will have to run in and out a few times 
> today, and will probably just send the half-finished emails as I am 
> doing so.
 
Not a problem.  You have actually been rather helpful.
 
<snip> 
> Ok. So where do you go from here?
> This is half from memory. Sadly I am running around enough not to 
> have time to set up a test scenario and do a trial-run for you. That 
> would make things a lot smoother for you if I did that. :(
> 
> I am assuming you are on your OS on your small CPU. And that you  have 
> copied the GCC that you were given over to that OS.
> First of all, you need to successfully configure gcc.
> Have you run the ./configure with all the flags and gotten 
> ./configure to finish without errors?
 
2 problems have been found:
#1  what was given:
configure --target=xxx
it shoud have been 
configure --target=xxx-elf
 
#2 configure (and then make) was especting texinfo4.4 to 4.9, but I had
texinfo4.13 and it just could not see it and died.
 
Once that was OK, I was able to compile binutils.  Then I hung up on GCC
missing some variables that are supposed to come from mpfr, Should there
be a #include in the gcc/builtin.c file?  I didn't see any #include that
I would expect that would have  
#define BUILT_IN_J0  __imp__mpfr_j0
and then where does mpfr come in?  The guy who compiled it before me
would know...When he gets in later today, maybe he'll answer.
 
wade
 

____________________________________________________________
Get Free Email with Video Mail & Video Chat!
http://www.juno.com/freeemail?refcd=JUTAGOUT1FREM0210




More information about the Christiansource mailing list