diff options
-rw-r--r-- | build/all.gyp | 10 | ||||
-rw-r--r-- | build/build_config.h | 18 | ||||
-rw-r--r-- | build/common.gypi | 23 | ||||
-rw-r--r-- | build/external_code.gypi | 2 |
4 files changed, 32 insertions, 21 deletions
diff --git a/build/all.gyp b/build/all.gyp index dda74fd..28dc607 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -71,9 +71,6 @@ '../breakpad/breakpad.gyp:*', '../courgette/courgette.gyp:*', '../sandbox/sandbox.gyp:*', - '../tools/gtk_clipboard_dump/gtk_clipboard_dump.gyp:*', - '../tools/xdisplaycheck/xdisplaycheck.gyp:*', - '../net/third_party/nss/nss.gyp:*', ], 'conditions': [ ['branding=="Chrome"', { @@ -83,6 +80,13 @@ }], ], }], + ['OS=="linux" or OS=="freebsd"', { + 'dependencies': [ + '../tools/gtk_clipboard_dump/gtk_clipboard_dump.gyp:*', + '../tools/xdisplaycheck/xdisplaycheck.gyp:*', + '../net/third_party/nss/nss.gyp:*', + ], + }], ['OS=="win"', { 'conditions': [ ['win_use_allocator_shim==1', { diff --git a/build/build_config.h b/build/build_config.h index 8b74e50..fbb2eef 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -29,10 +29,18 @@ #elif defined(__FreeBSD__) #define OS_FREEBSD 1 #define TOOLKIT_GTK +#elif defined(__OpenBSD__) +#define OS_OPENBSD 1 +#define TOOLKIT_GTK #else #error Please add support for your platform in build/build_config.h #endif +#if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) +#define USE_NSS 1 // Use NSS for crypto. +#define USE_X11 1 // Use X for graphics. +#endif + // For access to standard POSIXish features, use OS_POSIX instead of a // more specific macro. #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) @@ -44,16 +52,6 @@ #define USE_BASE_DATA_PACK 1 #endif -// Use NSS for crypto. -#if defined(OS_LINUX) || defined(OS_FREEBSD) -#define USE_NSS 1 -#endif - -// Use X11 (and hence GTK/GDK) -#if defined(OS_LINUX) || defined(OS_FREEBSD) -#define USE_X11 1 -#endif - // Use tcmalloc #if defined(OS_WIN) && ! defined(NO_TCMALLOC) #define USE_TCMALLOC 1 diff --git a/build/common.gypi b/build/common.gypi index a4788c4..7067f0b 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -38,12 +38,12 @@ # Compute the architecture that we're building for. Default to the # architecture that we're building on. 'conditions': [ - [ 'OS=="linux"', { + [ 'OS=="linux" or OS=="freebsd"', { # This handles the Linux platforms we generally deal with. Anything # else gets passed through, which probably won't work very well; such # hosts should pass an explicit target_arch to gyp. 'target_arch%': - '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/arm.*/arm/")', + '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")', }, { # OS!="linux" 'target_arch%': 'ia32', }], @@ -203,7 +203,7 @@ 'arm_thumb%': 0, 'conditions': [ - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { # This will set gcc_version to XY if you are running gcc X.Y.*. # This is used to tweak build flags for gcc 4.4. 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)', @@ -229,7 +229,7 @@ 'use_titlecase_in_grd_files%': 1, }], ], - }], # OS=="linux" + }], # OS=="linux" or OS=="freebsd" ['OS=="mac"', { # Mac wants Title Case strings 'use_titlecase_in_grd_files%': 1, @@ -531,7 +531,7 @@ }, }, 'conditions': [ - ['OS=="linux"', { + ['OS=="linux" or OS=="freebsd"', { 'target_defaults': { # Enable -Werror by default, but put it in a variable so it can # be disabled in ~/.gyp/include.gypi on the valgrind builders. @@ -797,6 +797,15 @@ ], }, }], + # FreeBSD-specific options; note that most FreeBSD options are set above, + # with Linux. + ['OS=="freebsd"', { + 'target_defaults': { + 'ldflags': [ + '-Wl,--no-keep-memory', + ], + }, + }], ['OS=="mac"', { 'target_defaults': { 'variables': { @@ -995,7 +1004,7 @@ ['exclude', '/(cocoa|mac)/'], ['exclude', '\.mm$' ] ], }], - ['OS!="linux"', { + ['OS!="linux" and OS!="freebsd"', { 'sources/': [ ['exclude', '_(chromeos|gtk|linux|x|x11)(_unittest)?\\.cc$'], ['exclude', '/gtk/'], @@ -1007,7 +1016,7 @@ }], # Though Skia is conceptually shared by Linux and Windows, # the only _skia files in our tree are Linux-specific. - ['OS!="linux"', { + ['OS!="linux" and OS!="freebsd"', { 'sources/': [ ['exclude', '_skia\\.cc$'] ], }], ['chromeos!=1', { diff --git a/build/external_code.gypi b/build/external_code.gypi index ca10726..deceeb9 100644 --- a/build/external_code.gypi +++ b/build/external_code.gypi @@ -4,7 +4,7 @@ { 'conditions': [ - [ 'OS=="linux"', { + [ 'OS=="linux" or OS=="freebsd"', { 'target_defaults': { 'cflags!': [ '-Wall', |