diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 21:13:42 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-04 21:13:42 +0000 |
commit | 95fe390b98883c2ae8f896914615d24e87841ba0 (patch) | |
tree | 08e9bddd7992db38c15e6ed82d8232d23422baf8 | |
parent | fee00934a491edf64b615cc5d34a01de17736fec (diff) | |
download | chromium_src-95fe390b98883c2ae8f896914615d24e87841ba0.zip chromium_src-95fe390b98883c2ae8f896914615d24e87841ba0.tar.gz chromium_src-95fe390b98883c2ae8f896914615d24e87841ba0.tar.bz2 |
Lands http://codereview.chromium.org/99349 for Ryan.
Comments from Ryan:
Some small changes to get chromium building on ARM. I tested these using the
standard Linux tool chain and crosstools-ng.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/99365
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15241 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/debug_util_posix.cc | 2 | ||||
-rw-r--r-- | base/string_util_unittest.cc | 9 | ||||
-rw-r--r-- | build/build_config.h | 1 | ||||
-rw-r--r-- | media/base/yuv_convert.cc | 6 |
4 files changed, 17 insertions, 1 deletions
diff --git a/base/debug_util_posix.cc b/base/debug_util_posix.cc index 34cc45c..a6d5199 100644 --- a/base/debug_util_posix.cc +++ b/base/debug_util_posix.cc @@ -108,7 +108,9 @@ bool DebugUtil::BeingDebugged() { // static void DebugUtil::BreakDebugger() { +#if !defined(ARCH_CPU_ARM_FAMILY) asm ("int3"); +#endif } StackTrace::StackTrace() { diff --git a/base/string_util_unittest.cc b/base/string_util_unittest.cc index c7b881e..ed6b68f 100644 --- a/base/string_util_unittest.cc +++ b/base/string_util_unittest.cc @@ -311,7 +311,11 @@ TEST(StringUtilTest, ConvertUTF8ToWide) { std::wstring converted; EXPECT_TRUE(UTF8ToWide("\00Z\t", 3, &converted)); ASSERT_EQ(3U, converted.length()); +#if defined(WCHAR_T_IS_UNSIGNED) + EXPECT_EQ(0U, converted[0]); +#else EXPECT_EQ(0, converted[0]); +#endif EXPECT_EQ('Z', converted[1]); EXPECT_EQ('\t', converted[2]); @@ -1509,8 +1513,13 @@ TEST(StringUtilTest, LcpyTest) { EXPECT_EQ(1, dst[0]); EXPECT_EQ(2, dst[1]); EXPECT_EQ(7U, base::wcslcpy(wdst, L"abcdefg", 0)); +#if defined(WCHAR_T_IS_UNSIGNED) + EXPECT_EQ(1U, wdst[0]); + EXPECT_EQ(2U, wdst[1]); +#else EXPECT_EQ(1, wdst[0]); EXPECT_EQ(2, wdst[1]); +#endif } // Test the case were we _just_ competely fit including the null. diff --git a/build/build_config.h b/build/build_config.h index 4d4295b..824e31e 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -56,6 +56,7 @@ #define ARCH_CPU_ARM_FAMILY 1 #define ARCH_CPU_ARMEL 1 #define ARCH_CPU_32_BITS 1 +#define WCHAR_T_IS_UNSIGNED 1 #else #error Please add support for your architecture in build/build_config.h #endif diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc index dd40c9f..3ba6863 100644 --- a/media/base/yuv_convert.cc +++ b/media/base/yuv_convert.cc @@ -77,8 +77,13 @@ // C++ code provided as a fall back. // Compile with /DUSE_MMX=0 #ifndef USE_MMX + +#ifdef ARCH_CPU_ARM_FAMILY +#define USE_MMX 0 +#else #define USE_MMX 1 #endif +#endif namespace media { @@ -670,4 +675,3 @@ void ConvertYV12ToRGB32Row(const uint8* y_buf, } // namespace media - |