RVCT 4.0 support, gcce fixes (Bug 2283)
authorChetan Kapoor <chetank@symbian.org>
Tue, 04 May 2010 16:57:20 +0100
changeset 104 466a0df5c15a
parent 100 cad27fd7ca1a
child 105 ea2434cf3670
RVCT 4.0 support, gcce fixes (Bug 2283)
bsptemplate/asspandvariant/template_variant/bld.inf
kernel/eka/compsupp/bld.inf
kernel/eka/compsupp/gcce/gcce.h
kernel/eka/compsupp/rt_2_2.zip
kernel/eka/compsupp/rt_2_2_export.zip
kernel/eka/compsupp/rt_3_1.zip
kernel/eka/compsupp/rt_3_1_export.zip
kernel/eka/compsupp/rt_4_0_export.zip
kernel/eka/compsupp/rvct.h
kernel/eka/euser/epoc/arm/uc_dll.cpp
kernel/eka/euser/epoc/arm/uc_exe.cpp
kernel/eka/include/e32def.h
kernel/eka/kernel/arm/d_entry.cpp
kernel/eka/kernel/arm/k_entry.cia
kernel/eka/kernel/arm/l_entry.cia
kernel/eka/kernel/arm/v_entry.cpp
kernel/eka/kernel/arm/x_entry.cpp
kernel/eka/nkern/arm/nk_entry.cia
kernel/eka/personality/example/personality.h
kerneltest/e32utils/group/bld.inf
userlibandfileserver/fileserver/sfile/sf_func.h
--- a/bsptemplate/asspandvariant/template_variant/bld.inf	Wed Apr 21 17:14:04 2010 +0100
+++ b/bsptemplate/asspandvariant/template_variant/bld.inf	Tue May 04 16:57:20 2010 +0100
@@ -114,6 +114,11 @@
 
 start		extension		base.bootstrap bootstrap
 
+#ifdef SYMBIAN_OLD_EXPORT_LOCATION
+option INC_PATH   $(EPOCROOT)epoc32/include
+#else
+option INC_PATH   $(EPOCROOT)epoc32/include/platform
+#endif
 
 option		NAME			_template_bootrom
 option		CPU				arm
--- a/kernel/eka/compsupp/bld.inf	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/compsupp/bld.inf	Tue May 04 16:57:20 2010 +0100
@@ -59,19 +59,29 @@
 
 PRJ_EXTENSIONS
 
-// Unzip RVCT3.1 runtime if being built with RVCT2.2 or RVCT4.0
-
-start extension tools/compsupp
+// Export the compiler-specific support files built by this component
+// when using the other versions of RVCT
 
-#if defined(ARMCC_2_2) || defined(ARMCC_4_0)
-option  FILE  $(EXTENSION_ROOT)/rt_3_1.zip
-#elif defined(ARMCC_3_1)
-option  FILE  $(EXTENSION_ROOT)/rt_2_2.zip
+#if !defined(ARMCC_2_2)
+start extension tools/compsupp
+option  FILE  $(EXTENSION_ROOT)/rt_2_2_export.zip
+option  TODIR $(EPOCROOT)
+end
 #endif
 
-option  TODIR $(EPOCROOT)epoc32/release
+#if !defined(ARMCC_3_1)
+start extension tools/compsupp
+option  FILE  $(EXTENSION_ROOT)/rt_3_1_export.zip
+option  TODIR $(EPOCROOT)
+end
+#endif
 
+#if !defined(ARMCC_4_0)
+start extension tools/compsupp
+option  FILE  $(EXTENSION_ROOT)/rt_4_0_export.zip
+option  TODIR $(EPOCROOT)
 end
+#endif
 
 #endif // #if !defined GCCXML && !defined GCCE
 
--- a/kernel/eka/compsupp/gcce/gcce.h	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/compsupp/gcce/gcce.h	Tue May 04 16:57:20 2010 +0100
@@ -97,6 +97,7 @@
 // __NAKED__ from cpudefs.h
 #define __NAKED__ __declspec(naked)
 #define ____ONLY_USE_NAKED_IN_CIA____ __declspec(naked)
+#define __WEAK__  __attribute__((weak))
 
 // Int64 and Uint64 from nkern\nklib.h
 typedef long long Int64;
Binary file kernel/eka/compsupp/rt_2_2.zip has changed
Binary file kernel/eka/compsupp/rt_2_2_export.zip has changed
Binary file kernel/eka/compsupp/rt_3_1.zip has changed
Binary file kernel/eka/compsupp/rt_3_1_export.zip has changed
Binary file kernel/eka/compsupp/rt_4_0_export.zip has changed
--- a/kernel/eka/compsupp/rvct.h	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/compsupp/rvct.h	Tue May 04 16:57:20 2010 +0100
@@ -116,6 +116,7 @@
 // __NAKED__ from cpudefs.h
 #define __NAKED__ __asm
 #define ____ONLY_USE_NAKED_IN_CIA____ __asm
+#define __WEAK__  __attribute__((weak))
 
 // Int64 and Uint64 from nkern\nklib.h
 typedef long long Int64;
