Debian Codegraph @

rpython/translator/platform/openbsd.py

raw symbols SCIP
1 """Support for OpenBSD."""
2
3 import os
4
5 from rpython.translator.platform.bsd import BSD
6
7 class OpenBSD(BSD):
8 DEFAULT_CC = "cc"
9 name = "openbsd"
10
11 link_flags = os.environ.get("LDFLAGS", "").split() + ['-pthread']
12 cflags = ['-O3', '-pthread', '-fomit-frame-pointer', '-D_BSD_SOURCE'
13 ] + os.environ.get("CFLAGS", "").split()
14
15 def _libs(self, libraries):
16 libraries=set(libraries + ("intl", "iconv"))
17 return ['-l%s' % lib for lib in libraries if lib not in ["crypt", "dl", "rt"]]
18
19 def makefile_link_flags(self):
20 # On OpenBSD, we need to build the final binary with the link flags
21 # below. However, if we modify self.link_flags to include these, the
22 # various platform check binaries that RPython builds end up with these
23 # flags: since these binaries are generally located on /tmp -- which
24 # isn't a wxallowed file system -- that gives rise to "permission
25 # denied" errors, which kill the build.
26 return list(self.link_flags) + ["-Wl,-z,wxneeded"]
27
28 class OpenBSD_64(OpenBSD):
29 shared_only = ('-fPIC',)