summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-11 20:04:06 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-11 20:04:06 +0000
commitc51e8d50a9314b0580444ed93640b7ae1a2433b8 (patch)
treebd5cc97d132f87af4d9f345bec703c0d5a7de79a
parentf49ea7d24815992ec9484aaf7545e37753bbf727 (diff)
downloadchromium_src-c51e8d50a9314b0580444ed93640b7ae1a2433b8.zip
chromium_src-c51e8d50a9314b0580444ed93640b7ae1a2433b8.tar.gz
chromium_src-c51e8d50a9314b0580444ed93640b7ae1a2433b8.tar.bz2
Changes to build/ from a combination of FreeBSD and OpenBSD patches.
Review URL: http://codereview.chromium.org/491053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34371 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--build/all.gyp10
-rw-r--r--build/build_config.h18
-rw-r--r--build/common.gypi23
-rw-r--r--build/external_code.gypi2
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',