Review rework 1: Enabling winscw builds of PDLLs wip
authorIain Williamson <iain.williamson@nokia.com>
Fri, 11 Dec 2009 17:20:47 +0000
branchwip
changeset 81 7653ed978a00
parent 80 cc878ffa65f3
child 82 2c3a3c79b512
Review rework 1: Enabling winscw builds of PDLLs
sbsv2/raptor/lib/config/winscw.xml
sbsv2/raptor/lib/flm/e32abiv2dll.flm
sbsv2/raptor/lib/flm/e32abiv2pdll.flm
sbsv2/raptor/lib/flm/emulator.xml
sbsv2/raptor/lib/flm/standard.xml
sbsv2/raptor/lib/flm/win32dll.flm
sbsv2/raptor/lib/flm/win32pdll.flm
sbsv2/raptor/test/smoke_suite/pdll_winscw.py
sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/pbld.inf
--- a/sbsv2/raptor/lib/config/winscw.xml	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/lib/config/winscw.xml	Fri Dec 11 17:20:47 2009 +0000
@@ -26,6 +26,7 @@
 		<set name="INTERFACE.exe" value="Emulator.exe"/>
 		<set name="INTERFACE.stdexe" value="Emulator.stdexe"/>
 		<set name="INTERFACE.dll" value="Emulator.dll"/>
+		<set name="INTERFACE.pdll" value="Emulator.pdll"/>
 		<set name="INTERFACE.stddll" value="Emulator.stddll"/>
 		<set name="INTERFACE.exexp" value="Emulator.exexp"/>
 		<set name="INTERFACE.fsy" value="Emulator.fsy"/>
--- a/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2dll.flm	Fri Dec 11 17:20:47 2009 +0000
@@ -16,7 +16,7 @@
 # 
 #
 
-ifneq ($(call isoneof,$(TARGETTYPE),dll pdll),)
+ifeq ($(TARGETTYPE),dll)
 include $(FLMHOME)/e32abiv2defaults.mk
 
 # What we need to build a DLL
@@ -55,6 +55,6 @@
 $(call vrestore)
 
 else
