Closed Bug 401565 Opened 18 years ago Closed 18 years ago

Tamarin linux build fixup: very basic cross-compile and cast fixup

Categories

(Tamarin Graveyard :: Build Config, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: benjamin, Assigned: benjamin)

Details

Attachments

(2 files, 1 obsolete file)

I've been compiling mozilla in 32-bit configuration on a 64-bit Linux OS using CXX='g++ -m32' --target=i686-pc-linux and I've written a little patch to keep that configuration working for Tamarin as well... this fixes up some of the cross-compile logic that I originally wrote which was completely broken. In addition, there is a patch to the writebarriers to use an additional cast to avoid compile errors in avmplusList.h. Really I'd argue that there should be subclasses of avmplus::List for GC and RC objects, but that seems like a much more invasive change. /builds/xpcomgc/src/js/tamarin/core/avmplusList.h: In member function `void avmplus::List<T, kElementType>::wb(avmplus::uint32, T) [with T = avmplus::byte, avmplus::ListElementType kElementType = LIST_NonGCObjects]': /builds/xpcomgc/src/js/tamarin/core/avmplusList.h:103: instantiated from `avmplus::uint32 avmplus::List<T, kElementType>::add(T) [with T = avmplus::byte, avmplus::ListElementType kElementType = LIST_NonGCObjects]' /builds/xpcomgc/src/js/tamarin/core/AbcGen.h:53: instantiated from here /builds/xpcomgc/src/js/tamarin/core/avmplusList.h:281: warning: cast to pointer from integer of different size /builds/xpcomgc/src/js/tamarin/core/avmplusList.h:284: warning: cast to pointer from integer of different size
Attachment #286558 - Flags: review?(treilly)
Attachment #286558 - Flags: review?(treilly) → review+
Pushed to tamarin-central, revisions 199 and 200
Assignee: nobody → benjamin
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Looks like this change may have broken the Debugger builds (Release_Debugger and Debug_Debugger). All builds are fine if you update to the previous revision. Mac (Release_Debugger Debug_Debugger): tamarin-central/platform/mac/avmplus/../../../core/MethodInfo.cpp: In member function 'void avmplus::MethodInfo::initLocalNames()': tamarin-central/platform/mac/avmplus/../../../core/MethodInfo.cpp:177: error: invalid cast from type 'MMgc::RCPtr<avmplus::String*>' to type 'avmplus::uintptr' Windows (Release_Debugger Debug_Debugger): AVMPLUS ..\..\core\MethodInfo.cpp(177) : error C2440: 'type cast' : cannot convert from 'MMgc::RCPtr<T>' to 'avmplus::uintptr' with [ T=avmplus::Stringp ] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called SHELL: ..\..\extensions\SamplerScript.cpp(293) : error C2440: 'type cast' : cannot convert from 'MMgc::WriteBarrierRC<T>' to 'avmplus::uintptr' with [ T=avmplus::Stringp ] No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called Linux (Debug_Debugger): === compiling avmplus: === ../../extensions/SamplerScript.o -g -DAVMPLUS_NOVIRTUAL -DAVMPLUS_SHELL -fno-exceptions -fno-rtti -Wno-invalid-offsetof -rdynamic -D_DEBUG -DDEBUG -DUNIX -DCYGWIN -DAVMPLUS_IA32 -DDEBUGGER -DENABLE_COMPILER -DAVMPLUS_CDECL -DAVMPLUS_UNIX -DLINUX ../../extensions/SamplerScript.cpp: In member function ‘avmplus::ScriptObject* avmplus::SamplerScript::makeSample(avmplus::Sample)’: ../../extensions/SamplerScript.cpp:293: error: invalid cast from type ‘MMgc::WriteBarrierRC<avmplus::String*>’ to type ‘avmplus::uintptr’ make: *** [../../extensions/SamplerScript.o] Error 1
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This works... but I don't like it. I'm going to try and do my original idea with subclasses of avmcore::List for GC/RC objects.
Attachment #286831 - Flags: review?(treilly)
Attachment #286831 - Flags: review?(treilly) → review+
This is a much nicer solution than the hack above: it specializes the implementation of wb() so that we don't even compile the write-barriers for non-GCObject lists.
Attachment #286831 - Attachment is obsolete: true
Attachment #286873 - Flags: review?(treilly)
Attachment #286873 - Flags: review?(treilly) → review+
Attachment 286873 [details] [diff] pushed to tamarin-central, changeset 220/a09a22525c7f
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: