Skip to content

Commit 331f236

Browse files
committed
Fix symbol duplication causing a link error when using MSVC
1 parent c608c17 commit 331f236

4 files changed

Lines changed: 57 additions & 6 deletions

File tree

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
include python/src/softfloatpy.pyx
22
include python/src/_softfloat.pxd
33
include python/src/_version.py
4-
include extern/berkeley-softfloat-3/build/Linux-RISCV64-GCC/platform.h
4+
include c/berkeley-softfloat-3/build/General/platform.h
55
include extern/berkeley-softfloat-3/source/RISCV/specialize.h
66
include extern/berkeley-softfloat-3/source/include/opts-GCC.h
77
include extern/berkeley-softfloat-3/source/include/primitives.h
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
/*============================================================================
3+
4+
This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5+
Package, Release 3e, by John R. Hauser.
6+
7+
Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8+
University of California. All rights reserved.
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions are met:
12+
13+
1. Redistributions of source code must retain the above copyright notice,
14+
this list of conditions, and the following disclaimer.
15+
16+
2. Redistributions in binary form must reproduce the above copyright notice,
17+
this list of conditions, and the following disclaimer in the documentation
18+
and/or other materials provided with the distribution.
19+
20+
3. Neither the name of the University nor the names of its contributors may
21+
be used to endorse or promote products derived from this software without
22+
specific prior written permission.
23+
24+
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27+
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34+
35+
=============================================================================*/
36+
37+
/*----------------------------------------------------------------------------
38+
*----------------------------------------------------------------------------*/
39+
#define LITTLEENDIAN 1
40+
41+
/*----------------------------------------------------------------------------
42+
*----------------------------------------------------------------------------*/
43+
#ifdef __GNUC_STDC_INLINE__
44+
#define INLINE inline
45+
#else
46+
#define INLINE extern inline
47+
#endif
48+
49+
/*----------------------------------------------------------------------------
50+
*----------------------------------------------------------------------------*/
51+
#include "opts-GCC.h"
52+

cspell.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ words:
3737
- ixor
3838
- libc
3939
- lshift
40+
- MSVC
4041
- mypy
4142
- ndim
4243
- popd

setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33

44

55
_SOFTFLOAT_SRCDIR: str = 'extern/berkeley-softfloat-3/source'
6-
_SOFTFLOAT_BUILDDIR: str = 'extern/berkeley-softfloat-3/build'
6+
_SOFTFLOAT_BUILDDIR: str = 'c/berkeley-softfloat-3/build'
77

8-
# RISC-V option is selected because it is the most general.
9-
_SOFTFLOAT_PLATFORM: str = 'Linux-RISCV64-GCC'
10-
_SOFTFLOAT_SPECIALIZE: str = 'RISCV'
8+
_SOFTFLOAT_SPECIALIZE: str = 'RISCV' # RISC-V option is selected because it is the most general.
9+
_SOFTFLOAT_PLATFORM: str = 'General'
1110

1211

1312
setup(
@@ -203,7 +202,6 @@
203202
's_commonNaNToF64UI.c',
204203
's_propagateNaNF64UI.c',
205204
's_f128UIToCommonNaN.c',
206-
's_commonNaNToF128UI.c',
207205
's_propagateNaNF128UI.c',
208206
'softfloat_raiseFlags.c'
209207
]

0 commit comments

Comments
 (0)