-$(error $e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+$(error e32abiv2dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
 endif
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2pdll.flm	Fri Dec 11 17:20:47 2009 +0000
@@ -0,0 +1,61 @@
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# ARMv5 PDLL ABIv2 Function Like Makefile (FLM)
+# Build an e32 PDLL (Patchable constants DLL)
+# 
+#
+
+ifeq ($(TARGETTYPE),pdll)
+include $(FLMHOME)/e32abiv2defaults.mk
+
+# What we need to build a DLL
+ifeq ($(NOEXPORTLIBRARY),)
+IMPORTLIBRARYREQUIRED:=1
+endif
+POSTLINKDEFFILE:=$(DEFFILE)
+SUPPORT_FREEZE:=1
+
+# Default Linker settings for this target type
+LINKER_ENTRYPOINT_LIBDEP:=$(STATIC_RUNTIME_DIR)/edll.lib
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRY_OPTION)=_E32Dll $(LINKER_ENTRYPOINT_DECORATION)$(LINKER_SEPARATOR)$(call dblquote,$(STATIC_RUNTIME_DIR)/edll.lib$(LINKER_ENTRYPOINT_ADORNMENT))
+
+ifeq ("$(NEED_ENTRYPOINT_LIBRARY)","True")
+LINKER_ENTRYPOINT_SETTING:=$(LINKER_ENTRYPOINT_SETTING) $(LINKER_ENTRYPOINT_LIBDEP)
+endif
+
+LINKER_STUB_LIBRARY:=$(STATIC_RUNTIME_DIR)/edllstub.lib
+STATIC_RUNTIME_LIB:=$(USER_STATIC_RUNTIME_LIB)
+
+
+# Default Postlinker settings
+CANHAVEEXPORTS:=1
+POSTLINKTARGETTYPE:=DLL
+POSTLINKFILETYPE:=dll
+DOPOSTLINK:=1
+CANIGNORENONCALLABLE:=1
+
+# Use the general EABI FLM 
+# We are appending to CDEFS but we don't want this to affect
+# other invocations so we are going to save it on a stack
+# and restore it afterwards
+$(call vsave,CDEFS)
+CDEFS:=$(CDEFS) __DLL__
+include $(FLMHOME)/e32abiv2.flm
+$(call vrestore)
+
+else
+$(error e32abiv2pdll.flm called with wrong TARGETTYPE (should be 'pdll' but is '$(TARGETTYPE)'))
+endif
+
+
--- a/sbsv2/raptor/lib/flm/emulator.xml	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/lib/flm/emulator.xml	Fri Dec 11 17:20:47 2009 +0000
@@ -151,6 +151,23 @@
 		<param name='MAKEDEF'/>
 	</interface>
 
+	<interface name="Emulator.pdll" extends="Emulator.win32" flm="win32pdll.flm">
+		<param name='CHECKLIB' default=''/>
+		<param name='LD'/>
+		<param name='LFLAGS_INFGEN'/>
+		<param name='OPT.CHECKLIB.STDCPP'/>
+		<param name='OPT.CHECKLIB.SYMCPP'/>
+		<param name='OPT.CHECKLIB.WIN32'/>
+		<param name='OPT.HEAPCOMMIT'/>
+		<param name='OPT.HEAPRESERVE'/>
+		<param name='OPT.IMAGEBASE'/>
+		<param name='OPT.IMPLIB'/>
+		<param name='OPT.LIBFILE'/>
+		<param name='OPT.LIBPATH'/>
+		<param name='OPT.NOIMPLIB'/>
+		<param name='MAKEDEF'/>
+	</interface>
+
 	<interface name="Emulator.stddll" extends="Emulator.dll" flm="win32stddll.flm">
 		<param name='LFLAGS_SYMGEN'/>
 		<param name='SYMLOOKUPUTIL'/>
--- a/sbsv2/raptor/lib/flm/standard.xml	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/lib/flm/standard.xml	Fri Dec 11 17:20:47 2009 +0000
@@ -212,7 +212,7 @@
 		<param name='TARGETTYPE' default="dll"/>
 		<param name='UID1' default="10000079"/>
 	</interface>
-	<interface name="Symbian.pdll" extends="Symbian.e32abiv2" flm="e32abiv2dll.flm">
+	<interface name="Symbian.pdll" extends="Symbian.e32abiv2" flm="e32abiv2pdll.flm">
 		<param name='TARGETTYPE' default="pdll"/>
 		<param name='UID1' default="10000079"/>
 	</interface>
--- a/sbsv2/raptor/lib/flm/win32dll.flm	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/lib/flm/win32dll.flm	Fri Dec 11 17:20:47 2009 +0000
@@ -30,5 +30,5 @@
 include $(FLMHOME)/win32.flm
 
 else
-$(error $win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+$(error win32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
 endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/lib/flm/win32pdll.flm	Fri Dec 11 17:20:47 2009 +0000
@@ -0,0 +1,34 @@
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+# WINSCW PDLL Function Like Makefile (FLM)
+# Build an emulator PDLL
+# 
+#
+
+ifeq ($(TARGETTYPE),pdll)
+
+BASE_TYPE:=dll
+CW_STATIC_RUNTIME:=1
+FIRST_STATLIB:=
+FIXED_EXPORT:=
+SUPPORTS_IMPORT_LIBRARY:=1
+SYSTEM_TARGET:=0
+UID2_DEFAULT:=
+
+# Use the general win32 FLM 
+include $(FLMHOME)/win32.flm
+
+else
+$(error $winp32dll.flm called with wrong TARGETTYPE (should be 'dll' but is '$(TARGETTYPE)'))
+endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/pdll_winscw.py	Fri Dec 11 17:20:47 2009 +0000
@@ -0,0 +1,39 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: 
+#
+
+from raptor_tests import SmokeTest
+
+def run():
+	t = SmokeTest()
+	t.id = "y"
+	t.name = "pdll_winscw"
+	t.command = "sbs -b smoke_suite/test_resources/simple_dll/pbld.inf -c winscw"
+	t.targets = [
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticpdll.lib",
+		"$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticpdll.dll",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/createstaticpdll.dll",
+		"$(EPOCROOT)/epoc32/release/winscw/urel/createstaticpdll.dll.map"
+		]
+	t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [
+		"createstaticpdll_dll/winscw/udeb/CreateStaticDLL.o",
+		"createstaticpdll_dll/winscw/udeb/createstaticpdll.UID.CPP",
+		"createstaticpdll_dll/winscw/udeb/createstaticpdll_UID_.o",
+		"createstaticpdll_dll/winscw/urel/CreateStaticDLL.o",
+		"createstaticpdll_dll/winscw/urel/createstaticpdll.UID.CPP",
+		"createstaticpdll_dll/winscw/urel/createstaticpdll_UID_.o"
+	])
+	t.run()
+	return t
--- a/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/pbld.inf	Thu Dec 10 16:51:17 2009 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple_dll/pbld.inf	Fri Dec 11 17:20:47 2009 +0000
@@ -18,7 +18,7 @@
 
 
 PRJ_PLATFORMS
-ARMV5 ARMV6 ARMV7 ARMV5SMP
+ARMV5 ARMV6 ARMV7 ARMV5SMP WINSCW
 
 PRJ_MMPFILES