Debian Codegraph @

rpython/translator/platform/hurd.py

raw symbols SCIP
1 """Support for Hurd."""
2
3 import os
4 import platform
5 import sys
6 from rpython.translator.platform.posix import BasePosix
7
8 class BaseHurd(BasePosix):
9 name = "hurd"
10
11 link_flags = tuple(
12 ['-pthread',]
13 + os.environ.get('LDFLAGS', '').split())
14 extra_libs = ('-lrt',)
15 cflags = tuple(
16 ['-O3', '-pthread', '-fomit-frame-pointer',
17 '-Wall', '-Wno-unused', '-Wno-address']
18 + os.environ.get('CFLAGS', '').split())
19 standalone_only = ()
20 shared_only = ('-fPIC',)
21 so_ext = 'so'
22
23 def _args_for_shared(self, args, **kwds):
24 return ['-shared'] + args
25
26 def _include_dirs_for_libffi(self):
27 return self._pkg_config("libffi", "--cflags-only-I",
28 ['/usr/include/libffi'],
29 check_result_dir=True)
30
31 def _library_dirs_for_libffi(self):
32 return self._pkg_config("libffi", "--libs-only-L",
33 ['/usr/lib/libffi'],
34 check_result_dir=True)
35
36
37 class Hurd(BaseHurd):
38 shared_only = () # it seems that on 32-bit GNU, compiling with -fPIC
39 # gives assembler that asmgcc is not happy about.
40
41 class HurdPIC(BaseHurd):
42 pass