My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 60: HXCPP_M64 will no longer build on 2.06
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Dec 2010


 
Reported by waneck, Aug 29, 2010
What steps will reproduce the problem?
1. create an empty project
2. compile it with HXCPP_M64 on a 64-bit linux machine

What is the expected output? What do you see instead?
It is expected to compile. The compiler will instead fail on function __hxcpp_obj_id, because the return value is being cast from pointer to int (it's "losing precision")

What version of the product are you using? On what operating system?
haxe 2.06 / hxcpp 2.06 linux 64-bit

Please provide any additional information below.
As I said on an email regarding object hashes to the list, I think the best way to solve this would be to do some kind of cast to int, so we can still use it as an object hash, even though not a one-to-one hash. A possible way to do it would be something like:

//should be static_cast ?
reinterpret_cast<int>(obj % 2147483647 /*pow(2, 31)*/);

I don't know if this would compile as I don't have the linux box with me now, though. : )
Sep 5, 2010
Project Member #1 gameh...@gmail.com
--- BuildCommon.xml.orig	2010-09-03 11:11:27.873156663 -0700
+++ BuildCommon.xml	2010-09-03 11:10:38.571683219 -0700
@@ -441,6 +441,7 @@
   <compilerflag value="-DGC_THREADS" if="macos"/>
   <compilerflag value="-DNO_THREAD_REDIRECT" if="linux"/>
   <compilerflag value="-DGC_THREADS" if="linux"/>
+  <compilerflag value="-D_64BITS" if="HXCPP_M64"/>
 
   <compilerflag value="-I${HXCPP_CYG}/runtime/${GC_DIR}/include"/>
   <compilerflag value="-I${HXCPP_CYG}/runtime/${GC_DIR}/include/private"/>

Hi CauĂȘ,
 
I see you fixed quite a few more things than I did, I'll try your
patches out.
 
Btw, in hxcpp-64bit-r157.patch -fPIC is only added for 64 bit:
+  <compilerflag value="-fPIC" if="HXCPP_M64"/>
 
-fPIC is not 64 bit specific, so maybe rather do:
+  <compilerflag value="-fPIC" if="linux"/> 
+  <compilerflag value="-fPIC" if="macos"/>
 
Cheers,
Conrad
Dec 20, 2010
Project Member #2 gameh...@gmail.com
I have got it going on 64bit now.
Status: Fixed

Powered by Google Project Hosting