WebKit Bugzilla
Attachment 360851 Details for
Bug 194147
: [CMake] Build 32bit binaries on Linux/64bit when the --32-bit is passed to build-jsc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make --32-bit flag in build-jsc work in Linux/64bit
jsc-32bit-intel.diff (text/plain), 4.54 KB, created by
Xan Lopez
on 2019-02-01 01:58:18 PST
(
hide
)
Description:
Make --32-bit flag in build-jsc work in Linux/64bit
Filename:
MIME Type:
Creator:
Xan Lopez
Created:
2019-02-01 01:58:18 PST
Size:
4.54 KB
patch
obsolete
>From 74bdd576b6bd88ded618704a63be5ea7a5489d42 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Xan=20L=C3=B3pez?= <xan@igalia.com> >Date: Fri, 1 Feb 2019 10:48:45 +0100 >Subject: [PATCH] [CMake] Build 32bit binaries on Linux/64bit when the --32-bit > is passed to build-jsc https://bugs.webkit.org/show_bug.cgi?id=194147 > >Reviewed by NOBODY (OOPS!). > >.: > >* CMakeLists.txt: set WTF_CPU properly if FORCE_32BIT is set in >build-jsc. > >Tools: > >To make --32-bit work correctly on Linux/64bit we need to: > >- Set FORCE_32BIT on, which will be read by CMake to set WTF_CPU >correctly. Ideally we'd just redefine CMAKE_SYSTEM_PROCESSOR, but >unfortunately CMake only allows us to do this during >crosscompilation, which is overkill here. >- Set CMAKE_PREFIX_PATH and CMAKE_LIBRARY_ARCHITECTURE so that the >pkg-config detection module uses the x86 .pc files instead of the >x86_64 ones. >- Set the -m32 flags for the compiler. > >* Scripts/webkitdirs.pm: >(generateBuildSystemFromCMakeProject): >--- > CMakeLists.txt | 6 +++++- > ChangeLog | 10 ++++++++++ > Tools/ChangeLog | 21 +++++++++++++++++++++ > Tools/Scripts/webkitdirs.pm | 9 +++++++++ > 4 files changed, 45 insertions(+), 1 deletion(-) > >diff --git a/CMakeLists.txt b/CMakeLists.txt >index 31adc44968c..d22b9e28779 100644 >--- a/CMakeLists.txt >+++ b/CMakeLists.txt >@@ -93,7 +93,11 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64") > elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "^mips") > set(WTF_CPU_MIPS 1) > elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(x64|x86_64|amd64)") >- set(WTF_CPU_X86_64 1) >+ if (FORCE_32BIT) >+ set(WTF_CPU X86 1) >+ else () >+ set(WTF_CPU_X86_64 1) >+ endif () > elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "(i[3-6]86|x86)") > set(WTF_CPU_X86 1) > elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "ppc") >diff --git a/ChangeLog b/ChangeLog >index a69b7ba021e..87cbb68413d 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,13 @@ >+2019-02-01 Xan Lopez <xan@igalia.com> >+ >+ [CMake] Build 32bit binaries on Linux/64bit when the --32-bit is passed to build-jsc >+ https://bugs.webkit.org/show_bug.cgi?id=194147 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * CMakeLists.txt: set WTF_CPU properly if FORCE_32BIT is set in >+ build-jsc. >+ > 2019-01-24 Guillaume Emont <guijemont@igalia.com> > > [JSC] Reenable baseline JIT on mips >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b2de9a706af..d07f3d1ec86 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,24 @@ >+2019-02-01 Xan Lopez <xan@igalia.com> >+ >+ [CMake] Build 32bit binaries on Linux/64bit when the --32-bit is passed to build-jsc >+ https://bugs.webkit.org/show_bug.cgi?id=194147 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ To make --32-bit work correctly on Linux/64bit we need to: >+ >+ - Set FORCE_32BIT on, which will be read by CMake to set WTF_CPU >+ correctly. Ideally we'd just redefine CMAKE_SYSTEM_PROCESSOR, but >+ unfortunately CMake only allows us to do this during >+ crosscompilation, which is overkill here. >+ - Set CMAKE_PREFIX_PATH and CMAKE_LIBRARY_ARCHITECTURE so that the >+ pkg-config detection module uses the x86 .pc files instead of the >+ x86_64 ones. >+ - Set the -m32 flags for the compiler. >+ >+ * Scripts/webkitdirs.pm: >+ (generateBuildSystemFromCMakeProject): >+ > 2019-01-31 Ryan Haddad <ryanhaddad@apple.com> > > Update flakiness dashboard configuration after recent queue changes >diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm >index e66034a3861..e8b02fb8a73 100755 >--- a/Tools/Scripts/webkitdirs.pm >+++ b/Tools/Scripts/webkitdirs.pm >@@ -2261,6 +2261,15 @@ sub generateBuildSystemFromCMakeProject > # Some ports have production mode, but build-webkit should always use developer mode. > push @args, "-DDEVELOPER_MODE=ON" if isGtk() || isJSCOnly() || isWPE() || isWinCairo(); > >+ if ($architecture eq "x86_64" && shouldBuild32Bit()) { >+ # CMAKE_LIBRARY_ARCHITECTURE is needed to get the right .pc >+ # files in debian-based systems, for the others >+ # CMAKE_PREFIX_PATH will get us /usr/lib, which should be the >+ # right path for 32bit. See FindPkgConfig.cmake. >+ push @cmakeArgs, '-DFORCE_32BIT=ON -DCMAKE_PREFIX_PATH="/usr" -DCMAKE_LIBRARY_ARCHITECTURE=x86'; >+ $ENV{'CFLAGS'} = "-m32" . ($ENV{'CFLAGS'} || ""); >+ $ENV{'CXXFLAGS'} = "-m32" . ($ENV{'CXXFLAGS'} || ""); >+ } > push @args, @cmakeArgs if @cmakeArgs; > > my $cmakeSourceDir = isCygwin() ? windowsSourceDir() : sourceDir(); >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dbates
:
review+
dbates
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194147
:
360851
|
364259