Closed GavinRay97 closed 1 year ago
The tool expects to find the executable "gcc" or "gcc-
Ah, thanks for clarifying. It may be fruitful to clarify this section in the docs, or the error message returned IMO. I understood it to mean other names than gcc
, like dcc
or gcc-dev
could be used:
Here's the script in case anyone else winds up finding this on the internet in the future:
#!/bin/env bash
# Set up GCC 13 dev binaries for at /usr/local/gcc-dev/bin
# for use with Ada Core's gprbuild
# (and gprconfig, which is used by gprbuild)
GCC_BINDIR=/usr/local/gcc-dev/bin
# We need to create symlinks from "-dev" to unprefixed binaries, because gprconfig expects this (or "<name>-<ver>")
# See: https://github.com/AdaCore/gprbuild/issues/122
# find every binary beginning with "gnat*", and ending with "-dev", and symlink it to the same name without "-dev"
for f in $(find $GCC_BINDIR -maxdepth 1 -type f -name "gnat*" -name "*-dev"); do
ln -s $f ${f%-dev}
done
ln -s $GCC_BINDIR/gcc-dev $GCC_BINDIR/gcc
ln -s $GCC_BINDIR/g++-dev $GCC_BINDIR/g++
# --config=language[,version[,runtime[,path[,name]]]]
gprconfig --batch \
--target=x86_64-pc-linux-gnu \
--config=Ada,,,$GCC_BINDIR \
--config=C,,,$GCC_BINDIR,gcc \
--config=C++,,,$GCC_BINDIR,g++
I understood it to mean other names than gcc, like dcc or gcc-dev could be used:
Yes, but the executable thus specified must match one of
Ohh, that makes sense, thank you
I've built GCC 13 from source, with Ada/Gnat support, and I'd like to set it up with the VS Code extension. Unfortunately, I can't seem to figure out how to configure this properly =/