File tree 2 files changed +28
-1
lines changed
2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,7 @@ Bug Fixes
115
115
- Fixed a bug that prevented the construction of an empty series of dtype
116
116
``datetime64[ns, tz]`` (:issue:`11245`).
117
117
- Bug in ``DataFrame.to_dict()`` produces a ``np.datetime64`` object instead of ``Timestamp`` when only datetime is present in data (:issue:`11327`)
118
+
119
+
120
+
121
+ - Bug in the link-time error caused by C ``inline`` functions on FreeBSD 10+ (with ``clang``) (:issue:`10510`)
Original file line number Diff line number Diff line change 11
11
import shutil
12
12
import warnings
13
13
import re
14
+ import platform
14
15
from distutils .version import LooseVersion
15
16
16
17
# versioning
@@ -289,7 +290,10 @@ def run(self):
289
290
290
291
291
292
class CheckingBuildExt (build_ext ):
292
- """Subclass build_ext to get clearer report if Cython is necessary."""
293
+ """
294
+ Subclass build_ext to get clearer report if Cython is necessary.
295
+ Also, add some platform based compiler flags.
296
+ """
293
297
294
298
def check_cython_extensions (self , extensions ):
295
299
for ext in extensions :
@@ -302,8 +306,27 @@ def check_cython_extensions(self, extensions):
302
306
303
307
def build_extensions (self ):
304
308
self .check_cython_extensions (self .extensions )
309
+ self .add_gnu_inline_flag (self .extensions )
305
310
build_ext .build_extensions (self )
306
311
312
+ def add_gnu_inline_flag (self , extensions ):
313
+ '''
314
+ Add CFLAGS `-fgnu89-inline` for clang on FreeBSD 10+
315
+ '''
316
+ if not platform .system () == 'FreeBSD' :
317
+ return
318
+
319
+ try :
320
+ bsd_release = float (platform .release ().split ('-' )[0 ])
321
+ except ValueError : # unknow freebsd version
322
+ return
323
+
324
+ if bsd_release < 10 : # 9 or earlier still using gcc42
325
+ return
326
+
327
+ for ext in extensions :
328
+ ext .extra_compile_args += ['-fgnu89-inline' ]
329
+
307
330
308
331
class CythonCommand (build_ext ):
309
332
"""Custom distutils command subclassed from Cython.Distutils.build_ext
You can’t perform that action at this time.
0 commit comments