This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/8197: std::sin(float) causes undefined reference to sinf
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 27 Oct 2002 21:46:03 -0000
- Subject: Re: libstdc++/8197: std::sin(float) causes undefined reference to sinf
- Reply-to: Gabriel Dos Reis <gdr at integrable-solutions dot net>
The following reply was made to PR libstdc++/8197; it has been noted by GNATS.
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
Cc: gcc-gnats@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: libstdc++/8197: std::sin(float) causes undefined reference to sinf
Date: 27 Oct 2002 23:41:47 +0100
"Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de> writes:
| I got some more information on this one and a patch that fixes the
| problem for me:
Thanks for reporting more info on this issue.
[...]
| The problem seems to be that std::sin(float) is an inline function defined in
| cmath. This inline function uses __builtin_sinf which in turn generates
| a reference to a function sinf.
| This function even exists and is exported from stubs.o:
|
| turing# nm sparc-sun-solaris2.9/libstdc++-v3/libmath/stubs.o |grep sinf
| 00000714 T sinf
|
| However, in libstdc++.so the symbol sinf is private:
Benjamin,
Do we have infrastructure to export symbols based on target
configurations? If not, does telling linker-map.gnu to export
non-existing symbols an error? If not, is it documented to work as
"expected"?
Thanks,
-- Gaby
PS: I just realized I asked more questions that could provide any hints.