forked from Lainports/freebsd-ports
default gcc version change when USE_FORTRAN=yes. Patches included from http://bugs.gentoo.org/show_bug.cgi?id=318045. [1] - Renamed and conditionalized some patches to support tgammaf function on OSVERSION < 800023. Previously, it was included even when present in the system math library. Also fixed name-mangling problem in the patches. Declarations were wrapped in 'extern "C"', but the definitions were not, causing a linker error. - Added a patch to CMakeLists.txt to prevent cmake from changing rpath during the installation phase. That caused libstdc++ from /usr/lib to be used instead of the one supplied with gcc 4.5. Requested by: gerald [1]
37 lines
713 B
C++
37 lines
713 B
C++
--- ./libs/libFN/mathfunc4.cpp.orig 2010-09-22 15:28:16.000000000 -0400
|
|
+++ ./libs/libFN/mathfunc4.cpp 2010-09-22 15:27:09.000000000 -0400
|
|
@@ -248,11 +248,17 @@
|
|
return r;
|
|
}
|
|
|
|
+#ifdef __cplusplus
|
|
+extern "C" {
|
|
+#endif
|
|
float lgammaf(float x)
|
|
{
|
|
int local_signgam;
|
|
return lgammaf_r(x, &local_signgam/*(_REENT_SIGNGAM(_REENT))*/);
|
|
}
|
|
+#ifdef __cplusplus
|
|
+}
|
|
+#endif
|
|
|
|
float gammaf_r(float x, int *signgamp)
|
|
{
|
|
@@ -264,6 +270,9 @@
|
|
return gammaf_r(x, &(_REENT_SIGNGAM(_REENT)));
|
|
}*/
|
|
|
|
+#ifdef __cplusplus
|
|
+extern "C" {
|
|
+#endif
|
|
float tgammaf(float x)
|
|
{
|
|
float y;
|
|
@@ -272,3 +281,6 @@
|
|
if (local_signgam < 0) y = -y;
|
|
return y;
|
|
}
|
|
+#ifdef __cplusplus
|
|
+}
|
|
+#endif
|