[Bug libstdc++/42679] RTLD_DEEPBIND dlopen option for shared library that uses libstdc++ std::ostream crashes

2016-12-08 Thread maemarcus at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42679

maemarcus at gmail dot com changed:

   What|Removed |Added

 CC||maemarcus at gmail dot com

--- Comment #23 from maemarcus at gmail dot com ---
FWIW, I came across this issue with SEGFAULT in cerr on g++ 4.8.5.
Interestingly, cout in the same time works fine. Got resolved either by
removing RTLD_DEEPBIND, or by adding -static-libstdc++ to link line. Hint on
adding -fPIC was not helpful, as it is already added everywhere.

Program received signal SIGSEGV, Segmentation fault.
0x77b5af40 in std::ostream::sentry::sentry (this=0x7fffcf10,
__os=...)
at
/build/gcc-4.8-Iyjgor/gcc-4.8-4.8.5/build/x86_64-linux-gnu/libstdc++-v3/include/bits/ostream.tcc:51
51if (__os.tie() && __os.good())

[Bug driver/59321] -fuse-ld has no effect on -print-prog-name nor on --with-ld=

2013-12-02 Thread maemarcus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59321

--- Comment #17 from maemarcus at gmail dot com ---
Works as a charm! Many thanks!

$ manual-gcc -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld
$ manual-gcc -fuse-ld=bfd -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld.bfd
$ manual-gcc -fuse-ld=gold -print-prog-name=ld
/media/scratch/manual/binutils-2.24.51/build32_glibc/install/bin/manual-ld.gold


[Bug driver/59321] -fuse-ld does not have effect on -print-prog-name

2013-11-29 Thread maemarcus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59321

--- Comment #8 from maemarcus at gmail dot com ---
Dear H.J. Lu,

You patch works for me, thanks a lot! I noticed however, that with -fuse-ld ld
from the different location is used for me:

$ kernelgen-gcc -print-prog-name=ld
.../INSTALL/bin/kernelgen-ld
$ kernelgen-gcc -fuse-ld=bfd -print-prog-name=ld
.../INSTALL/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/ld.bfd
$ kernelgen-gcc -fuse-ld=gold -print-prog-name=ld
.../INSTALL/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.3/../../../../x86_64-unknown-linux-gnu/bin/ld.gold

I think the patch should first check if newname concatted with suffix exists,
or somehow else deal with possibly prefixed-ld names.


[Bug driver/59321] -fuse-ld does not have effect on -print-prog-name

2013-11-29 Thread maemarcus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59321

--- Comment #10 from maemarcus at gmail dot com ---
Right, I guess the reason of the difference is I'm configured with
--program-prefix=kernelgen-
--with-ld=$RPM_INSTALL_PREFIX/%{prefix}bin/kernelgen-ld
--with-as=$RPM_INSTALL_PREFIX/%{prefix}bin/kernelgen-as

In this case I expect -print-prog-name to add .gold/.bfd suffix to my --with-ld
setting, rather than to .../x86_64-unknown-linux-gnu/bin/ld


[Bug driver/59321] -fuse-ld does not have effect on -print-prog-name

2013-11-28 Thread maemarcus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59321

--- Comment #3 from maemarcus at gmail dot com ---
I'm only saying configure scripts use -print-prog-name to determine the linker,
and with introduction of -fuse-ld what's returned there could be inconsistent
with what linker is actually being used.


[Bug driver/59321] New: -fuse-ld does not have effect on -print-prog-name

2013-11-27 Thread maemarcus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59321

Bug ID: 59321
   Summary: -fuse-ld does not have effect on -print-prog-name
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: maemarcus at gmail dot com

Many configure scripts e.g. GLIBC use -print-prog-name to check the binary
utils used by GCC. Distros may face need to switch linker between bfd and gold,
which is now possible thanks to -fuse-ld flag. However, -print-prog-name is not
affected by -fuse-ld, and thus may lead to configure checks and actual build
being performed using different linkers.

$ kernelgen-gcc -fuse-ld=gold -print-prog-name=ld
/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld
$ kernelgen-gcc -fuse-ld=bfd -print-prog-name=ld
/home/marcusmae/rpmbuild/kernelgen/head_llvm192445_i686-linux-gnu_x86_64-linux-gnu_debug/INSTALL/bin/kernelgen-ld

I think -fuse-ld should play together with -print-prog-name. In the example
above with default gold, second command should point to kernelgen-ld.bfd