From 4a7f4e20741ba426e8a0e58445f26b5aee0d5425 Mon Sep 17 00:00:00 2001 From: Jessica Hamilton Date: Tue, 22 Jul 2014 21:17:11 +1200 Subject: [PATCH] Build fixes on x86_64 to gcc & haikuwebkit --- .../haikuwebkit/haikuwebkit-1.4.1.recipe | 9 +++--- .../patches/haikuwebkit-1.4.1.patchset | 29 +++++++++++++++++++ sys-devel/gcc/gcc-4.8.3_2014_05_28.recipe | 7 ++--- .../gcc/patches/gcc-4.8.3_2014_05_28.patchset | 24 +++++++++++++++ 4 files changed, 59 insertions(+), 10 deletions(-) create mode 100644 haiku-libs/haikuwebkit/patches/haikuwebkit-1.4.1.patchset create mode 100644 sys-devel/gcc/patches/gcc-4.8.3_2014_05_28.patchset diff --git a/haiku-libs/haikuwebkit/haikuwebkit-1.4.1.recipe b/haiku-libs/haikuwebkit/haikuwebkit-1.4.1.recipe index 99ec95bf5..c556d5fd5 100644 --- a/haiku-libs/haikuwebkit/haikuwebkit-1.4.1.recipe +++ b/haiku-libs/haikuwebkit/haikuwebkit-1.4.1.recipe @@ -15,7 +15,7 @@ LICENSE=" SRC_URI="https://github.com/haiku/webkit/archive/$portVersion.tar.gz" CHECKSUM_SHA256="2fcd29738e32a191f16805a94a36da1a60074d10830be77ca5e052ce779cc683" SRC_FILENAME="haikuwebkit-$portVersion.tar.gz" -REVISION="1" +REVISION="3" ARCHITECTURES="x86 x86_64" if [ $effectiveTargetArchitecture != x86_gcc2 ]; then # x86_gcc2 is fine as primary target architecture as long as we're building @@ -24,10 +24,9 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then fi SECONDARY_ARCHITECTURES="x86" -# TODO see if this is still needed. -#if [ $effectiveTargetArchitecture == x86_64 ]; then -# PATCHES="haikuwebkit-1.3.2.patchset" -#fi +if [ $effectiveTargetArchitecture == x86_64 ]; then + PATCHES="haikuwebkit-1.4.1.patchset" +fi PROVIDES=" haikuwebkit$secondaryArchSuffix = $portVersion diff --git a/haiku-libs/haikuwebkit/patches/haikuwebkit-1.4.1.patchset b/haiku-libs/haikuwebkit/patches/haikuwebkit-1.4.1.patchset new file mode 100644 index 000000000..4a3febfef --- /dev/null +++ b/haiku-libs/haikuwebkit/patches/haikuwebkit-1.4.1.patchset @@ -0,0 +1,29 @@ +From 2164474896a1fc5874d15b290376b830ee05d13a Mon Sep 17 00:00:00 2001 +From: Jonathan Schleifer +Date: Tue, 22 Jul 2014 04:50:47 +0000 +Subject: Fix compilation on x86_64 + + +diff --git a/Source/JavaScriptCore/offlineasm/asm.rb b/Source/JavaScriptCore/offlineasm/asm.rb +index 88c7d7a..11867fe 100644 +--- a/Source/JavaScriptCore/offlineasm/asm.rb ++++ b/Source/JavaScriptCore/offlineasm/asm.rb +@@ -213,9 +213,14 @@ class Assembler + end + end + ++ + def self.externLabelReference(labelName) + if !$emitWinAsm +- "\" LOCAL_REFERENCE(#{labelName}) \"" ++ if labelName == 'llint_throw_from_slow_path_trampoline' ++ "\" GLOBAL_REFERENCE(#{labelName}) \"" ++ else ++ "\" LOCAL_REFERENCE(#{labelName}) \"" ++ end + else + "#{labelName}" + end +-- +1.8.3.4 + diff --git a/sys-devel/gcc/gcc-4.8.3_2014_05_28.recipe b/sys-devel/gcc/gcc-4.8.3_2014_05_28.recipe index c1e752f29..e31eabc3f 100644 --- a/sys-devel/gcc/gcc-4.8.3_2014_05_28.recipe +++ b/sys-devel/gcc/gcc-4.8.3_2014_05_28.recipe @@ -8,13 +8,13 @@ srcGitRev="3ad9ac2317f63b65937473c4fbe37c9e93e3a116" SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="85499c650421b68f9830d3fb2ddfafb8789a3e1ffce75e8dd27aaed678135df0" SRC_FILENAME="$portVersionedName.tar.gz" -REVISION="2" +REVISION="3" LICENSE=" GNU GPL v2 GNU LGPL v2 " COPYRIGHT="1988-2013 Free Software Foundation, Inc." - +PATCHES="gcc-4.8.3_2014_05_28.patchset" ARCHITECTURES="x86 x86_64 arm" if [ $effectiveTargetArchitecture != x86_gcc2 ]; then @@ -87,9 +87,6 @@ BUILD() # disable multilib support, as x86_64 by default tries to build the # 32-bit libraries, too, which fails as no 32-bit libroot is available additionalConfigureFlags+=" --disable-multilib" - - # disable TLS support, as it causes an ICE on x86_64 - additionalConfigureFlags+=" --disable-tls" fi CFLAGS="-O2 -U_FORTIFY_SOURCE" CXXFLAGS="-O2" "$sourceDir/configure" \ diff --git a/sys-devel/gcc/patches/gcc-4.8.3_2014_05_28.patchset b/sys-devel/gcc/patches/gcc-4.8.3_2014_05_28.patchset new file mode 100644 index 000000000..6329e3fa8 --- /dev/null +++ b/sys-devel/gcc/patches/gcc-4.8.3_2014_05_28.patchset @@ -0,0 +1,24 @@ +From e9e78f55996c23624ebd792eed57dd60a571daaa Mon Sep 17 00:00:00 2001 +From: Jessica Hamilton +Date: Tue, 22 Jul 2014 01:32:29 +0000 +Subject: Specify -save-temps for libgcc during dependency phase + +This works around an internal compiler error when building +gcc for x86_64 with thread local storage enabled. + +diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in +index 2353c9c..93eada2 100644 +--- a/libcpp/Makefile.in ++++ b/libcpp/Makefile.in +@@ -207,7 +207,7 @@ ifeq ($(DEPMODE),depmode=gcc3) + # Note that we put the dependencies into a .Tpo file, then move them + # into place if the compile succeeds. We need this because gcc does + # not atomically write the dependency output file. +-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo ++COMPILE = $(COMPILE.base) -o $@ -save-temps -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo + POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po + else + COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \ +-- +1.8.3.4 +