From a737a5a32cdaaa7aa606f503331d5c4b4d8eae48 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Oct 28 2013 13:40:26 +0000 Subject: Disable HiPE on unsupported arches Signed-off-by: Peter Lemenkov --- diff --git a/erlang.spec b/erlang.spec index 1d4cbfd..e673291 100644 --- a/erlang.spec +++ b/erlang.spec @@ -20,11 +20,17 @@ %global use_prebuilt_docs 0 %endif +%ifarch %{arm} %{ix86} x86_64 ppc +%global __with_hipe 1 +%else +%global __with_hipe 0 +%endif + %global n_uvr %{name}-%{upstream_ver}-%{upstream_rel_for_rpm} Name: erlang Version: %{upstream_ver} -Release: %{upstream_rel_for_rpm}.3%{?dist} +Release: %{upstream_rel_for_rpm}.4%{?dist} Summary: General-purpose programming language and runtime environment Group: Development/Languages @@ -82,6 +88,9 @@ Patch8: otp-0008-Fix-for-armv7hl-architecture.patch # Fedora specific patch # TEMPORARILY disable ECC until dust settles Patch9: otp-0009-TEMPORARILY-disable-ECC-until-dust-settles.patch +# Fedora specific patch +# Fix for powerpc architecture +Patch10: otp-0010-Fix-for-powerpc-architecture.patch # end of autogenerated patch tag list # BuildRoot not strictly needed since F10, but keep it for spec file robustness @@ -944,6 +953,7 @@ Erlang mode for XEmacs (source lisp files). %endif %patch8 -p1 -b .Fix_for_armv7hl_architecture %patch9 -p1 -b .TEMPORARILY_disable_ECC_until_dust_settles +%patch10 -p1 -b .Fix_for_powerpc_architecture # end of autogenerated prep patch list # FIXME we should come up with a better solution @@ -966,9 +976,9 @@ rm -f lib/ssl/examples/certs/etc/erlangCA/index.txt.old %build %ifarch sparcv9 sparc64 -CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-hipe +CFLAGS="$RPM_OPT_FLAGS -mcpu=ultrasparc -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{__with_hipe:--enable-hipe} %else -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp --enable-hipe +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure --enable-shared-zlib --enable-sctp %{__with_hipe:--enable-hipe} %endif # Remove pre-built BEAM files @@ -2274,6 +2284,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Oct 28 2013 Peter Lemenkov - R16B-02.4 +- Disable HiPE on s390(x) (rhbz #1023960) +- Fix HiPE on ppc (rhbz #1023960) + * Thu Oct 24 2013 Peter Lemenkov - R16B-02.3 - TEMPORARILY disable ECC until dust settles diff --git a/otp-0010-Fix-for-powerpc-architecture.patch b/otp-0010-Fix-for-powerpc-architecture.patch new file mode 100644 index 0000000..1d56394 --- /dev/null +++ b/otp-0010-Fix-for-powerpc-architecture.patch @@ -0,0 +1,29 @@ +From: Peter Lemenkov +Date: Mon, 28 Oct 2013 17:11:11 +0400 +Subject: [PATCH] Fix for powerpc architecture + +Taken from openSUSE: + +* https://build.opensuse.org/package/view_file/devel:languages:erlang:Factory/erlang/erlang-ppc.patch?expand=1 + +See also: + +* https://bugzilla.redhat.com/1023960 + +Signed-off-by: Peter Lemenkov +--- + erts/configure.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/erts/configure.in b/erts/configure.in +index 5b72215..9f396f0 100644 +--- a/erts/configure.in ++++ b/erts/configure.in +@@ -625,6 +625,7 @@ case $chk_arch_ in + x86_64) ARCH=amd64;; + amd64) ARCH=amd64;; + macppc) ARCH=ppc;; ++ powerpc) ARCH=ppc;; + ppc) ARCH=ppc;; + ppc64) ARCH=ppc64;; + "Power Macintosh") ARCH=ppc;;