Commit 2324827
authored
Remove --enable-libstdcxx-debug from build.sh (#31)
This option causes GCC to build and install a second copy of
libstdc++.so and libstdc++.a (for each multilib) which is built with
`-g3 -O0 -D_GLIBCXX_ASSERTIONS` instead of `-g3 -O2`
These duplicate libs are intended to help when trying to step into
libstdc++.so with GDB, mostly for the purposes of debugging libstdc++.so
itself. That isn't possible on Compiler Explorer, because you can't run
GDB.
Unless I'm missing something, it's not even really possible to link to
these alternative libs, because they're installed in a path like
`$prefix/lib64/debug` and users would need to know that path and then
set it in the options with `-L` to find the alternative libs.
When using CE just to compile code, this is completely pointless, it
doesn't make any difference which lib gets linked to if you just want to
compile to assembly.
When using CE for execution, this is also completely pointless unless
the user either passes the path with `-L` and links statically (e.g.
`-static-libstdc++`) or somehow arranges for the debug libs to be found
by the dynamic linker at runtime, e.g. using `-Wl,-rpath,...` or somehow
setting `LD_RUN_PATH` or `LD_LIBRARY_PATH` in the environment. Even if
they do all that ... what's the point? They can't use GDB to debug the
internals of libstdc++ anyway.
So it seems to me that using this configure option is just doubling the
disk space needed by each gcc build, because you're installing useless
`-O0` copies of libstdc++ for each multilib (-m32, -m64, and -mx32).1 parent a1b069a commit 2324827
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
287 | 286 | | |
288 | 287 | | |
289 | 288 | | |
| |||
0 commit comments