diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2013-10-21 21:59:32 -0400 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2013-10-22 08:18:04 +0100 |
commit | 2c8bbb43f3e77a214243c1121d83606429f63584 (patch) | |
tree | bb628c242e9304a401eeffbf0168818292458ac9 | |
parent | 363338367009f8156f4d49f6a24226eaf02db24c (diff) | |
download | perl-2c8bbb43f3e77a214243c1121d83606429f63584.tar.gz |
WinCE Perl EVC4 support
- CCTYPE has always been empty string in Makefile.ce, makedef.pl does not
complain about this, but it is a bug, so fix it
- create a profile for a EVC4 arm build
- put -GS- and -GL flags into compiler version specific defs so VC6 era
EVC4 will work
- don't delete ..\lib\Config.pm, it was made by win32/Makefile, for a
Desktop Perl, deleting this breaks miniperl when it loads its pure perl
modules for cross MakeMaker module building, and requires rebuilding the
Desktop Perl so miniperl works again. CE Perl has its Config.pm in the
xlib\$(MACHINE) dir
-rw-r--r-- | win32/Makefile.ce | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/win32/Makefile.ce b/win32/Makefile.ce index 4ac1e495d0..a6f57aa245 100644 --- a/win32/Makefile.ce +++ b/win32/Makefile.ce @@ -57,6 +57,15 @@ NOOP = @echo # keep this untouched! NULL = +# +# uncomment exactly one of the following +# +# Embedded Visual C++ 4 and older +CCTYPE = MSVC60 +# Smart Devices for Visual C++ 2005 (aka Visual C++ 8.x) (full version) +#CCTYPE = MSVC80 +# Smart Devices for Visual C++ 2008 (aka Visual C++ 9.x) (full version) +#CCTYPE = MSVC90 #CFG=DEBUG CFG=RELEASE @@ -76,6 +85,7 @@ MACHINE=wince-arm-hpc-wce300 #MACHINE=wince-sh3-palm-wce211 #MACHINE=wince-x86em-palm-wce211 #MACHINE=wince-x86-hpc-wce300 +#MACHINE=wince-arm-pocket-wce400 !endif # set this to your email address @@ -348,11 +358,31 @@ STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \ $(CECONSOLEDIR)/$(MACHINE)/w32console.obj !endif +!if "$(MACHINE)" == "wince-arm-pocket-wce400" +#CC = clarm.exe #set in WCEARMV4.BAT +ARCH = ARM +CPU = ARM +TARGETCPU = ARM +CEVersion = 400 +#OSVERSION = WCE300 #set in WCEARMV4.BAT +PLATFORM = MS Pocket PC +MCFLAGS = -D ARM -D arm -D _ARM_ -D _arm_ -DPROCESSOR_ARM \ + -D _MT -D _DLL -DPALM_SIZE -DPOCKET_SIZE \ + -I $(CELIBDLLDIR)\inc +MACH = -machine:arm +SUBSYS = -subsystem:windowsce,4.00 +CELIBPATH = $(CELIBDLLDIR)\$(MACHINE)-release +LDLIBPATH = -libpath:$(CELIBPATH) +STARTOBJS = $(CECONSOLEDIR)/$(MACHINE)/wmain.obj \ + $(CECONSOLEDIR)/$(MACHINE)/w32console.obj +!endif + + ###################################################################### # common section CEDEFS = -D_WINDOWS -D_WIN32_WCE=$(CEVersion) -DUNDER_CE=$(CEVersion) \ - $(MCFLAGS) -D PERL -GS- + $(MCFLAGS) -D PERL CECFLAGS = $(CEDEFS) -Zi @@ -365,9 +395,16 @@ CECFLAGS = $(CECFLAGS) -Od # Also the dll cannot be loaded by perl.exe... !if "$(CPU)" == "SH3" !else -CECFLAGS = $(CECFLAGS) -O1 -GL +CECFLAGS = $(CECFLAGS) -O1 !endif - +! IF "$(CCTYPE)" != "MSVC60" +#turn on LTCG optimization for CCs that have it +CECFLAGS = $(CECFLAGS) -GL +! ENDIF +! IF "$(CCTYPE)" == "MSVC80" || "$(CCTYPE)" == "MSVC90" +#no stack security cookie for CCs where its on by default +CECFLAGS = $(CECFLAGS) -GS- +! ENDIF !endif RCDEFS = /l 0x407 /r /d "UNICODE" /d UNDER_CE=$(CEVersion) \ @@ -508,6 +545,11 @@ CFLAGS = -nologo -GF -W3 $(INCLUDES) $(DEFINES) $(LOCDEFS) \ LINK_FLAGS = -nologo -debug -opt:ref,icf -machine:$(PROCESSOR_ARCHITECTURE) +!if "$(CFG)" == "RELEASE" && "$(CCTYPE)" != "MSVC60" +#see matching flag in CECFLAGS +LINK_FLAGS = $(LINK_FLAGS) -ltcg +!endif + OBJOUT_FLAG = -Fo EXEOUT_FLAG = -Fe @@ -798,7 +840,7 @@ clean: Extensions_clean -@$(DEL) .\$(MACHINE)\*.lib -@$(DEL) .\$(MACHINE)\*.exp -@$(DEL) .\$(MACHINE)\*.pdb - -@$(DEL) ..\Cross\config-$(MACHINE).sh ..\lib\Config.pm + -@$(DEL) ..\Cross\config-$(MACHINE).sh -if exist ..\xlib rmdir /s /q ..\xlib -if exist .\$(MACHINE) rmdir /s /q .\$(MACHINE) -@$(DEL) config.h xconfig.h perl.res |