This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Go patch committed: Drop log2 and trunk


Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> The patch allowed the bootstrap to complete successfully, but since
> libgo.so now has undefined references to log2 and trunc, all Go
> execution still fail.

I went ahead and removed the uses of the libc log2 and trunc functions,
on the basis that although they are in C99 they are not in C89.
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian

diff -r e3822d0c556b libgo/go/math/floor.go
--- a/libgo/go/math/floor.go	Wed Feb 15 22:42:44 2012 -0800
+++ b/libgo/go/math/floor.go	Wed Feb 15 23:07:38 2012 -0800
@@ -58,11 +58,8 @@
 //	Trunc(ÂInf) = ÂInf
 //	Trunc(NaN) = NaN
 
-//extern trunc
-func libc_trunc(float64) float64
-
 func Trunc(x float64) float64 {
-	return libc_trunc(x)
+	return trunc(x)
 }
 
 func trunc(x float64) float64 {
diff -r e3822d0c556b libgo/go/math/log10.go
--- a/libgo/go/math/log10.go	Wed Feb 15 22:42:44 2012 -0800
+++ b/libgo/go/math/log10.go	Wed Feb 15 23:07:38 2012 -0800
@@ -21,11 +21,8 @@
 // Log2 returns the binary logarithm of x.
 // The special cases are the same as for Log.
 
-//extern log2
-func libc_log2(float64) float64
-
 func Log2(x float64) float64 {
-	return libc_log2(x)
+	return log2(x)
 }
 
 func log2(x float64) float64 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]