-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CT_GDB_NATIVE_STATIC and CT_GDB_GDBSERVER_STATIC no longer work #753
Comments
Did you enable CT_EXPERIMENTAL? These options have been marked experimental for a reason, see the help message for them. With recent binutils, these options now produce invalid binaries for several architectures. Note that if you just copied a previous Also note how the second of the binutils bugs [1] was "fixed". IIUC, static GDB build will break once binutils 2.29 is released (unless GDB is changed accordingly). |
Yes. I have EXPERIMENTAL marked. I really wanted a static version of gdbserver because I don't need libstdc++ but do want gdbserver) on the target. That said, I suppose I can just disable c++ support in gdbserver via --disable-libstdcxx? Or is that something else? |
It has nothing to do with C++ support. It is rather that new versions of binutils (since 2.25 or 2.26, AFAIR) have started to make the resulting binary dynamic, and it requests an invalid program interpreter (ld.so). Basically, with the command line that GDB uses to build gdbserver or native gdb, the compiler does not pass the path to ld.so - but ld decides it needs to create a dynamic binary and makes it request a non-existent default Read the links in the help message for these options, they are... educational. |
No, I understand that.. Just saying the reason I need a static gdbserver is because I don't want to require libstdc++.so on the target. Is there a way to remove gdbserver's reliance on libstdc++.so? I realize this is an offtopic question to some extent. |
I thought even static gdb would require libstdc++ (albeit static one). But yes, it is better asked on gdb's mailing lists, I doubt you'll find a lot of experts here. Anyway, back to this issue: can you check if
On the other hand, they requested /usr/lib/ld.so.1:
but the actual name of the ld.so is /lib/ld-linux.so.3. |
yet on the target
and if i move libstdc++ out of the way
|
Possibly related:
I am going to try to avoid -static and maybe just use -static-libstdc++ by itself. |
-static-libstdc++ without -static seems to work. I will issue a PR after more testing. |
Worked around by the above PR, building statically is known broken (at least with current binutils). |
As of f7c9ab3
Host:
Linux 4.9.0-3-amd64 #1 SMP Debian 4.9.30-1 (2017-06-04) x86_64 GNU/Linux
Building ARM target
gdb and gdbserver can no longer be built static
config.zip
The text was updated successfully, but these errors were encountered: