This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [buildbot] Customized build and board file


On Thu, Oct 6, 2016 at 10:08 PM, Sergio Durigan Junior
<sergiodj@redhat.com> wrote:
>
> Yes, it is possible to provide specific parameters to a builder, so it
> should be easy to do this.  About the new board file, I understand that
> it is just a workaround due to the limitations you mentioned below, and
> as such it is not going to be put upstream, right?  We'd also have to
> provide a specific parameter to this builder if we want it to use this
> board file.
>

Yes, if we have an armv7 box in gcc compile farm, we don't need that
board file at all.  The board file won't be upstream.

>> Note that this is trade-off among various limitations,
>>  - we don't have armv7 devices in gcc compile farm, so we have to emulate
>>    on an armv8 machine,
>>  - libc6:armhf is not installed on gcc114, so I build the toolchain, and force
>>    gdb and test programs use my sysroot.  I am going to raise a request to
>>    install libc6:armhf, but it may take a while.
>
> It's been a while since I want to have an ARM buildslave on the
> BuildBot, so even with these limitations I still think it's a nice thing
> to have.
>
> Thanks for working on this.  I'll have to write special code for this
> buildslave, so let me know when you have everything ready.

When you write code, please take another requirement into account,
that is, I may set up another buildslave where GDB is built for
aarch64, but test cases are compiled for arm.  In this case, nothing
special in configure option, but another board file is needed too.

Here are my steps to build gdb and run tests on gcc114,

TOOLCHAIN=/home/qiyao/gcc-7/arm-linux-gnueabihf

cd build-arm
../binutils-gdb/configure --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
CC="$TOOLCHAIN/bin/arm-linux-gnueabihf-gcc
--sysroot=$TOOLCHAIN/sysroot"
CXX="$TOOLCHAIN/bin/arm-linux-gnueabihf-g++
--sysroot=$TOOLCHAIN/sysroot"
LDFLAGS="-Wl,-dynamic-linker,$TOOLCHAIN/sysroot/lib/ld-linux-armhf.so.3
-Wl,-rpath,$TOOLCHAIN/sysroot/lib
-Wl,-rpath,$TOOLCHAIN/sysroot/usr/lib -Wl,-rpath,$TOOLCHAIN/lib"
--disable-ld --disable-gold --disable-binutils --disable-gas
--disable-gprof
PATH=$TOOLCHAIN/bin:$PATH make -j32
cd gdb
PATH=/home/qiyao/gcc-7/arm-linux-gnueabihf/bin:$PATH make check
RUNTESTFLAGS='--target_board=unix-aarch32'

and unix-aarch32.exp is:
---------------------
unset_board_info isremote
set_board_info isremote 0

load_generic_config "unix"

process_multilib_options ""

set toolchain_base "/home/qiyao/gcc-7/arm-linux-gnueabihf"

set_board_info compiler "${toolchain_base}/bin/arm-linux-gnueabihf-gcc
--sysroot=${toolchain_base}/sysroot"
set_board_info c++compiler
"${toolchain_base}/bin/arm-linux-gnueabihf-g++
--sysroot=${toolchain_base}/sysroot"
set_board_info f77compiler
"${toolchain_base}/bin/arm-linux-gnueabihf-gfortran
--sysroot=${toolchain_base}/sysroot"
set_board_info f90compiler
"${toolchain_base}/bin/arm-linux-gnueabihf-gfortran
--sysroot=${toolchain_base}/sysroot"

set_board_info ldflags
"-Wl,-dynamic-linker,${toolchain_base}/sysroot/lib/ld-linux-armhf.so.3
-Wl,-rpath,${toolchain_base}/sysroot/usr/lib/
-Wl,-rpath,${toolchain_base}/sysroot/lib
-Wl,-rpath,${toolchain_base}/lib"

set_board_info gdb_init_commands [list "set libthread-db-search-path
${toolchain_base}/sysroot/lib" "set auto-load safe-path /" "set
sysroot /" ]

proc gdb_load { arg } {
    global gdb_prompt

    foreach command [gdb_init_commands] {
        send_gdb "$command\n"
        gdb_expect 30 {
            -re "$gdb_prompt $" { }
            default {
                perror "gdb_init_command for target failed"
                return
            }
        }
    }

    if { $arg != "" } {
        return [gdb_file_cmd $arg]
    }
    return 0
}
---------------------------

There are 1138 test fails but I didn't triage them yet.

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]