tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cwrapper g++ -v erroring out (Re: Help with attempt to update devel/gdb (currently in wip/gdb))



Am Fri, 25 Apr 2025 16:35:17 +0200
schrieb "Dr. Thomas Orgis" <thomas.orgis%uni-hamburg.de@localhost>:

> Continuing debugging, I hope not to the annoyance of the public. My
> current path lead me towards assuming a bug in cwrappers that manifests
> only with my separate gcc build on Debian, not with a system-provided
> gcc on Ubuntu.

I still am not further with diggign out why this sometimes causes
breakage in libtool and sometimes not, but I figured out why the
cwrapper call breaks simple `gcc -v` (or g++, identically):

1. Client code calls `gcc -v`.
2. Wrapper adds arguments.
3. `gcc -m64 "-fstack-protector-strong" "-Wl,-zrelro" -v` is actually called.
4. The -Wl,-zrelro causes gcc trying to call a linker with nothing to link.

This is fine:

	/bin/gcc -m64 "-fstack-protector-strong"  -v

This is not:

	/bin/gcc -m64 "-fstack-protector-strong" -Wl,-zrelro -v

Any -Wl,something added to the command line causes a linking attempt,
even without any linker input. Not sure right now how well that is
documented and how sensible it is. It just is.

So we should not be adding linker arguments to innocent compiler calls
just to get some version or build information. It changes behaviour.
Who's best versed in cwrapper code to fix this or argue against my
conclusion?


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index