The "invalid compiler" difficulty can be solved as follows (at least it is for me). I don't know whether this will be sufficient to let you build your project.
I assume that the fipsld
script is present and correct at /usr/local/ssl/fips-2.0/bin/fipsld
.
In the Code::Blocks IDE, create a new compiler with the name of your choice that is a copy of GCC. (It looks like you have successfully done this)
In the new compiler's settings, tab to Toolchain executables and make the following new settings:
- Compiler's installation directory =
<empty>
- Program files - > C compiler = /usr/local/ssl/fips-2.0/bin/fipsld
- Compiler's installation directory =
Leave all other compiler settings unchanged and
OK
.Ensure that Code::Blocks has the Environment Variables Editor plugin installed as per https://stackoverflow.com/a/21064014/1362568
In Environment -> Environment Variables, add the environment variable setting:
CC = gcc
and OK
. Do not add any Additional paths to the settings, unless you
need to later for some other reason.
I am now able to build C projects with the new compiler. Code::Blocks issues a
build-time warning Can't find compiler executable in your configured
search paths for <compiler_name>
, but this is a false alarm.
The environment settings that are shown in your screen shot:
CC = /usr/local/ssl/fips-2.0/bin/fipsld
FIPSLD_CC = /usr/bin/g++
are off the mark because the first line of the fipsld
script is:
CC=${FIPSLD_CC:-${CC}}
So, if you made the first of your two settings but not the second, the script
would default $CC
to its own pathname - a circularity. And if you avoid this
by making both settings then the first is superfluous to Code::Blocks:
it has no need for an environent variable that refers to
/usr/local/ssl/fips-2.0/bin/fpsld
because you have configured
that script as the compiler. It is only fipsld
itself that wants $CC
, referring to the
C compiler. So you might as well just set CC = gcc
,
the host C compiler. CC = g++
may be OK for your purposes, but conventionally
CC
refers to your C compiler and your C++ compiler is referred to by CXX
.
As for the problem of configuring /usr/local/bin/gdb to be invoked instead of /usr/bin/gdb, I can only speak of v12.11, which I am running, but for 12.11 this is the answer