Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Win32] NVMANTBITS incorrectly set for mingw-w64 "nvtype=long double" builds #17136

Closed
p5pRT opened this issue Aug 23, 2019 · 5 comments
Closed

Comments

@p5pRT
Copy link

p5pRT commented Aug 23, 2019

Migrated from rt.perl.org#134380 (status was 'pending release')

Searchable as RT134380$

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2019

From @sisyphus

Hi,
Currently NVMANTBITS and $Config{nvmantbits} is set to 52 when nvtype=long
double and cc=gcc.

Correct value is 64.

Patch attached.

Cheers,
Rob

C​:\>perl -V
Summary of my perl5 (revision 5 version 31 subversion 3) configuration​:
  Platform​:
  osname=MSWin32
  osvers=6.1.7601
  archname=MSWin32-x64-multi-thread-ld
  uname=''
  config_args='undef'
  hint=recommended
  useposix=true
  d_sigaction=undef
  useithreads=define
  usemultiplicity=define
  use64bitint=define
  use64bitall=undef
  uselongdouble=define
  usemymalloc=n
  default_inc_excludes_dot=define
  bincompat5005=undef
  Compiler​:
  cc='gcc'
  ccflags =' -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE
-DPERL_TEXTMODE_SCRIPTS -D
PERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-D__USE_MINGW_ANSI_STDIO
-fwrapv -fno-strict-aliasing -mms-bitfields'
  optimize='-s -O2'
  cppflags='-DWIN32'
  ccversion=''
  gccversion='8.3.0'
  gccosandvers=''
  intsize=4
  longsize=4
  ptrsize=8
  doublesize=8
  byteorder=12345678
  doublekind=3
  d_longlong=define
  longlongsize=8
  d_longdbl=define
  longdblsize=16
  longdblkind=3
  ivtype='long long'
  ivsize=8
  nvtype='long double'
  nvsize=16
  Off_t='long long'
  lseeksize=8
  alignbytes=8
  prototype=define
  Linker and Libraries​:
  ld='g++'
  ldflags ='-s -L"C​:\_64\blead-5.31.3-ld\lib\CORE"
-L"C​:\_64\gcc-straw-830\min
gw64\lib"'
  libpth=C​:\_64\gcc-straw-830\mingw64\lib
C​:\_64\gcc-straw-830\mingw64\x86_64-
w64-mingw32\lib C​:\_64\msys_830\1.0\local\lib
C​:\_64\gcc-straw-830\mingw64\lib\g
cc\x86_64-w64-mingw32\8.3.0
  libs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladvapi3
2 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm
-lversio
n -lodbc32 -lodbccp32 -lcomctl32
  perllibs= -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32
-ladv
api32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm
-lve
rsion -lodbc32 -lodbccp32 -lcomctl32
  libc=
  so=dll
  useshrplib=true
  libperl=libperl531.a
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_win32.xs
  dlext=dll
  d_dlsymun=undef
  ccdlflags=' '
  cccdlflags=' '
  lddlflags='-mdll -s -L"C​:\_64\blead-5.31.3-ld\lib\CORE"
-L"C​:\_64\gcc-straw-
830\mingw64\lib"'

Characteristics of this binary (from libperl)​:
  Compile-time options​:
  HAS_TIMES
  HAVE_INTERP_INTERN
  MULTIPLICITY
  PERLIO_LAYERS
  PERL_COPY_ON_WRITE
  PERL_DONT_CREATE_GVSV
  PERL_IMPLICIT_CONTEXT
  PERL_IMPLICIT_SYS
  PERL_MALLOC_WRAP
  PERL_OP_PARENT
  PERL_PRESERVE_IVUV
  USE_64_BIT_INT
  USE_ITHREADS
  USE_LARGE_FILES
  USE_LOCALE
  USE_LOCALE_COLLATE
  USE_LOCALE_CTYPE
  USE_LOCALE_NUMERIC
  USE_LOCALE_TIME
  USE_LONG_DOUBLE
  USE_PERLIO
  USE_PERL_ATOF
  Built under MSWin32
  Compiled at Aug 23 2019 20​:17​:32
  @​INC​:
  C​:/_64/blead-5.31.3-ld/site/lib
  C​:/_64/blead-5.31.3-ld/lib

@p5pRT
Copy link
Author

p5pRT commented Aug 23, 2019

From @sisyphus

0001-NVMANTBITS-is-64-on-mingw-w64-long-double-builds.patch
From 81d6f2ab5291a299a42d2bd9e2814e20e42dfc6a Mon Sep 17 00:00:00 2001
From: sisyphus <sisyphus@cpan.org>
Date: Fri, 23 Aug 2019 21:58:00 +1000
Subject: [PATCH] NVMANTBITS is 64 on mingw-w64 'long double' builds

---
 win32/config_sh.PL | 1 +
 1 file changed, 1 insertion(+)

diff --git a/win32/config_sh.PL b/win32/config_sh.PL
index 1d22aed..fad4d96 100644
--- a/win32/config_sh.PL
+++ b/win32/config_sh.PL
@@ -227,6 +227,7 @@ if ($opt{uselongdouble} eq 'define') {
     $opt{nveformat} = '"Le"';
     $opt{nvfformat} = '"Lf"';
     $opt{nvgformat} = '"Lg"';
+    $opt{nvmantbits} = 64;
     $opt{longdblkind} = 3;
     $opt{longdblmantbits} = 64;
 }
-- 
2.1.4

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2019

From @tonycoz

On Fri, 23 Aug 2019 05​:11​:57 -0700, sisyphus359@​gmail.com wrote​:

Hi,
Currently NVMANTBITS and $Config{nvmantbits} is set to 52 when nvtype=long
double and cc=gcc.

Correct value is 64.

Thanks, applied as 39d5361.

Tony

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2019

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Aug 27, 2019

@tonycoz - Status changed from 'open' to 'pending release'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant