From 6d7bc92272b6f277b82e81c8ffce787cb9d3de83 Mon Sep 17 00:00:00 2001 From: "kevino@webkit.org" Date: Sun, 5 Jun 2011 05:07:04 +0000 Subject: [PATCH] [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures to build on Mac. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@88131 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- ChangeLog | 7 +++++++ Source/JavaScriptCore/ChangeLog | 7 +++++++ Source/JavaScriptCore/wtf/Platform.h | 3 +++ Tools/ChangeLog | 8 ++++++++ Tools/waf/build/settings.py | 30 ++++++++++++++++++++++-------- Tools/wx/install-unix-extras | 26 ++++---------------------- wscript | 1 - 7 files changed, 51 insertions(+), 31 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbd3202..56f745a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-06-04 Kevin Ollivier + + [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures + to build on Mac. + + * wscript: + 2011-06-04 Adam Barth Configure new commit-queue instance. (Please ignore.) diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog index 3125f02..3739920 100755 --- a/Source/JavaScriptCore/ChangeLog +++ b/Source/JavaScriptCore/ChangeLog @@ -1,3 +1,10 @@ +2011-06-04 Kevin Ollivier + + [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures + to build on Mac. + + * wtf/Platform.h: + 2011-06-04 Gustavo Noronha Silva Unreviewed, MIPS build fix. diff --git a/Source/JavaScriptCore/wtf/Platform.h b/Source/JavaScriptCore/wtf/Platform.h index 47e5202..03d2201 100644 --- a/Source/JavaScriptCore/wtf/Platform.h +++ b/Source/JavaScriptCore/wtf/Platform.h @@ -710,7 +710,10 @@ #endif #if PLATFORM(WX) +#if !CPU(PPC) #define ENABLE_ASSEMBLER 1 +#define ENABLE_JIT 1 +#endif #define ENABLE_GLOBAL_FASTMALLOC_NEW 0 #if OS(DARWIN) #define WTF_USE_CF 1 diff --git a/Tools/ChangeLog b/Tools/ChangeLog index 608d060..a6c7c03 100644 --- a/Tools/ChangeLog +++ b/Tools/ChangeLog @@ -1,5 +1,13 @@ 2011-06-04 Kevin Ollivier + [wx] Unreviewed build fix. Restore the PPC build and allow users to specify architectures + to build on Mac. + + * waf/build/settings.py: + * wx/install-unix-extras: + +2011-06-04 Kevin Ollivier + [wx] Unreviewed build fixes for recent trunk changes. * DumpRenderTree/wx/LayoutTestControllerWx.cpp: diff --git a/Tools/waf/build/settings.py b/Tools/waf/build/settings.py index 67e97fe..acb1329 100644 --- a/Tools/waf/build/settings.py +++ b/Tools/waf/build/settings.py @@ -221,6 +221,8 @@ def common_set_options(opt): help='Specify a different compiler prefix (do this if you used COMPILER_PREFIX when building wx itself)') opt.add_option('--macosx-version', action='store', default='', help="Version of OS X to build for.") opt.add_option('--msvc-version', action='store', default='', help="MSVC version to use to build. Use 8 for 2005, 9 for 2008") + opt.add_option('--mac_universal_binary', action='store_true', default=False, help='Build Mac as universal (i386, x86_64, ppc) binary.') + opt.add_option('--mac_archs', action='store', default='', help='Comma separated list of architectures (i386, x86_64, ppc) to build on Mac.') def common_configure(conf): @@ -235,15 +237,13 @@ def common_configure(conf): feature_defines = ['ENABLE_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER', 'ENABLE_SVG', 'ENABLE_SVG_USE', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS', 'ENABLE_SVG_ANIMATION', 'ENABLE_SVG_AS_IMAGE', 'ENABLE_SVG_FOREIGN_OBJECT', - 'ENABLE_JIT', 'ENABLE_DOM_STORAGE', 'BUILDING_%s' % build_port.upper()] + 'ENABLE_DOM_STORAGE', 'BUILDING_%s' % build_port.upper()] conf.env["FEATURE_DEFINES"] = ' '.join(feature_defines) if Options.options.msvc_version and Options.options.msvc_version != '': - print "msvc version = %s" % Options.options.msvc_version conf.env['MSVC_VERSIONS'] = ['msvc %s.0' % Options.options.msvc_version] else: - print "msvc not set!" conf.env['MSVC_VERSIONS'] = ['msvc 9.0', 'msvc 8.0'] if sys.platform.startswith('cygwin'): @@ -345,13 +345,27 @@ def common_configure(conf): conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceLeopard']) # match WebKit Mac's default here unless we're building on platforms that won't support 64-bit. - global arch - is_cocoa = "__WXOSX_COCOA__" in conf.env["CXXDEFINES_WX"] - if min_version == "10.4" or not is_cocoa: - arch = "i386" + archs = [] + + if Options.options.mac_archs != '': + arch_list = Options.options.mac_archs.replace("'", '').replace('"', '').split(",") + for arch in arch_list: + if arch.strip() != '': + archs.append(arch.strip()) + elif Options.options.mac_universal_binary: + archs = ['i386', 'x86_64', 'ppc'] + else: + is_cocoa = "__WXOSX_COCOA__" in conf.env["CXXDEFINES_WX"] + if min_version == "10.4" or not is_cocoa: + archs = ["i386"] + else: + global arch + archs = [arch] sdkroot = '/Developer/SDKs/MacOSX%s.sdk' % sdk_version - sdkflags = ['-arch', arch, '-isysroot', sdkroot] + sdkflags = ['-isysroot', sdkroot] + for arch in archs: + sdkflags.extend(['-arch', arch]) conf.env.append_value('CPPFLAGS', sdkflags) conf.env.append_value('LINKFLAGS', sdkflags) diff --git a/Tools/wx/install-unix-extras b/Tools/wx/install-unix-extras index 868acde..973820f 100755 --- a/Tools/wx/install-unix-extras +++ b/Tools/wx/install-unix-extras @@ -48,6 +48,10 @@ fi mkdir -p $DL_DIR mkdir -p $DEPS_PREFIX +mkdir -p $DEPS_PREFIX/bin +mkdir -p $DEPS_PREFIX/lib +mkdir -p $DEPS_PREFIX/include + ICU_VERSION="3.4.1" ICU_TARBALL="icu-$ICU_VERSION.tgz" ICU_URL="ftp://ftp.software.ibm.com/software/globalization/icu/$ICU_VERSION/$ICU_TARBALL" @@ -118,28 +122,6 @@ if [ `which icu-config >/dev/null 2>&1` ]; then rm -rf icu fi -# TODO: What would be a good way to test for this? -if [ ! -f $DEPS_PREFIX/lib/libiconv.$DLLEXT ]; then - $DL_CMD -o $DL_DIR/$ICONV_TARBALL $ICONV_URL - - tar xzvf $DL_DIR/$ICONV_TARBALL - cd $DL_DIR/libiconv-$ICONV_VERSION - - if [ "${OSTYPE:0:6}" == "darwin" ]; then - ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking - make CFLAGS="-O -g -isysroot $SDK $ARCH_FLAGS" \ - LDFLAGS="$ARCH_FLAGS" - make install - else - ./configure --prefix=$DEPS_PREFIX - - make - make install - fi - cd $DL_DIR - rm -rf $DL_DIR/libiconv-$ICONV_VERSION -fi - if [ ! -f $DEPS_PREFIX/lib/libjpeg.a ]; then $DL_CMD -o $DL_DIR/$LIBJPEG_TARBALL $LIBJPEG_URL diff --git a/wscript b/wscript index 0034ea7..5564702 100644 --- a/wscript +++ b/wscript @@ -187,7 +187,6 @@ def build(bld): 'Source/WebCore/platform/graphics/mac/SimpleFontDataATSUI.mm', 'Source/WebCore/platform/graphics/mac/SimpleFontDataCoreText.cpp', 'Source/WebCore/platform/graphics/wx/FontPlatformDataWxMac.mm', - 'Source/WebCore/platform/text/mac/ShapeArabic.c', 'Source/WebCore/platform/wx/wxcode/mac/carbon/fontprops.mm', 'Source/WebCore/plugins/mac/PluginPackageMac.cpp', 'Source/WebCore/plugins/mac/PluginViewMac.mm' -- 1.8.3.1