Submitted by: Matthias Wolf via GitHub MFH: 2020Q3 Security: http://vuxml.freebsd.org/freebsd/9a447f78-d0f8-11ea-9837-e09467587c17.html Security: http://vuxml.freebsd.org/freebsd/870d59b0-c6c4-11ea-8015-e09467587c17.html
24 lines
879 B
Python
24 lines
879 B
Python
--- tools/gn/build/gen.py.orig 2020-07-07 22:09:39 UTC
|
|
+++ tools/gn/build/gen.py
|
|
@@ -78,6 +78,9 @@ class Platform(object):
|
|
def is_haiku(self):
|
|
return self._platform == 'haiku'
|
|
|
|
+ def is_freebsd(self):
|
|
+ return self._platform == 'freebsd'
|
|
+
|
|
def is_posix(self):
|
|
return self._platform in ['linux', 'freebsd', 'darwin', 'aix', 'openbsd', 'haiku']
|
|
|
|
@@ -372,6 +375,11 @@ def WriteGNNinja(path, platform, host, options):
|
|
elif platform.is_haiku():
|
|
cflags.append('-fPIC')
|
|
cflags.extend(['-D_BSD_SOURCE'])
|
|
+ elif platform.is_freebsd():
|
|
+ cflags.extend(['-Wno-deprecated-register', '-Wno-parentheses-equality'])
|
|
+ ldflags.extend(['-pthread'])
|
|
+ libs.extend(['-lexecinfo', '-lkvm', '-lutil'])
|
|
+ include_dirs += ['/usr/local/include']
|
|
|
|
if platform.is_posix() and not platform.is_haiku():
|
|
ldflags.append('-pthread')
|