From 895626fd25dde9b6a137334570dfa9ee49bf0b5e Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Fri, 28 Jul 2017 11:12:36 +0300 Subject: [PATCH 1/6] Add back missing stuff necessary for compiling V8 --- ...01-Build-a-standalone-static-library.patch | 2 +- ...0002-Don-t-compile-unnecessary-stuff.patch | 20 +++++++++---------- ...the-fPIC-flag-for-the-static-library.patch | 2 +- ...bed-debug-symbols-in-macOS-libraries.patch | 2 +- patches/0005-Fix-GCC-7-build-errors.patch | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/patches/0001-Build-a-standalone-static-library.patch b/patches/0001-Build-a-standalone-static-library.patch index 09c8d385..0b43d4eb 100644 --- a/patches/0001-Build-a-standalone-static-library.patch +++ b/patches/0001-Build-a-standalone-static-library.patch @@ -1,4 +1,4 @@ -From b3d75137651a41d141c29c55725bc97485b247d8 Mon Sep 17 00:00:00 2001 +From 6c28fb0319c5e2e7afad4b5731fc0ded86e1f7e7 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 25 Jul 2016 00:00:19 +0300 Subject: [PATCH 1/5] Build a standalone static library diff --git a/patches/0002-Don-t-compile-unnecessary-stuff.patch b/patches/0002-Don-t-compile-unnecessary-stuff.patch index a8fddc27..7b2d1f23 100644 --- a/patches/0002-Don-t-compile-unnecessary-stuff.patch +++ b/patches/0002-Don-t-compile-unnecessary-stuff.patch @@ -1,18 +1,18 @@ -From 45000acd2fe5ccf48d1061f76eea2333524ebe74 Mon Sep 17 00:00:00 2001 +From 31d199f67ff88be5576869abcc23ecf219fa1e6f Mon Sep 17 00:00:00 2001 From: Petko Bordjukov -Date: Tue, 28 Feb 2017 00:04:26 +0200 +Date: Fri, 28 Jul 2017 11:11:08 +0300 Subject: [PATCH 2/5] Don't compile unnecessary stuff --- - Makefile | 14 ++++---------- + Makefile | 12 +++--------- gypfiles/all.gyp | 33 --------------------------------- - 2 files changed, 4 insertions(+), 43 deletions(-) + 2 files changed, 3 insertions(+), 42 deletions(-) diff --git a/Makefile b/Makefile -index ed5b3a7fab..360dc3a1a1 100644 +index ed5b3a7fab..04eddb5e8a 100644 --- a/Makefile +++ b/Makefile -@@ -265,16 +265,10 @@ ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ +@@ -265,15 +265,9 @@ ANDROID_ARCHES = android_ia32 android_x64 android_arm android_arm64 \ android_mipsel android_x87 # List of files that trigger Makefile regeneration: @@ -25,14 +25,12 @@ index ed5b3a7fab..360dc3a1a1 100644 - tools/parser-shell.gyp testing/gmock.gyp testing/gtest.gyp \ - buildtools/third_party/libc++abi/libc++abi.gyp \ - buildtools/third_party/libc++/libc++.gyp samples/samples.gyp \ -- src/third_party/vtune/v8vtune.gyp src/d8.gyp +GYPFILES = gypfiles/shim_headers.gypi gypfiles/features.gypi \ -+ gypfiles/standalone.gypi gypfiles/toolchain.gypi \ -+ gypfiles/all.gyp gypfiles/mac/asan.gyp \ -+ tools/parser-shell.gyp src/d8.gyp ++ gypfiles/standalone.gypi gypfiles/all.gyp \ ++ gypfiles/mac/asan.gyp src/v8.gyp tools/parser-shell.gyp \ + src/third_party/vtune/v8vtune.gyp src/d8.gyp # If vtunejit=on, the v8vtune.gyp will be appended. - ifeq ($(vtunejit), on) diff --git a/gypfiles/all.gyp b/gypfiles/all.gyp index bc9d9650eb..96820a0ecc 100644 --- a/gypfiles/all.gyp diff --git a/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch b/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch index be228085..d6e67c49 100644 --- a/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +++ b/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch @@ -1,4 +1,4 @@ -From 185c0249653dafb4ae20d21f2a0cc241c3e96c64 Mon Sep 17 00:00:00 2001 +From fe76837b00357250a01ad71c4cce4b7524dd765f Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Mon, 25 Jul 2016 00:05:47 +0300 Subject: [PATCH 3/5] Use the -fPIC flag for the static library diff --git a/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch b/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch index e6c79a00..5a080b33 100644 --- a/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +++ b/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch @@ -1,4 +1,4 @@ -From 596e88c9c1a158abc878bd81112aa9b5ec38033a Mon Sep 17 00:00:00 2001 +From 7b00cf7c2c13d4c528bccd3bc4a91426f4e35145 Mon Sep 17 00:00:00 2001 From: Jb Aviat Date: Mon, 27 Feb 2017 11:14:42 +0200 Subject: [PATCH 4/5] Do not embed debug symbols in macOS libraries diff --git a/patches/0005-Fix-GCC-7-build-errors.patch b/patches/0005-Fix-GCC-7-build-errors.patch index 2693b206..36ca258b 100644 --- a/patches/0005-Fix-GCC-7-build-errors.patch +++ b/patches/0005-Fix-GCC-7-build-errors.patch @@ -1,4 +1,4 @@ -From da4cfa16ed1cbbc5e2ecfeecb64cbe939029ff36 Mon Sep 17 00:00:00 2001 +From a8f772b3a6bcfad871b4d09935727032faf84df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 20 Jun 2017 13:14:38 +0200 Subject: [PATCH 5/5] Fix GCC 7 build errors From ace43f148faf4e17e3a409baf357a6f8f55dca92 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Fri, 28 Jul 2017 18:24:43 +0300 Subject: [PATCH 2/6] Reorder library flags in accordance with the wiki --- ext/libv8/paths.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libv8/paths.rb b/ext/libv8/paths.rb index 4c5e64a3..34cb70bd 100644 --- a/ext/libv8/paths.rb +++ b/ext/libv8/paths.rb @@ -11,7 +11,7 @@ def include_paths end def object_paths - [:base, :libplatform, :libsampler, :libbase, :snapshot].map do |name| + [:base, :libbase, :snapshot, :libplatform, :libsampler].map do |name| Shellwords.escape libv8_object(name) end end From 7b13866b5833118a8bf8af8ac9eb33c22d82eaba Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 3 Aug 2017 06:26:25 +0300 Subject: [PATCH 3/6] Bump version --- lib/libv8/version.rb | 2 +- vendor/depot_tools | 2 +- vendor/v8 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libv8/version.rb b/lib/libv8/version.rb index 0ea73883..a09aff07 100644 --- a/lib/libv8/version.rb +++ b/lib/libv8/version.rb @@ -1,3 +1,3 @@ module Libv8 - VERSION = "6.0.286.44.0beta1" + VERSION = "6.0.286.54.0beta1" end diff --git a/vendor/depot_tools b/vendor/depot_tools index 56766f1d..c1a82cb1 160000 --- a/vendor/depot_tools +++ b/vendor/depot_tools @@ -1 +1 @@ -Subproject commit 56766f1d6234c07d219f61802db52194aed3a9ac +Subproject commit c1a82cb1a9e7234c0b9a633f684225dee1185ab1 diff --git a/vendor/v8 b/vendor/v8 index de3eac39..7e9b79ac 160000 --- a/vendor/v8 +++ b/vendor/v8 @@ -1 +1 @@ -Subproject commit de3eac39923aeb8db4908751afa078c3b89c578a +Subproject commit 7e9b79ac823001bdd0966adb7c2ac8630d4f5e9b From 99774366a4c369e8383e208c907e52c740156c0f Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 22 Aug 2017 15:49:22 +0300 Subject: [PATCH 4/6] Add a group around V8 static libraries This has been suggested in the Wiki so it's probably a good idea to do it. --- ext/libv8/location.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/libv8/location.rb b/ext/libv8/location.rb index bc4111bf..8383a252 100644 --- a/ext/libv8/location.rb +++ b/ext/libv8/location.rb @@ -29,7 +29,7 @@ def install! def configure(context = MkmfContext.new) context.incflags.insert 0, Libv8::Paths.include_paths.map{ |p| "-I#{p}" }.join(" ") + " " - context.ldflags.insert 0, Libv8::Paths.object_paths.join(" ") + " " + context.ldflags.insert 0, "-Wl,--start-group " + Libv8::Paths.object_paths.join(" ") + " -Wl,--end-group " end def verify_installation! From 34007786e987bff45cc434917fdedb2922cc250c Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 22 Aug 2017 17:36:35 +0300 Subject: [PATCH 5/6] Update the changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f13f49c..ba56453a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,11 @@ -### v5.9.211.38.0beta1 - Unreleased +### v6.0.286.54.0 - Unreleased -* Update upstream v8 version to 6.0.286.44 +* Update upstream v8 version to 6.0.286.54 * V8 source is no longer pulled using the fetch command from depot_tools but is instead added as a submodule in the current tree * Hooks are no longer ran after syncing V8's upstream dependencies +* Reordered libraries in accordance with the V8 wiki +* Added groups around the library flags in accordance with the V8 wiki ### v5.9.211.38.0, v5.9.211.38.1 - 2017-07-26 From b9aafdf4d1e136b39d009c84ad69152fa09e7940 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Tue, 22 Aug 2017 17:42:21 +0300 Subject: [PATCH 6/6] Fix the specs after the modification of the ldflags --- spec/location_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/location_spec.rb b/spec/location_spec.rb index 98fdb09e..02f5c3fe 100644 --- a/spec/location_spec.rb +++ b/spec/location_spec.rb @@ -64,7 +64,7 @@ end it "prepends the locations of any libv8 objects on the the ldflags" do - expect(@context.ldflags).to eql "/foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libplatform.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libsampler.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libbase.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_snapshot.a -lobjc -lpthread" + expect(@context.ldflags).to eql "-Wl,--start-group /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_base.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libbase.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_snapshot.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libplatform.a /foo\\ bar/v8/out/x64.release/obj.target/tools/gyp/libv8_libsampler.a -Wl,--end-group -lobjc -lpthread" end end end