File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -122,3 +122,7 @@ Bug Fixes
122122- Bug in ``to_excel`` with openpyxl 2.2+ and merging (:issue:`11408`)
123123
124124- Bug in ``DataFrame.to_dict()`` produces a ``np.datetime64`` object instead of ``Timestamp`` when only datetime is present in data (:issue:`11327`)
125+
126+
127+
128+ - 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 1111import shutil
1212import warnings
1313import re
14+ import platform
1415from distutils .version import LooseVersion
1516
1617# versioning
@@ -289,7 +290,10 @@ def run(self):
289290
290291
291292class 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+ """
293297
294298 def check_cython_extensions (self , extensions ):
295299 for ext in extensions :
@@ -302,8 +306,27 @@ def check_cython_extensions(self, extensions):
302306
303307 def build_extensions (self ):
304308 self .check_cython_extensions (self .extensions )
309+ self .add_gnu_inline_flag (self .extensions )
305310 build_ext .build_extensions (self )
306311
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+
307330
308331class CythonCommand (build_ext ):
309332 """Custom distutils command subclassed from Cython.Distutils.build_ext
You can’t perform that action at this time.
0 commit comments