[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
japhet at chromium.org
japhet at chromium.org
Thu Oct 29 20:49:10 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 34ec92c5a95a46158a24bcec6a1a3da58ba670a7
Author: japhet at chromium.org <japhet at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 20 20:38:29 2009 +0000
2009-10-20 Mark Mentovai <mark at chromium.org>
Reviewed by Darin Fisher.
Use a version of libWebKitSystemInterface with global symbols marked
private_extern for Chromium Mac.
https://bugs.webkit.org/show_bug.cgi?id=30590
* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/mac: Added.
* WebCore.gyp/mac/Empty.cpp: Added.
* WebCore.gyp/mac/adjust_visibility.sh: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index a4b5a5b..71b3f8e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-20 Mark Mentovai <mark at chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Use a version of libWebKitSystemInterface with global symbols marked
+ private_extern for Chromium Mac.
+
+ https://bugs.webkit.org/show_bug.cgi?id=30590
+
+ * WebCore.gyp/WebCore.gyp:
+ * WebCore.gyp/mac: Added.
+ * WebCore.gyp/mac/Empty.cpp: Added.
+ * WebCore.gyp/mac/adjust_visibility.sh: Added.
+
2009-10-20 Zoltan Horvath <zoltan at webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebCore/WebCore.gyp/WebCore.gyp b/WebCore/WebCore.gyp/WebCore.gyp
index 4a0c540..ce1d609 100644
--- a/WebCore/WebCore.gyp/WebCore.gyp
+++ b/WebCore/WebCore.gyp/WebCore.gyp
@@ -44,7 +44,58 @@
# WebKit is checked out in src/chromium/third_party/WebKit
'variables': {'chromium_src_dir': '../../../..'},
}],
- ],
+ ['OS == "mac"', {
+ 'targets': [
+ {
+ # On the Mac, libWebKitSystemInterface*.a is used to help WebCore
+ # interface with the system. This library is supplied as a static
+ # library in binary format. At present, it contains many global
+ # symbols not marked private_extern. It should be considered an
+ # implementation detail of WebCore, and does not need these symbols
+ # to be exposed so widely.
+ #
+ # This target contains an action that cracks open the existing
+ # static library and rebuilds it with these global symbols
+ # transformed to private_extern.
+ 'target_name': 'webkit_system_interface',
+ 'type': 'static_library',
+ 'variables': {
+ 'adjusted_library_path':
+ '<(PRODUCT_DIR)/libWebKitSystemInterfaceLeopardPrivateExtern.a',
+ },
+ 'sources': [
+ # An empty source file is needed to convince Xcode to produce
+ # output for this target. The resulting library won't actually
+ # contain anything. The library at adjusted_library_path will,
+ # and that library is pushed to dependents of this target below.
+ 'mac/Empty.cpp',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'Adjust Visibility',
+ 'inputs': [
+ 'mac/adjust_visibility.sh',
+ '../../WebKitLibraries/libWebKitSystemInterfaceLeopard.a',
+ ],
+ 'outputs': [
+ '<(adjusted_library_path)',
+ ],
+ 'action': [
+ '<@(_inputs)',
+ '<@(_outputs)',
+ '<(INTERMEDIATE_DIR)/adjust_visibility', # work directory
+ ],
+ },
+ ], # actions
+ 'link_settings': {
+ 'libraries': [
+ '<(adjusted_library_path)',
+ ],
+ }, # link_settings
+ }, # target webkit_system_interface
+ ], # targets
+ }], # condition OS == "mac"
+ ], # conditions
'variables': {
# If set to 1, doesn't compile debug symbols into webcore reducing the
@@ -604,6 +655,9 @@
],
}],
['OS=="mac"', {
+ 'dependencies': [
+ 'webkit_system_interface',
+ ],
'defines': [
# Match Safari and Mozilla on Mac x86.
'WEBCORE_NAVIGATOR_PLATFORM="MacIntel"',
@@ -740,11 +794,6 @@
'../platform/image-decoders/xbm/XBMImageDecoder.cpp',
'../platform/image-decoders/xbm/XBMImageDecoder.h',
],
- 'link_settings': {
- 'libraries': [
- '../../WebKitLibraries/libWebKitSystemInterfaceLeopard.a',
- ],
- },
'direct_dependent_settings': {
'include_dirs': [
'../../WebKitLibraries',
@@ -789,5 +838,5 @@
}],
],
},
- ], # targets
+ ], # targets
}
diff --git a/WebCore/WebCore.gyp/mac/Empty.cpp b/WebCore/WebCore.gyp/mac/Empty.cpp
new file mode 100644
index 0000000..d25a2b7
--- /dev/null
+++ b/WebCore/WebCore.gyp/mac/Empty.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// This is an empty file used to convince Xcode to link a library when it
+// wouldn't otherwise have any reason to do so.
diff --git a/WebCore/WebCore.gyp/mac/adjust_visibility.sh b/WebCore/WebCore.gyp/mac/adjust_visibility.sh
new file mode 100755
index 0000000..44a50b7
--- /dev/null
+++ b/WebCore/WebCore.gyp/mac/adjust_visibility.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+#
+# Copyright (C) 2009 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+# usage: adjust_visibility.sh INPUT OUTPUT WORK_DIR
+#
+# Transforms a static library at INPUT by marking all of its symbols
+# private_extern. The output is placed at OUTPUT. WORK_DIR is used as a
+# scratch directory, which need not exist before this script is invoked,
+# and which will be left behind when the script exits.
+
+set -e
+
+if [ $# -ne 3 ] ; then
+ echo "usage: ${0} INPUT OUTPUT WORK_DIR" >& 2
+ exit 1
+fi
+
+INPUT="${1}"
+OUTPUT="${2}"
+WORK_DIR="${3}"
+
+# Start with a clean slate.
+rm -f "${OUTPUT}"
+rm -rf "${WORK_DIR}"
+mkdir -p "${WORK_DIR}"
+
+# ar doesn't operate on fat files. Figure out what architectures are
+# involved.
+ARCHS=$(file "${INPUT}" | sed -Ene 's/^.*\(for architecture (.+)\):.*$/\1/p')
+if [ -z "${ARCHS}" ] ; then
+ ARCHS=self
+fi
+
+OUTPUT_NAME="output.a"
+
+for ARCH in ${ARCHS} ; do
+ # Get a thin version of fat input by running lipo. If the input is already
+ # thin, just copy it into place. The extra copy isn't strictly necessary
+ # but it simplifies the script.
+ ARCH_DIR="${WORK_DIR}/${ARCH}"
+ mkdir -p "${ARCH_DIR}"
+ INPUT_NAME=input.a
+ ARCH_INPUT="${ARCH_DIR}/${INPUT_NAME}"
+ if [ "${ARCHS}" = "self" ] ; then
+ cp "${INPUT}" "${ARCH_INPUT}"
+ else
+ lipo -thin "${ARCH}" "${INPUT}" -output "${ARCH_INPUT}"
+ fi
+
+ # Change directories to extract the archive to ensure correct pathnames.
+ (cd "${ARCH_DIR}" && ar -x "${INPUT_NAME}")
+
+ # Use ld -r to relink each object that was in the archive. Providing an
+ # empty -exported_symbols_list will transform all symbols to private_extern;
+ # these symbols are retained with -keep_private_externs.
+ for OBJECT in "${ARCH_DIR}/"*.o ; do
+ NEW_OBJECT="${OBJECT}.new"
+ ld -o "${NEW_OBJECT}" -r "${OBJECT}" \
+ -exported_symbols_list /dev/null -keep_private_externs
+ mv "${NEW_OBJECT}" "${OBJECT}"
+ done
+
+ # Build an architecture-specific archive from the modified object files.
+ ARCH_OUTPUT="${ARCH_DIR}/${OUTPUT_NAME}"
+ (cd "${ARCH_DIR}" && ar -rc "${OUTPUT_NAME}" *.o)
+ ranlib "${ARCH_OUTPUT}"
+
+ # Toss the object files out now that they're in the archive.
+ rm -f "${ARCH_DIR}/"*.o
+done
+
+# Create a fat archive from the architecture-specific archives if needed.
+# If the input was thin, leave the output thin by copying the only output
+# archive to the destination.
+if [ "${ARCHS}" = "self" ] ; then
+ cp "${WORK_DIR}/self/${OUTPUT_NAME}" "${OUTPUT}"
+else
+ lipo -create -output "${OUTPUT}" "${WORK_DIR}/"*"/${OUTPUT_NAME}"
+fi
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list