--- a/kernel/eka/euser/epoc/arm/uc_dll.cpp	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/euser/epoc/arm/uc_dll.cpp	Tue May 04 16:57:20 2010 +0100
@@ -44,11 +44,11 @@
 	return 0;
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_(void);
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
 	{
--- a/kernel/eka/euser/epoc/arm/uc_exe.cpp	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/euser/epoc/arm/uc_exe.cpp	Tue May 04 16:57:20 2010 +0100
@@ -70,11 +70,11 @@
 	}
 }
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 TInt CallThrdProcEntry(TInt (*aFn)(void*), void* aPtr, TInt aNotFirst);
 
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 void globalDestructorFunc()
 	{
--- a/kernel/eka/include/e32def.h	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/include/e32def.h	Tue May 04 16:57:20 2010 +0100
@@ -446,7 +446,7 @@
 #if __GNUC__ < 4
 #define _FOFF(c,f)			(((TInt)&(((c *)0x1000)->f))-0x1000)
 #else
-#define _FOFF(c,f)			__builtin_offsetof(c,f)
+#define _FOFF(c,f)			(__builtin_offsetof(c,f))
 #endif
 #endif
 
--- a/kernel/eka/kernel/arm/d_entry.cpp	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/kernel/arm/d_entry.cpp	Tue May 04 16:57:20 2010 +0100
@@ -49,11 +49,11 @@
 	return KernelModuleEntry(aReason);
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_(void);
-__weak void run_static_dtors(void);
+__WEAK__ void run_static_dtors(void);
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
 //
--- a/kernel/eka/kernel/arm/k_entry.cia	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/kernel/arm/k_entry.cia	Tue May 04 16:57:20 2010 +0100
@@ -71,7 +71,7 @@
 	asm("__CtorList: ");
 	asm(".word __CTOR_LIST__ ");
 	}
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
   
@@ -80,7 +80,7 @@
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can be a dummy (i.e. just a label)
 
-__asm void __dso_handle(void) {}
+__NAKED__ void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 void _E32Startup_Body(TLinAddr aRomHeader, TLinAddr aSuperPage);
--- a/kernel/eka/kernel/arm/l_entry.cia	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/kernel/arm/l_entry.cia	Tue May 04 16:57:20 2010 +0100
@@ -19,7 +19,7 @@
 
 extern "C" {
 
-#if defined(__ARMCC__)
+#if defined(__EABI__)
 void __DLL_Export_Table__(void);
 #endif
 
--- a/kernel/eka/kernel/arm/v_entry.cpp	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/kernel/arm/v_entry.cpp	Tue May 04 16:57:20 2010 +0100
@@ -46,7 +46,7 @@
 	return KErrGeneral;
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
@@ -55,7 +55,7 @@
 // needs destruction. But kernel side static objects will never need this so, define it as a nop
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can just be a label since its not used
-__asm void __dso_handle(void) {}
+__NAKED__ void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
--- a/kernel/eka/kernel/arm/x_entry.cpp	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/kernel/arm/x_entry.cpp	Tue May 04 16:57:20 2010 +0100
@@ -41,7 +41,7 @@
 	return KernelModuleEntry(aReason);
 	}
 
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
@@ -50,7 +50,7 @@
 // needs destruction. But the kernel never will need this so, define it as a nop
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can just be a label since its not used.
-__asm void __dso_handle(void){}
+__NAKED__ void __dso_handle(void){}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 GLDEF_C TInt _E32Dll_Body(TInt aReason)
--- a/kernel/eka/nkern/arm/nk_entry.cia	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/nkern/arm/nk_entry.cia	Tue May 04 16:57:20 2010 +0100
@@ -80,7 +80,7 @@
 	asm("__CtorList: ");
 	asm(".word __CTOR_LIST__ ");
 	}
-#elif defined(__ARMCC__)
+#elif defined(__EABI__)
 void __DLL_Export_Table__(void);
 void __cpp_initialize__aeabi_();
   
@@ -89,7 +89,7 @@
 void __record_needed_destruction (void * d){}
 // 2.1 calls __aeabi_atexit passing __dso_handle. This can be a dummy (i.e. just a label)
 
-__asm void __dso_handle(void) {}
+__NAKED__  void __dso_handle(void) {}
 void __aeabi_atexit(void *object, void (*dtor)(void *), void *handle){}
 
 void _E32Startup_Body(TLinAddr aRomHeader, TLinAddr aSuperPage);
--- a/kernel/eka/personality/example/personality.h	Wed Apr 21 17:14:04 2010 +0100
+++ b/kernel/eka/personality/example/personality.h	Tue May 04 16:57:20 2010 +0100
@@ -41,6 +41,8 @@
 typedef unsigned int size_t;
 #elif defined(__ARMCC__)
 typedef unsigned int size_t;
+#elif defined(__GCCE__)
+typedef unsigned int size_t;
 #endif
 
 #ifdef __cplusplus
--- a/kerneltest/e32utils/group/bld.inf	Wed Apr 21 17:14:04 2010 +0100
+++ b/kerneltest/e32utils/group/bld.inf	Tue May 04 16:57:20 2010 +0100
@@ -35,8 +35,6 @@
 
 ../profiler/profiler.h						SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(profiler.h)
 
-../analyse/profiler.rtf	/epoc32/engdoc/profiler/profiler.rtf
-
 ../d_exc/printstk.pl /epoc32/rom/tools/printstk.pl
 ../d_exc/printsym.pl /epoc32/rom/tools/printsym.pl
 
--- a/userlibandfileserver/fileserver/sfile/sf_func.h	Wed Apr 21 17:14:04 2010 +0100
+++ b/userlibandfileserver/fileserver/sfile/sf_func.h	Tue May 04 16:57:20 2010 +0100
@@ -918,9 +918,12 @@
 public:
 	static TInt Initialise(CFsRequest* aRequest);
 	static TInt DoRequestL(CFsRequest* aRequest);
+	
+#ifndef __GCCE__ // GCC does not like AddFsToCompositeMountL() being private 
 #ifndef __GCC32__ // GCC does not like AddFsToCompositeMountL() being private 
 private:
 #endif
+#endif
 	static void AddFsToCompositeMountL(TInt aDriveNumber, CFileSystem& aFileSystem, TInt aLocalDriveNumber);
 	};