[RFA PATCH 2/3 V3] Add "class" option for pascal compiler

Pedro Alves palves@redhat.com
Fri Jan 23 11:55:00 GMT 2015


On 01/23/2015 12:13 AM, Pierre Muller wrote:
>> Pedro Alves wrote:
>>> +	if { $i == "class" } {
>>> +	    if [board_info $dest exists pascal_class_flags] {
>>> +		append add_flags " [board_info $dest pscal_class_flags]"
>>
>> It'd be good to try setting this in a board file to make sure it
>> works.  I've spotted a typo here (same in the gpc branch):
>> "pscal_class_flags".
> 
>   I corrected the error below,
> but I never worked with boardinfo files,
> so I am not really sure how this works.

Should be something around this:

Create an empty ~/etc/site.exp file.  Point the
DEJAGNU environment variable to it, like:

  export DEJAGNU=/home/pedro/etc/site.exp

Create a ~/etc/boards/ directory, and create
a ~/etc/boards/fpc.exp file with this:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unset_board_info isremote
set_board_info isremote 0
load_generic_config "unix"

set_board_info compiler "[find_gcc]"

set_board_info pascal_class_flags "-Mobjfpc"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Run the pascal tests with

make check RUNTESTFLAGS="--target_board=fpc --directory=gdb.pascal"

Play with $pascal_class_flags, and make sure it does have the
effect intended.

The patch looks good to me.

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list