Changes to build/ from a combination of FreeBSD and OpenBSD patches.

Review URL: http://codereview.chromium.org/491053

git-svn-id: http://src.chromium.org/svn/trunk/src/build@34371 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
evan@chromium.org 2009-12-11 20:04:06 +00:00
Родитель e7f8cfd5d8
Коммит 2fd1a8253c
4 изменённых файлов: 32 добавлений и 21 удалений

10
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', {

Просмотреть файл

@ -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

Просмотреть файл

@ -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', {

Просмотреть файл

@ -4,7 +4,7 @@
{
'conditions': [
[ 'OS=="linux"', {
[ 'OS=="linux" or OS=="freebsd"', {
'target_defaults': {
'cflags!': [
'-Wall',