foss-for-synopsys-dwc-arc-processors/toolchain

Crosstool-NG doesn't trim paths for debug-root

Closed this issue · 3 comments

An example for arc-2023.03-rc1 build:

$ tree ./arc-linux-gnu/arc-snps-linux-gnu/debug-root
./arc-linux-gnu/arc-snps-linux-gnu/debug-root
├── SCRATCH
│   └── arcjenkins2
│       └── slaves
│           └── us01-odc-custom-arcoss4
│               └── workspace
│                   └── arcoss_verification
│                       └── arc_gnu_toolchain_verification
│                           └── build_toolchain-2
│                               └── crosstool-ng
│                                   └── arc-archs-linux-gnu
│                                       └── arc-snps-linux-gnu
│                                           └── sysroot
│                                               └── usr
│                                                   └── include
│                                                       ├── ansidecl.h
│                                                       ├── bfd.h
│                                                       ├── bfdlink.h
│                                                       ├── ctf-api.h
│                                                       ├── ctf.h
│                                                       ├── diagnostics.h
│                                                       ├── dis-asm.h
│                                                       ├── gdb
│                                                       │   └── jit-reader.h
│                                                       ├── plugin-api.h
│                                                       ├── sframe-api.h
│                                                       ├── sframe.h
│                                                       └── symcat.h
└── usr
    ├── bin
    │   ├── gcore
    │   ├── gdb
    │   ├── gdb-add-index
    │   ├── gdbserver
    │   └── gprof
    ├── lib
    │   ├── libbfd.a
    │   ├── libbfd.la
    │   ├── libctf-nobfd.a
    │   ├── libctf-nobfd.la
    │   ├── libctf.a
    │   ├── libctf.la
    │   ├── libopcodes.a
    │   ├── libopcodes.la
    │   ├── libsframe.a
    │   └── libsframe.la
    └── share
        └── gdb
            ├── syscalls
            │   ├── aarch64-linux.xml
            │   ├── amd64-linux.xml
            │   ├── arm-linux.xml
            │   ├── freebsd.xml
            │   ├── gdb-syscalls.dtd
            │   ├── i386-linux.xml
            │   ├── mips-n32-linux.xml
            │   ├── mips-n64-linux.xml
            │   ├── mips-o32-linux.xml
            │   ├── netbsd.xml
            │   ├── ppc-linux.xml
            │   ├── ppc64-linux.xml
            │   ├── s390-linux.xml
            │   ├── s390x-linux.xml
            │   ├── sparc-linux.xml
            │   └── sparc64-linux.xml
            └── system-gdbinit
                ├── elinos.py
                └── wrs-linux.py

22 directories, 45 files

Seems like it copies a full path starting from root instead of relatives paths for GDB headers.

I've created a corresponding PR for upstream which fixes this issue: crosstool-ng/crosstool-ng#1966.

I've pushed the patch in arc-2023.03 branch in out repository. Waiting for approval in upstream.

The patch is merged with upstream and already in arc-2023.03.