[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-porters
Subject:    [perl #133154] [PATCH] implement USE_CPLUSPLUS build option in win32/GNUmakefile
From:       "bulk88 \(via RT\)" <perlbug-followup () perl ! org>
Date:       2018-04-26 9:04:55
Message-ID: rt-4.0.24-29683-1524733495-119.133154-75-0 () perl ! org
[Download RAW message or body]

# New Ticket Created by  bulk88 
# Please include the string:  [perl #133154]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133154 >


This is a bug report for perl from bulk88@hotmail.com,
generated with the help of perlbug 1.41 running under perl 5.27.9.


-----------------------------------------------------------------
[Please describe your issue here]

See attached patch. This doesn't have to be in 5.28. It is an 
improvement. Related to https://rt.perl.org/Ticket/Display.html?id=132955

[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
               category=core
               severity=low
---
Site configuration information for perl 5.27.9:

Configured by Administrator at Tue Jan 30 20:34:30 2018.

Summary of my perl5 (revision 5 version 27 subversion 9) configuration:

             Platform:
               osname=MSWin32
               osvers=5.2.3790
               archname=MSWin32-x86-multi-thread
               uname=''
               config_args='undef'
               hint=recommended
               useposix=true
               d_sigaction=undef
               useithreads=define
               usemultiplicity=define
               use64bitint=undef
               use64bitall=undef
               uselongdouble=undef
               usemymalloc=n
               default_inc_excludes_dot=define
               bincompat5005=undef
             Compiler:
               cc='cl'
               ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -GL -DWIN32
-D_CONSOLE -DNO_STRICT -D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE  -DPERL_TEXTMODE_SCRIPTS
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DWIN32_NO_REGISTRY'
               optimize='-O1 -MD -Zi -DNDEBUG -GL'
               cppflags='-DWIN32'
               ccversion='15.00.30729.01'
               gccversion=''
               gccosandvers=''
               intsize=4
               longsize=4
               ptrsize=4
               doublesize=8
               byteorder=1234
               doublekind=3
               d_longlong=undef
               longlongsize=8
               d_longdbl=define
               longdblsize=8
               longdblkind=0
               ivtype='long'
               ivsize=4
               nvtype='double'
               nvsize=8
               Off_t='__int64'
               lseeksize=8
               alignbytes=8
               prototype=define
             Linker and Libraries:
               ld='link'
               ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg
-libpath:"c:\perl\lib\CORE"        -machine:x86'
               libpth="C:\Program Files (x86)\Microsoft Visual Studio
9.0\VC\lib"
               libs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
               perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib
odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib
               libc=msvcrt.lib
               so=dll
               useshrplib=true
               libperl=perl527.lib
               gnulibc_version=''
             Dynamic Linking:
               dlsrc=dl_win32.xs
               dlext=dll
               d_dlsymun=undef
               ccdlflags=' '
               cccdlflags=' '
               lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf
-ltcg
               -libpath:"c:\perl\lib\CORE"        -machine:x86'


---
@INC for perl 5.27.9:
               lib
               C:/p527/srcnew/lib

---
Environment for perl 5.27.9:
               CYGWIN=tty
               HOME (unset)
               LANG (unset)
               LANGUAGE (unset)
               LD_LIBRARY_PATH=/usr/lib/x86:/usr/X11R6/lib
               LOGDIR (unset)
               PATH=C:\WINDOWS\system32;C:\Program Files (x86)\Microsoft
Visual
Studio 9.0\VC\BIN;C:\Program Files\Microsoft
SDKs\Windows\v6.0A\bin;C:\Perl\bin;C:\WINDOWS;C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program Files
(x86)\Git\bin;C:\sp3220\c\bin;
               PERL_BADLANG (unset)
               SHELL (unset)



["0001-implement-USE_CPLUSPLUS-build-option-in-win32-GNUmak.patch" (text/plain)]

>From 681a04a1912dad3b662f59608839645853758040 Mon Sep 17 00:00:00 2001
From: Daniel Dragan <bulk88@hotmail.com>
Date: Tue, 24 Apr 2018 20:34:21 -0400
Subject: [PATCH] implement USE_CPLUSPLUS build option in win32/GNUmakefile

win32/makefile.mk has had a C++ build option for a long time, but
GNUmakefile didn't. Over time, GNUmakefile and makefile.mk got more and
more syncronized in their features. There is very little left to implement
USE_CPLUSPLUS in GNUmakefile, so just implement it finally. This allows
the gmake/gcc 3.4.5 bundled with strawberry perl 5.8.9 to be used to build
USE_CPLUSPLUS mode perl since the dmake bundled with 5.8.9 whose version is
"Version 4.8-20070327-SHAY (Windows / MS Visual C++)"
has a bug generating cmd lines passed to cmd.exe which causes EUMM
makefiles to fail with

'..\..\miniperl.exe" "-I..\..\lib' is not recognized as an internal or
external command, operable program or batch file.

but newer dmakes such as "Version 4.12 (Windows / MinGW)" dont have this
bug. Researching the bug/regression with EUMM and ancient dmakes is left
for the future.
---
 win32/GNUmakefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/win32/GNUmakefile b/win32/GNUmakefile
index 0f67868..a81face 100644
--- a/win32/GNUmakefile
+++ b/win32/GNUmakefile
@@ -190,6 +190,11 @@ DEFAULT_INC_EXCLUDES_DOT := define
 #__ICC		:= define
 
 #
+# Uncomment this if you want to build everything in C++ mode
+#
+#USE_CPLUSPLUS	:= define
+
+#
 # uncomment next line if you want debug version of perl (big/slow)
 # If not enabled, we automatically try to use maximum optimization
 # with all compilers that are known to have a working optimizer.
@@ -587,6 +592,9 @@ LINK_DBG	= -s
 endif
 
 EXTRACFLAGS	=
+ifeq ($(USE_CPLUSPLUS),define)
+EXTRACFLAGS	+= $(CXX_FLAG)
+endif
 CFLAGS		= $(EXTRACFLAGS) $(INCLUDES) $(DEFINES) $(LOCDEFS) $(OPTIMIZE)
 LINK_FLAGS	= $(LINK_DBG) -L"$(INST_COREDIR)" -L"$(CCLIBDIR)"
 OBJOUT_FLAG	= -o
-- 
2.5.0.windows.1



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic