openSUSE Commits
Threads by month
- ----- 2025 -----
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
April 2014
- 1 participants
- 1084 discussions
Hello community,
here is the log from the commit of package cross-aarch64-gcc49 for openSUSE:Factory checked in at 2014-04-22 11:54:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cross-aarch64-gcc49 (Old)
and /work/SRC/openSUSE:Factory/.cross-aarch64-gcc49.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cross-aarch64-gcc49"
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
New:
----
_link
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ _link ++++++
<link package="gcc49" cicount="copy" />
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package gcc49 for openSUSE:Factory checked in at 2014-04-22 11:54:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcc49 (Old)
and /work/SRC/openSUSE:Factory/.gcc49.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc49"
Changes:
--------
New Changes file:
--- /dev/null 2014-04-17 09:46:44.096034755 +0200
+++ /work/SRC/openSUSE:Factory/.gcc49.new/cross-aarch64-gcc49.changes 2014-04-22 11:54:38.000000000 +0200
@@ -0,0 +1,83 @@
+-------------------------------------------------------------------
+Mon Apr 14 08:29:37 UTC 2014 - rguenther(a)suse.com
+
+- Update to gcc 4.9.0 RC1.
+
+-------------------------------------------------------------------
+Mon Apr 7 09:14:13 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r209179).
+ * obsoletes gcc49-pr59626.patch
+- tls-no-direct.diff, only affect %ix86.
+- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s}
+
+-------------------------------------------------------------------
+Mon Mar 31 10:17:53 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208978).
+- Enable cross compilers (and icecream backends), compared to GCC 4.8
+ packages drop hppa and ia64 from the list of targets.
+- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references
+ in global initializers.
+
+-------------------------------------------------------------------
+Tue Mar 25 08:49:26 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208807).
+- Use power7 code generation only for ppc64le.
+- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers
+ with LTO.
+
+-------------------------------------------------------------------
+Fri Mar 21 09:35:08 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208745).
+
+-------------------------------------------------------------------
+Thu Mar 13 15:18:38 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208538).
+- Change -Wunprototyped-calls from being enabled by default to be
+ enabled with -Wall to solve GCC testsuite fallout.
+
+-------------------------------------------------------------------
+Fri Feb 28 13:11:38 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208221).
+- Fix typo in libgcj_bc suffix computation.
+
+-------------------------------------------------------------------
+Wed Feb 26 09:35:45 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208170).
+ * includes now obsolete gcc49-libjava-install.patch
+- Disable building libvtv, it's not useful unless we instrument
+ libstdc++.
+
+-------------------------------------------------------------------
+Wed Feb 19 13:02:03 UTC 2014 - rguenther(a)suse.com
+
+- New package, inherits from gcc48
+ * gcc-dir-version.patch, drop patchlevel from install directory names
+ * gcc-sles-version.patch, do not print (prerelease) with --version
+ but drop patchlevel by one
+ * gcc-add-defaultsspec.diff, add the ability to provide a specs file
+ that is read by default
+ * Wunprototyped-calls.diff, new warning to warn about calls to functions
+ without seeing a real prototype earlier
+ * libjava-no-multilib.diff, do not build multilibs for libjava even on
+ multilib systems (we use baselibs for it)
+ * tls-no-direct.diff, avoid direct %fs references on x86 to not slow down
+ Xen
+ * gcc43-no-unwind-tables.diff, do not produce unwind tables for CRT files
+ * gcc41-ia64-stack-protector.patch, stack protector support for IA64
+ * gcc41-java-slow_pthread_self.patch, force us to assume pthread_self
+ is fast
+ * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr for ppc
+ * gcc44-textdomain.patch, make translation files version specific and
+ adjust textdomain to find them
+ * gcc44-rename-info-files.patch, fix cross-references in info files when
+ renaming them to be version specific
+- Adds the following patches
+ * gcc49-libjava-install.patch, fix PR60261
+
New Changes file:
cross-armv6hl-gcc49.changes: same change
New Changes file:
cross-armv7hl-gcc49.changes: same change
New Changes file:
cross-i386-gcc49.changes: same change
New Changes file:
cross-ppc-gcc49.changes: same change
New Changes file:
cross-ppc64-gcc49.changes: same change
New Changes file:
cross-ppc64le-gcc49.changes: same change
New Changes file:
cross-s390-gcc49.changes: same change
New Changes file:
cross-s390x-gcc49.changes: same change
New Changes file:
cross-x86_64-gcc49.changes: same change
--- /work/SRC/openSUSE:Factory/gcc49/gcc49-testresults.changes 2014-03-22 09:07:07.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gcc49.new/gcc49-testresults.changes 2014-04-22 11:54:41.000000000 +0200
@@ -1,0 +2,30 @@
+Mon Apr 14 08:29:37 UTC 2014 - rguenther(a)suse.com
+
+- Update to gcc 4.9.0 RC1.
+
+-------------------------------------------------------------------
+Mon Apr 7 09:14:13 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r209179).
+ * obsoletes gcc49-pr59626.patch
+- tls-no-direct.diff, only affect %ix86.
+- Drop old compatibility provide and conflict of/with libgcc%{libgcc_s}
+
+-------------------------------------------------------------------
+Mon Mar 31 10:17:53 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208978).
+- Enable cross compilers (and icecream backends), compared to GCC 4.8
+ packages drop hppa and ia64 from the list of targets.
+- gcc49-pr60720.patch, fix LTO ICEs with mismatched decl references
+ in global initializers.
+
+-------------------------------------------------------------------
+Tue Mar 25 08:49:26 UTC 2014 - rguenther(a)suse.com
+
+- Update to SVN trunk head (r208807).
+- Use power7 code generation only for ppc64le.
+- gcc49-pr59626.patch, fix indirectly calling _FORTIFY_SOURCE wrappers
+ with LTO.
+
+-------------------------------------------------------------------
gcc49.changes: same change
libffi49.changes: same change
libgcj49.changes: same change
Old:
----
gcc-4.9.0-r208745.tar.bz2
New:
----
cross-aarch64-gcc49.changes
cross-aarch64-gcc49.spec
cross-armv6hl-gcc49.changes
cross-armv6hl-gcc49.spec
cross-armv7hl-gcc49.changes
cross-armv7hl-gcc49.spec
cross-i386-gcc49.changes
cross-i386-gcc49.spec
cross-ppc-gcc49.changes
cross-ppc-gcc49.spec
cross-ppc64-gcc49.changes
cross-ppc64-gcc49.spec
cross-ppc64le-gcc49.changes
cross-ppc64le-gcc49.spec
cross-s390-gcc49.changes
cross-s390-gcc49.spec
cross-s390x-gcc49.changes
cross-s390x-gcc49.spec
cross-x86_64-gcc49.changes
cross-x86_64-gcc49.spec
gcc-4.9.0-r209354.tar.bz2
gcc49-pr60720.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ cross-aarch64-gcc49.spec ++++++
#
# spec file for package cross-aarch64-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-aarch64-gcc49
%define cross_arch aarch64
%define gcc_target_arch aarch64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-armv6hl-gcc49.spec ++++++
#
# spec file for package cross-armv6hl-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-armv6hl-gcc49
%define cross_arch armv6hl
%define gcc_target_arch armv6hl-suse-linux-gnueabi
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-armv7hl-gcc49.spec ++++++
#
# spec file for package cross-armv7hl-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-armv7hl-gcc49
%define cross_arch armv7hl
%define gcc_target_arch armv7hl-suse-linux-gnueabi
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-i386-gcc49.spec ++++++
#
# spec file for package cross-i386-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-i386-gcc49
%define cross_arch i386
%define gcc_target_arch i586-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-ppc-gcc49.spec ++++++
#
# spec file for package cross-ppc-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-ppc-gcc49
%define cross_arch ppc
%define gcc_target_arch powerpc64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-ppc64-gcc49.spec ++++++
#
# spec file for package cross-ppc64-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-ppc64-gcc49
%define cross_arch ppc64
%define gcc_target_arch powerpc64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-ppc64le-gcc49.spec ++++++
#
# spec file for package cross-ppc64le-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-ppc64le-gcc49
%define cross_arch ppc64le
%define gcc_target_arch powerpc64le-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-s390-gcc49.spec ++++++
#
# spec file for package cross-s390-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-s390-gcc49
%define cross_arch s390
%define gcc_target_arch s390-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-s390x-gcc49.spec ++++++
#
# spec file for package cross-s390x-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-s390x-gcc49
%define cross_arch s390x
%define gcc_target_arch s390x-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 x86_64 ia64 aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ cross-x86_64-gcc49.spec ++++++
#
# spec file for package cross-x86_64-gcc49
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define pkgname cross-x86_64-gcc49
%define cross_arch x86_64
%define gcc_target_arch x86_64-suse-linux
%define gcc_icecream 1
#
# spec file for package gcc (Version 4.0.1)
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://www.suse.de/feedback/
#
%define build_cp 1
%define build_ada 0
%define build_libjava 0
%define build_java 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv6l" || %{cross_arch} == "armv6hl"
%define binutils_target arm
%endif
%if %{cross_arch} == "armv5tel"
%define binutils_target arm
%endif
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%if %{binutils_target} == "arm"
%define canonical_target_abi -gnueabi
%endif
%if 0%{?gcc_icecream:1}
%define build_sysroot /
%endif
Name: %{pkgname}
BuildRequires: bison
BuildRequires: cross-%{binutils_target}-binutils
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: gettext-devel
BuildRequires: glibc-devel-32bit
BuildRequires: mpc-devel
BuildRequires: mpfr-devel
BuildRequires: perl
%if %{suse_version} > 1220
BuildRequires: makeinfo
%else
BuildRequires: texinfo
%endif
BuildRequires: zlib-devel
%ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
BuildRequires: cloog-isl-devel
BuildRequires: isl-devel
%endif
%ifarch ia64
BuildRequires: libunwind-devel
%endif
%if 0%{!?gcc_icecream:1}
BuildRequires: cross-%cross_arch-glibc-devel
%endif
ExclusiveArch: ppc64 ia64 s390x aarch64
%define _binary_payload w.ufdio
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
%define gcc_snapshot_revision %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/+/-/')
%define binsuffix -4.9
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{gcc_version}%{gcc_snapshot_revision}.tar.bz2
Source1: change_spec
Source2: libffi49-rpmlintrc
Source3: gcc49-rpmlintrc
Source4: ecj.jar
Source5: README.First-for.SuSE.packagers
Source6: baselibs.conf
Source7: libgcj49-rpmlintrc
#testpatch begin
Patch1: gcc-dir-version.patch
Patch7: gcc-add-defaultsspec.diff
Patch8: Wunprototyped-calls.diff
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
Patch57: gcc41-ppc32-retaddr.patch
# Some patches taken from Debian
Patch60: gcc44-textdomain.patch
Patch61: gcc44-rename-info-files.patch
#testpatch end
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
Group: Development/Languages/C and C++
%description
Core package for the GNU Compiler Collection, including the C language
frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
gcc-obj-c++.
# Define the canonical target and host architecture
# %gcc_target_arch is supposed to be the full target triple
# %cross_arch is supposed to be the rpm target variant arch
# %TARGET_ARCH will be the canonicalized target CPU part
# %HOST_ARCH will be the canonicalized host CPU part
%if 0%{?gcc_target_arch:1}
%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%else
%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%endif
%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
%ifarch %sparc
%define GCCDIST sparc64-suse-linux
%else
%ifarch %arm
%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi
%else
%define GCCDIST %{HOST_ARCH}-suse-linux
%endif
%endif
%endif
%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
%prep
%setup -q -n gcc-%{gcc_version}%{gcc_snapshot_revision}
#test patching start
%patch1
%patch7
%patch8
%patch23
%patch24
%patch30
%patch33
%patch51
%patch55
%patch57
%patch60
%patch61
#test patching end
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
# the libstdc++ abi testsuite baseline files accordingly
%ifarch ppc
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
fi
%endif
%build
# Avoid rebuilding of generated files
contrib/gcc_update --touch
# Avoid fucking up testsuite results with Java and indirect dispatch
export SUSE_ASNEEDED=0
# Split version file into version used for directories (X.Y) and
# version to report with --version (X.Y.Z).
# See also gcc-dir-version.patch.
# Also decrement the patchlevel version by one if possible and remove
# the 'prerelease' tagging in this case
if test `cat gcc/DEV-PHASE` == "prerelease"; then
if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
: > gcc/DEV-PHASE
fi
( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
else
mv gcc/BASE-VER gcc/FULL-VER
fi
cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
rm -rf obj-%{GCCDIST}
mkdir obj-%{GCCDIST}
cd obj-%{GCCDIST}
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
%ifarch %ix86
# -mcpu is superceded by -mtune but -mtune is not supported by
# our bootstrap compiler. -mcpu gives a warning that stops
# the build process, so remove it for now. Also remove all other
# -march and -mtune flags. They are superseeded by proper
# default compiler settings now.
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
%endif
%ifarch s390 s390x
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
%endif
%if 0%{?gcc_target_arch:1}
# Kill all -march/tune/cpu because that screws building the target libs
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
%endif
# Replace 2 spaces by one finally
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
languages=c
%if %{build_cp}
languages=$languages,c++
%endif
%if %{build_objc}
languages=$languages,objc
%endif
%if %{build_fortran}
languages=$languages,fortran
%endif
%if %{build_objcp}
languages=$languages,obj-c++
%endif
%if %{build_java}
languages=$languages,java
%endif
%if %{build_ada}
languages=$languages,ada
%endif
%if %{build_go}
languages=$languages,go
%endif
J=%{?jobs:%jobs}
if test -z "$J"; then
J=$(getconf _NPROCESSORS_CONF)
JL=$(($J * 2))
else
test 1 -gt "$J" && J=1
JL=$(($(getconf _NPROCESSORS_CONF)*2))
fi
if test "$J" == "0"; then
J=1
fi
if test "$JL" == "0"; then
JL=1
fi
PARALLEL="-j$J -l$JL"
# we don't want some miscompiles in the testsuite, or some fault in
# the compiler to kill the machine. Hence we limit the amount of memory
# by the physical RAM plus half of swap
#MEM=$(free -m | awk '/^Mem:/ {print $2}')
#SWAP=$(free -m | awk '/^Swap:/ {print $2}')
#ulimit -v $(((MEM + SWAP/2)*1024))
# In general we want to ship release checking enabled compilers
# and run BETA with checking enabled.
ENABLE_CHECKING="--enable-checking=yes"
#ENABLE_CHECKING="--enable-checking=release"
# Work around tail/head -1 changes
export _POSIX2_VERSION=199209
%if %{build_ada}
# Using the host gnatmake like
# CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
# GNATMAKE="gnatmake%{hostsuffix}"
# doesn't work due to PR33857, so an un-suffixed gnatmake has to be
# available
mkdir -p host-tools/bin
cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
ln -sf /usr/%{_lib} host-tools/%{_lib}
export PATH="`pwd`/host-tools/bin:$PATH"
%endif
#%if 0%{?gcc_target_arch:1}
#%else
# --enable-threads=posix \
#%endif
# --enable-shared \
%if "%{TARGET_ARCH}" == "armv7hl"
# temporary workaround for a miscompilation of hash functions in java code
GCJ_EXTRA_FLAGS="-marm"
%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
../configure \
--prefix=%{_prefix} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--libexecdir=%{_libdir} \
--enable-languages=$languages \
$ENABLE_CHECKING \
--with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
--enable-ssp \
--disable-libssp \
%if 0%{!?build_libvtv:1}
--disable-libvtv \
%endif
--disable-plugin \
--with-bugurl="http://bugs.opensuse.org/" \
--with-pkgversion="SUSE Linux" \
%if !%{build_libjava}
--disable-libgcj \
%else
--with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
--with-ecj-jar=%{libsubdir}/ecj.jar \
--disable-java-awt \
%if !%{biarch_libjava}
--disable-libjava-multilib \
%endif
%endif
--with-slibdir=/%{_lib} \
--with-system-zlib \
--enable-__cxa_atexit \
--enable-libstdcxx-allocator=new \
--disable-libstdcxx-pch \
--enable-version-specific-runtime-libs \
%if 0%{suse_version} > 1100
--enable-linker-build-id \
%endif
--enable-linux-futex \
--program-suffix=%{binsuffix} \
%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
--without-system-libunwind \
%endif
%endif
%if 0%{?gcc_target_arch:1}
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
--with-sysroot=%sysroot \
%else
--with-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%if 0%{?build_sysroot:1}
--with-build-sysroot=%{build_sysroot} \
%else
%if 0%{?sysroot:1}
--with-build-sysroot=%{sysroot} \
%else
--with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
%endif
%endif
%if 0%{?canonical_target:1}
--with-build-time-tools=/usr/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
%endif
%if "%{TARGET_ARCH}" == "spu"
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
--with-newlib \
%endif
%endif
%if "%{TARGET_ARCH}" == "armv5tel"
--with-arch=armv5te \
--with-float=soft \
--with-mode=arm \
--with-abi=aapcs-linux \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv6hl"
--with-arch=armv6zk \
--with-tune=arm1176jzf-s \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfp \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"
--with-arch=armv7-a \
--with-tune=cortex-a15 \
--with-float=hard \
--with-abi=aapcs-linux \
--with-fpu=vfpv3-d16 \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64" || "%{TARGET_ARCH}" == "powerpc64le"
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
%if "%{TARGET_ARCH}" == "powerpc64le"
--with-cpu=power7 \
%else
--with-cpu-64=power4 \
%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
--disable-multilib \
%endif
%endif
%if "%{TARGET_ARCH}" == "sparc64"
--with-cpu=ultrasparc \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "sparc"
--with-cpu=v8 \
--with-long-double-128 \
%endif
%if "%{TARGET_ARCH}" == "i586"
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "x86_64"
--enable-multilib \
--with-arch-32=i586 \
--with-tune=generic \
%endif
%if "%{TARGET_ARCH}" == "s390"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "s390x"
--with-tune=zEC12 --with-arch=z196 \
--with-long-double-128 \
--enable-decimal-float \
%endif
%if "%{TARGET_ARCH}" == "m68k"
--disable-multilib \
%endif
--build=%{GCCDIST} \
--host=%{GCCDIST}
%if 0%{!?gcc_icecream:1}
make %{?jobs:-j%jobs}
%else
make %{?jobs:-j%jobs} all-host
%endif
%package -n cross-%cross_arch-gcc49-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc49-icecream-backend
This package contains the icecream environment for the GNU C Compiler
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
%install
cd obj-%{GCCDIST}
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
rm -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.la
# common fixup
rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
# remove docs
rm -rf $RPM_BUILD_ROOT%{_mandir}
rm -rf $RPM_BUILD_ROOT%{_infodir}
# install and fixup target parts
# ??? don't do this - debugedit is not prepared for this and crashes
# so expect the sysroot to be populated from natively built binaries
#%if 0%{?sysroot:1}
#make DESTDIR=$RPM_BUILD_ROOT/%{sysroot} install-target
#%else
#make DESTDIR=$RPM_BUILD_ROOT/%{_prefix}/%{gcc_target_arch} install-target
#%endif
# Build an icecream environment
# The assembler comes from the cross-binutils, and hence is _not_
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done
if test -f $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so; then
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/liblto_plugin.so \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/liblto_plugin.so
fi
# Make sure to also pull in all shared library requirements for the
# binaries we put into the environment which is operated by chrooting
# into it and execing the compiler
libs=`for bin in $RPM_BUILD_ROOT/env/usr/bin/* $RPM_BUILD_ROOT/env%{targetlibsubdir}/*; do \
ldd $bin | sed -n '\,^[^/]*\(/[^ ]*\).*,{ s//\1/; p; }' ;\
done | sort -u `
for lib in $libs; do
# Check wether the same library also exists in the parent directory,
# and prefer that on the assumption that it is a more generic one.
baselib=`echo "$lib" | sed 's,/[^/]*\(/[^/]*\)$,\1,'`
test -f "$baselib" && lib=$baselib
install -s -D $lib $RPM_BUILD_ROOT/env$lib
done
cd $RPM_BUILD_ROOT/env
tar cvzf ../%{name}_%{_arch}.tar.gz *
cd ..
mkdir -p usr/share/icecream-envs
mv %{name}_%{_arch}.tar.gz usr/share/icecream-envs
rpm -q --changelog glibc > usr/share/icecream-envs/%{name}_%{_arch}.glibc
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
%files -n cross-%cross_arch-gcc49-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
%changelog
++++++ gcc49-testresults.spec ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -238,7 +238,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.9.0+r208745
+Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -296,6 +296,7 @@
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -413,6 +414,7 @@
%patch23
%patch24
%patch30
+%patch33
%patch51
%patch55
%patch57
@@ -593,8 +595,8 @@
--enable-linker-build-id \
%endif
--enable-linux-futex \
-%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
+%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
@@ -602,6 +604,7 @@
%endif
%endif
%if 0%{?gcc_target_arch:1}
+ --program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
@@ -653,9 +656,11 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-32=power7 \
- --with-cpu-64=power7 \
- --with-tune=power7 \
+%if "%{TARGET_ARCH}" == "powerpc64le"
+ --with-cpu=power7 \
+%else
+ --with-cpu-64=power4 \
+%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
++++++ gcc49.spec ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -220,7 +220,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.9.0+r208745
+Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -278,6 +278,7 @@
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -464,9 +465,6 @@
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libgcc_s%{libgcc_s}
-# Old libgcc packages provided a wrong shlib policy compatible name
-Provides: libgcc%{libgcc_s} = %{version}-%{release}
-Conflicts: %selfconflict libgcc%{libgcc_s}
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
Libgcc is needed for dynamically linked C programs.
@@ -482,9 +480,6 @@
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libgcc_s%{libgcc_s}-32bit
-# Old libgcc packages provided a wrong shlib policy compatible name
-Provides: libgcc%{libgcc_s}-32bit = %{version}-%{release}
-Conflicts: %selfconflict libgcc%{libgcc_s}-32bit
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
Libgcc is needed for dynamically linked C programs.
@@ -500,9 +495,6 @@
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libgcc_s%{libgcc_s}-64bit
-# Old libgcc packages provided a wrong shlib policy compatible name
-Provides: libgcc%{libgcc_s}-64bit = %{version}-%{release}
-Conflicts: %selfconflict libgcc%{libgcc_s}-64bit
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
Libgcc is needed for dynamically linked C programs.
@@ -1733,6 +1725,7 @@
%patch23
%patch24
%patch30
+%patch33
%patch51
%patch55
%patch57
@@ -1913,8 +1906,8 @@
--enable-linker-build-id \
%endif
--enable-linux-futex \
-%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
+%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
@@ -1922,6 +1915,7 @@
%endif
%endif
%if 0%{?gcc_target_arch:1}
+ --program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
@@ -1973,9 +1967,11 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-32=power7 \
- --with-cpu-64=power7 \
- --with-tune=power7 \
+%if "%{TARGET_ARCH}" == "powerpc64le"
+ --with-cpu=power7 \
+%else
+ --with-cpu-64=power4 \
+%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
@@ -2645,6 +2641,7 @@
%ifarch %cilkrts_arch
%versmainlib libcilkrts.so
%versmainlib libcilkrts.a
+%versmainlib libcilkrts.spec
%endif
%ifarch %lsan_arch
%versmainlib liblsan.so
@@ -2695,6 +2692,7 @@
%ifarch %cilkrts_arch
%versbiarchlib libcilkrts.a
%versbiarchlib libcilkrts.so
+%versbiarchlib libcilkrts.spec
%endif
%if 0
%ifarch %tsan_arch
++++++ libffi49.spec ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -237,7 +237,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
Url: http://gcc.gnu.org/
-Version: 4.9.0+r208745
+Version: 4.9.0+r209354
Release: 0
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -295,6 +295,7 @@
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -575,6 +576,7 @@
%patch23
%patch24
%patch30
+%patch33
%patch51
%patch55
%patch57
@@ -755,8 +757,8 @@
--enable-linker-build-id \
%endif
--enable-linux-futex \
-%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
+%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
@@ -764,6 +766,7 @@
%endif
%endif
%if 0%{?gcc_target_arch:1}
+ --program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
@@ -815,9 +818,11 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-32=power7 \
- --with-cpu-64=power7 \
- --with-tune=power7 \
+%if "%{TARGET_ARCH}" == "powerpc64le"
+ --with-cpu=power7 \
+%else
+ --with-cpu-64=power4 \
+%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
libgcj49.spec: same change
++++++ change_spec ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -1,6 +1,6 @@
#!/bin/bash
-do_icecream=0
+do_icecream=1
do_cross_static=0
do_cross_shared=1
do_optional_compiler_languages=0
@@ -130,18 +130,16 @@
#
# For now keep the old way of doing things
if test "$do_icecream" = 1 ; then
-add_cross cross-aarch64-gcc$base_ver-icecream-backend aarch64 aarch64-suse-linux %define gcc_icecream 1
-add_cross cross-armv6hl-gcc$base_ver-icecream-backend armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1
-add_cross cross-armv7hl-gcc$base_ver-icecream-backend armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1
-add_cross cross-hppa-gcc$base_ver-icecream-backend hppa hppa-suse-linux %define gcc_icecream 1
-add_cross cross-i386-gcc$base_ver-icecream-backend i386 i586-suse-linux %define gcc_icecream 1
-add_cross cross-x86_64-gcc$base_ver-icecream-backend x86_64 x86_64-suse-linux %define gcc_icecream 1
-add_cross cross-s390-gcc$base_ver-icecream-backend s390 s390-suse-linux %define gcc_icecream 1
-add_cross cross-s390x-gcc$base_ver-icecream-backend s390x s390x-suse-linux %define gcc_icecream 1
-add_cross cross-ppc-gcc$base_ver-icecream-backend ppc powerpc64-suse-linux %define gcc_icecream 1
-add_cross cross-ppc64-gcc$base_ver-icecream-backend ppc64 powerpc64-suse-linux %define gcc_icecream 1
-add_cross cross-ppc64le-gcc$base_ver-icecream-backend ppc64le powerpc64le-suse-linux %define gcc_icecream 1
-add_cross cross-ia64-gcc$base_ver-icecream-backend ia64 ia64-suse-linux %define gcc_icecream 1
+add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1
+add_cross cross-armv6hl-gcc$base_ver armv6hl armv6hl-suse-linux-gnueabi %define gcc_icecream 1
+add_cross cross-armv7hl-gcc$base_ver armv7hl armv7hl-suse-linux-gnueabi %define gcc_icecream 1
+add_cross cross-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1
+add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1
+add_cross cross-s390-gcc$base_ver s390 s390-suse-linux %define gcc_icecream 1
+add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1
+add_cross cross-ppc-gcc$base_ver ppc powerpc64-suse-linux %define gcc_icecream 1
+add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1
+add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_icecream 1
fi
for f in *.spec; do
++++++ cross.spec.in ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -16,8 +16,7 @@
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
-%define build_nof 0
-%define build_with_mudflap 0
+%define build_go 0
%define binutils_target %{cross_arch}
%if %{cross_arch} == "armv7l" || %{cross_arch} == "armv7hl"
@@ -78,14 +77,12 @@
%endif
-%if 0%{!?gcc_icecream:1}
%package -n cross-%cross_arch-gcc@base_ver@-icecream-backend
Summary: Icecream backend for the GNU C Compiler
Group: Development/Languages/C and C++
%description -n cross-%cross_arch-gcc@base_ver@-icecream-backend
This package contains the icecream environment for the GNU C Compiler
-%endif
%define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version}
@@ -95,9 +92,6 @@
# install and fixup host parts
make DESTDIR=$RPM_BUILD_ROOT install-host
-# binsuffix is not applied consistently for cross builds, get rid of
-# the remains
-rm -f $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
# with the present setup fixincludes are for the build includes which
# is wrong - get rid of them
rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/include-fixed
@@ -124,9 +118,9 @@
# named funnily, not even on ppc, so there we need the original target
install -s -D %{_prefix}/bin/%{canonical_target}-suse-linux%{?canonical_target_abi:%canonical_target_abi}-as \
$RPM_BUILD_ROOT/env/usr/bin/as
-install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++ \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/g++
-install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc \
+install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
@@ -161,29 +155,15 @@
rpm -q --changelog binutils > usr/share/icecream-envs/%{name}_%{_arch}.binutils
rm -r env
-%if 0%{?gcc_icecream:1}
-rm -rf $RPM_BUILD_ROOT/%{_prefix}/bin
-rm -rf $RPM_BUILD_ROOT/%{_libdir}
-%endif
-
-
-%if 0%{!?gcc_icecream:1}
%files
%defattr(-,root,root)
%{_prefix}/bin
%dir %{targetlibsubdir}
%dir %{_libdir}/gcc/%{gcc_target_arch}
%{targetlibsubdir}
-%else
-%files
-%defattr(-,root,root)
-/usr/share/icecream-envs
-%endif
-%if 0%{!?gcc_icecream:1}
%files -n cross-%cross_arch-gcc@base_ver@-icecream-backend
%defattr(-,root,root)
/usr/share/icecream-envs
-%endif
%changelog -n cross-%{pkgname}-gcc@base_ver@
++++++ gcc-4.9.0-r208745.tar.bz2 -> gcc-4.9.0-r209354.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/gcc49/gcc-4.9.0-r208745.tar.bz2 /work/SRC/openSUSE:Factory/.gcc49.new/gcc-4.9.0-r209354.tar.bz2 differ: char 11, line 1
++++++ gcc.spec.in ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -225,7 +225,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: http://gcc.gnu.org/
-Version: 4.9.0+r208745
+Version: 4.9.0+r209354
Release: 1
%define gcc_version %(echo %version | sed 's/+.*//')
%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
@@ -285,6 +285,7 @@
Patch23: libjava-no-multilib.diff
Patch24: tls-no-direct.diff
Patch30: gcc43-no-unwind-tables.diff
+Patch33: gcc49-pr60720.patch
# A set of patches from the RH srpm
Patch51: gcc41-ia64-stack-protector.patch
Patch55: gcc41-java-slow_pthread_self.patch
@@ -451,9 +452,6 @@
# Only one package may provide this - allows multiple gcc versions
# to co-exist without an overly large list of provides/obsoletes
Conflicts: %selfconflict libgcc_s%{libgcc_s}@variant@
-# Old libgcc packages provided a wrong shlib policy compatible name
-Provides: libgcc%{libgcc_s}@variant@ = %{version}-%{release}
-Conflicts: %selfconflict libgcc%{libgcc_s}@variant@
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
Libgcc is needed for dynamically linked C programs.
@@ -1105,6 +1103,7 @@
%patch23
%patch24
%patch30
+%patch33
%patch51
%patch55
%patch57
@@ -1285,8 +1284,8 @@
--enable-linker-build-id \
%endif
--enable-linux-futex \
-%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
+%if 0%{!?gcc_target_arch:1}
%ifarch ia64
--with-system-libunwind \
%else
@@ -1294,6 +1293,7 @@
%endif
%endif
%if 0%{?gcc_target_arch:1}
+ --program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
%if 0%{?sysroot:1}
@@ -1345,9 +1345,11 @@
%if "%{TARGET_ARCH}" == "powerpc"
--with-cpu=default32 \
%endif
- --with-cpu-32=power7 \
- --with-cpu-64=power7 \
- --with-tune=power7 \
+%if "%{TARGET_ARCH}" == "powerpc64le"
+ --with-cpu=power7 \
+%else
+ --with-cpu-64=power4 \
+%endif
--enable-secureplt \
--with-long-double-128 \
%if "%{TARGET_ARCH}" == "powerpc64le"
@@ -2034,6 +2036,7 @@
%ifarch %cilkrts_arch
%versmainlib libcilkrts.so
%versmainlib libcilkrts.a
+%versmainlib libcilkrts.spec
%endif
%ifarch %lsan_arch
%versmainlib liblsan.so
@@ -2084,6 +2087,7 @@
%ifarch %cilkrts_arch
%versbiarchlib libcilkrts.a
%versbiarchlib libcilkrts.so
+%versbiarchlib libcilkrts.spec
%endif
%if 0
%ifarch %tsan_arch
++++++ gcc49-pr60720.patch ++++++
2014-04-01 Richard Biener <rguenther(a)suse.de>
PR lto/60720
* lto-streamer-out.c (wrap_refs): New function.
(lto_output): Wrap symbol references in global initializes in
type-preserving MEM_REFs.
* gcc.dg/lto/pr60720_0.c: New testcase.
* gcc.dg/lto/pr60720_1.c: Likewise.
Index: gcc/lto-streamer-out.c
===================================================================
*** gcc/lto-streamer-out.c (revision 208955)
--- gcc/lto-streamer-out.c (working copy)
*************** copy_function (struct cgraph_node *node)
*** 2024,2029 ****
--- 2024,2052 ----
lto_end_section ();
}
+ /* Wrap symbol references in *TP inside a type-preserving MEM_REF. */
+
+ static tree
+ wrap_refs (tree *tp, int *ws, void *)
+ {
+ tree t = *tp;
+ if (handled_component_p (t)
+ && TREE_CODE (TREE_OPERAND (t, 0)) == VAR_DECL)
+ {
+ tree decl = TREE_OPERAND (t, 0);
+ tree ptrtype = build_pointer_type (TREE_TYPE (decl));
+ TREE_OPERAND (t, 0) = build2 (MEM_REF, TREE_TYPE (decl),
+ build1 (ADDR_EXPR, ptrtype, decl),
+ build_int_cst (ptrtype, 0));
+ TREE_THIS_VOLATILE (TREE_OPERAND (t, 0)) = TREE_THIS_VOLATILE (decl);
+ *ws = 0;
+ }
+ else if (TREE_CODE (t) == CONSTRUCTOR)
+ ;
+ else if (!EXPR_P (t))
+ *ws = 0;
+ return NULL_TREE;
+ }
/* Main entry point from the pass manager. */
*************** lto_output (void)
*** 2045,2068 ****
for (i = 0; i < n_nodes; i++)
{
symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
! cgraph_node *node = dyn_cast <cgraph_node> (snode);
! if (node
! && lto_symtab_encoder_encode_body_p (encoder, node)
! && !node->alias)
{
#ifdef ENABLE_CHECKING
! gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl)));
! bitmap_set_bit (output, DECL_UID (node->decl));
#endif
! decl_state = lto_new_out_decl_state ();
! lto_push_out_decl_state (decl_state);
! if (gimple_has_body_p (node->decl) || !flag_wpa)
! output_function (node);
! else
! copy_function (node);
! gcc_assert (lto_get_out_decl_state () == decl_state);
! lto_pop_out_decl_state ();
! lto_record_function_out_decl_state (node->decl, decl_state);
}
}
--- 2068,2100 ----
for (i = 0; i < n_nodes; i++)
{
symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
! if (cgraph_node *node = dyn_cast <cgraph_node> (snode))
{
+ if (lto_symtab_encoder_encode_body_p (encoder, node)
+ && !node->alias)
+ {
#ifdef ENABLE_CHECKING
! gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl)));
! bitmap_set_bit (output, DECL_UID (node->decl));
#endif
! decl_state = lto_new_out_decl_state ();
! lto_push_out_decl_state (decl_state);
! if (gimple_has_body_p (node->decl) || !flag_wpa)
! output_function (node);
! else
! copy_function (node);
! gcc_assert (lto_get_out_decl_state () == decl_state);
! lto_pop_out_decl_state ();
! lto_record_function_out_decl_state (node->decl, decl_state);
! }
! }
! else if (varpool_node *node = dyn_cast <varpool_node> (snode))
! {
! /* Wrap symbol references inside the ctor in a type
! preserving MEM_REF. */
! tree ctor = DECL_INITIAL (node->decl);
! if (ctor && !in_lto_p)
! walk_tree (&ctor, wrap_refs, NULL, NULL);
}
}
Index: gcc/testsuite/gcc.dg/lto/pr60720_0.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr60720_0.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr60720_0.c (working copy)
***************
*** 0 ****
--- 1,15 ----
+ /* { dg-lto-do run } */
+ /* { dg-extra-ld-options { -w } } */
+
+ /* ??? lto.exp does not allow to scan for
+ :1:12: warning: type of 'x' does not match original declaration
+ extern int x[];
+ ^
+ :1:5: note: previously declared here
+ int x;
+ ^ */
+
+ extern int x[];
+ int *foo[] = { &x[0] };
+
+ int main() { return *foo[0]; }
Index: gcc/testsuite/gcc.dg/lto/pr60720_1.c
===================================================================
*** gcc/testsuite/gcc.dg/lto/pr60720_1.c (revision 0)
--- gcc/testsuite/gcc.dg/lto/pr60720_1.c (working copy)
***************
*** 0 ****
--- 1 ----
+ int x;
++++++ tls-no-direct.diff ++++++
--- /var/tmp/diff_new_pack.LfAjTH/_old 2014-04-22 11:54:44.000000000 +0200
+++ /var/tmp/diff_new_pack.LfAjTH/_new 2014-04-22 11:54:44.000000000 +0200
@@ -1,17 +1,20 @@
-Index: gcc/config/i386/gnu-user-common.h
+For i?86 negative offsets to %fs segment accesses cause a hypervisor
+trap for Xen. Avoid this by making accesses indirect.
+
+??? Note that similar to the behavior on SLE11 this only affects
+the compiler built on %ix86, not that on x86_64, even with -m32.
+
+Index: gcc/config/i386/linux.h
===================================================================
---- gcc/config/i386/gnu-user-common.h.orig 2012-12-11 12:44:53.918094370 +0100
-+++ gcc/config/i386/gnu-user-common.h 2012-12-11 12:44:55.467094317 +0100
-@@ -26,8 +26,12 @@ along with GCC; see the file COPYING3.
- #define DEFAULT_PCC_STRUCT_RETURN 1
+--- gcc/config/i386/linux.h (revision 209175)
++++ gcc/config/i386/linux.h (working copy)
+@@ -21,3 +21,9 @@ along with GCC; see the file COPYING3.
- /* We arrange for the whole %fs segment to map the tls area. */
+ #define GNU_USER_LINK_EMULATION "elf_i386"
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
++
+/* This slows down Xen, so take a very small general performance hit
+ for not accessing the %fs segment with negative offsets by making
-+ GCC not emit direct accesses to %fs at all.
- #undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
- #define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT MASK_TLS_DIRECT_SEG_REFS
-+ */
-
- #define TARGET_OS_CPP_BUILTINS() \
- do \
++ GCC not emit direct accesses to %fs at all. */
++#undef TARGET_TLS_DIRECT_SEG_REFS_DEFAULT
++#define TARGET_TLS_DIRECT_SEG_REFS_DEFAULT 0
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
22 Apr '14
Hello community,
here is the log from the commit of package rubygem-delayed_job_active_record for openSUSE:Factory checked in at 2014-04-22 10:07:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-delayed_job_active_record (Old)
and /work/SRC/openSUSE:Factory/.rubygem-delayed_job_active_record.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-delayed_job_active_record"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-delayed_job_active_record/rubygem-delayed_job_active_record.changes 2013-08-04 17:22:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-delayed_job_active_record.new/rubygem-delayed_job_active_record.changes 2014-04-22 10:07:41.000000000 +0200
@@ -1,0 +2,6 @@
+Mon Apr 21 16:16:54 UTC 2014 - coolo(a)suse.com
+
+- updated to version 4.0.1
+ require delayed_job 4.0.1 for rails 4.1
+
+-------------------------------------------------------------------
Old:
----
delayed_job_active_record-4.0.0.gem
New:
----
delayed_job_active_record-4.0.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-delayed_job_active_record.spec ++++++
--- /var/tmp/diff_new_pack.jQZlML/_old 2014-04-22 10:07:42.000000000 +0200
+++ /var/tmp/diff_new_pack.jQZlML/_new 2014-04-22 10:07:42.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-delayed_job_active_record
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: rubygem-delayed_job_active_record
-Version: 4.0.0
+Version: 4.0.1
Release: 0
%define mod_name delayed_job_active_record
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 1
+BuildRequires: ruby-macros >= 3
Url: http://github.com/collectiveidea/delayed_job_active_record
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Summary: ActiveRecord backend for DelayedJob
@@ -60,23 +60,23 @@
%install
%gem_install -f
mkdir -p %{buildroot}%{_docdir}/%{name}
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/LICENSE.md %buildroot/%{_docdir}/%{name}/LICENSE.md
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md
+ln -s %{gem_base}/gems/%{mod_full_name}/LICENSE.md %buildroot/%{_docdir}/%{name}/LICENSE.md
+ln -s %{gem_base}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md
%files
%defattr(-,root,root,-)
%{_docdir}/%{name}
-%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
-%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
-%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec
+%{gem_base}/cache/%{mod_full_name}.gem
+%{gem_base}/gems/%{mod_full_name}/
+%exclude %{gem_base}/gems/%{mod_full_name}/spec
+%{gem_base}/specifications/%{mod_full_name}.gemspec
%files doc
%defattr(-,root,root,-)
-%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/
+%doc %{gem_base}/doc
%files testsuite
%defattr(-,root,root,-)
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
+%{gem_base}/gems/%{mod_full_name}/spec
%changelog
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package rubygem-delayed_job for openSUSE:Factory checked in at 2014-04-22 10:07:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-delayed_job (Old)
and /work/SRC/openSUSE:Factory/.rubygem-delayed_job.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-delayed_job"
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-delayed_job/rubygem-delayed_job.changes 2013-08-04 23:52:36.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-delayed_job.new/rubygem-delayed_job.changes 2014-04-22 10:07:34.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Apr 21 16:05:53 UTC 2014 - coolo(a)suse.com
+
+- updated to version 4.0.1
+ * Update gemspec for Rails 4.1
+ * Make logger calls more universal
+ * Check that records are persisted? instead of new_record?
+
+-------------------------------------------------------------------
Old:
----
delayed_job-4.0.0.gem
New:
----
delayed_job-4.0.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-delayed_job.spec ++++++
--- /var/tmp/diff_new_pack.lHJDqI/_old 2014-04-22 10:07:35.000000000 +0200
+++ /var/tmp/diff_new_pack.lHJDqI/_new 2014-04-22 10:07:35.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-delayed_job
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: rubygem-delayed_job
-Version: 4.0.0
+Version: 4.0.1
Release: 0
%define mod_name delayed_job
%define mod_full_name %{mod_name}-%{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: ruby-macros >= 1
+BuildRequires: ruby-macros >= 3
Url: http://github.com/collectiveidea/delayed_job
Source: http://rubygems.org/gems/%{mod_full_name}.gem
Summary: Database-backed asynchronous priority queue system -- Extracted from
@@ -62,24 +62,24 @@
%install
%gem_install -f
mkdir -p %{buildroot}%{_docdir}/%{name}
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/CHANGELOG.md %buildroot/%{_docdir}/%{name}/CHANGELOG.md
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/LICENSE.md %buildroot/%{_docdir}/%{name}/LICENSE.md
-ln -s %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md
+ln -s %{gem_base}/gems/%{mod_full_name}/CHANGELOG.md %buildroot/%{_docdir}/%{name}/CHANGELOG.md
+ln -s %{gem_base}/gems/%{mod_full_name}/LICENSE.md %buildroot/%{_docdir}/%{name}/LICENSE.md
+ln -s %{gem_base}/gems/%{mod_full_name}/README.md %buildroot/%{_docdir}/%{name}/README.md
%files
%defattr(-,root,root,-)
%{_docdir}/%{name}
-%{_libdir}/ruby/gems/%{rb_ver}/cache/%{mod_full_name}.gem
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/
-%exclude %{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
-%{_libdir}/ruby/gems/%{rb_ver}/specifications/%{mod_full_name}.gemspec
+%{gem_base}/cache/%{mod_full_name}.gem
+%{gem_base}/gems/%{mod_full_name}/
+%exclude %{gem_base}/gems/%{mod_full_name}/spec
+%{gem_base}/specifications/%{mod_full_name}.gemspec
%files doc
%defattr(-,root,root,-)
-%doc %{_libdir}/ruby/gems/%{rb_ver}/doc/%{mod_full_name}/
+%doc %{gem_base}/doc
%files testsuite
%defattr(-,root,root,-)
-%{_libdir}/ruby/gems/%{rb_ver}/gems/%{mod_full_name}/spec
+%{gem_base}/gems/%{mod_full_name}/spec
%changelog
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package qemu for openSUSE:Factory checked in at 2014-04-22 10:06:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qemu (Old)
and /work/SRC/openSUSE:Factory/.qemu.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qemu"
Changes:
--------
--- /work/SRC/openSUSE:Factory/qemu/qemu-linux-user.changes 2014-03-23 22:28:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/qemu-linux-user.changes 2014-04-22 10:06:17.000000000 +0200
@@ -1,0 +2,54 @@
+Fri Apr 18 17:55:03 UTC 2014 - afaerber(a)suse.de
+
+- Fix aarch64 emulation issues:
+ 0043-arm-translate.c-Fix-smlald-Instruct.patch
+ 0044-target-arm-A64-fix-unallocated-test.patch
+
+-------------------------------------------------------------------
+Thu Apr 17 15:46:26 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+
+-------------------------------------------------------------------
+Mon Apr 14 17:49:54 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0-rc3: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+
+-------------------------------------------------------------------
+Fri Apr 11 16:10:50 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0-rc2: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+
+-------------------------------------------------------------------
+Thu Apr 3 15:59:32 UTC 2014 - afaerber(a)suse.de
+
+- Updated to v2.0.0-rc1: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+* Drop 0012-linux-user-be-silent-about-capget-f.patch (implemented)
+* Update qemu-config-binfmt.sh for aarch64
+
+-------------------------------------------------------------------
+Tue Apr 1 14:52:02 UTC 2014 - afaerber(a)suse.de
+
+- Fix update_git.sh script to not duplicate .patch in filename
+
+-------------------------------------------------------------------
+Fri Mar 28 11:54:19 UTC 2014 - afaerber(a)suse.de
+
+- Improve update_git.sh script to use a user-agnostic git symlink
+
+-------------------------------------------------------------------
+Mon Mar 24 15:45:00 UTC 2014 - brogers(a)suse.com
+
+- Improve update_git.sh to not change files in OBS if the file
+ remains unchanged
+
+-------------------------------------------------------------------
+Mon Mar 24 09:41:42 UTC 2014 - afaerber(a)suse.de
+
+- Enable libvixl-based disassembler support for aarch64
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2014-03-23 22:28:55.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/qemu.changes 2014-04-22 10:06:17.000000000 +0200
@@ -1,0 +2,91 @@
+Fri Apr 18 17:55:03 UTC 2014 - afaerber(a)suse.de
+
+- Fix aarch64 emulation issues:
+ 0043-arm-translate.c-Fix-smlald-Instruct.patch
+ 0044-target-arm-A64-fix-unallocated-test.patch
+
+-------------------------------------------------------------------
+Thu Apr 17 16:46:52 UTC 2014 - afaerber(a)suse.de
+
+- Attempt to solve or debug occasional qtest fd assertions
+ 0039-qtest-Assure-that-init_socket-s-lis.patch
+ 0040-qtest-Add-error-reporting-to-socket.patch
+ 0041-qtest-Increase-socket-timeout.patch
+ 0042-qtest-Be-paranoid-about-accept-addr.patch
+
+-------------------------------------------------------------------
+Thu Apr 17 15:46:26 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+
+-------------------------------------------------------------------
+Mon Apr 14 17:49:54 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0-rc3: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+* Addresses CVE-2014-0150 (bnc#873235), CVE-2013-4544 (bnc#873613)
+
+-------------------------------------------------------------------
+Fri Apr 11 16:10:50 UTC 2014 - afaerber(a)suse.de
+
+- Update to v2.0.0-rc2: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+* Resolves Gtk mouse issues (bnc#849587)
+* Fixes endianness-test failures for prep machine on Big Endian host
+
+-------------------------------------------------------------------
+Fri Apr 4 00:17:38 UTC 2014 - afaerber(a)suse.de
+
+- Fix qemu-kvm script for s390x (bnc#869021) (bfrogers)
+- Fix ksm.service file permissions to not be executable w/o shebang
+- Re-enable Gtk build on 11.4 (fixes unpackaged qemu.mo files error)
+- Fix SLE11 SP3 build by making sub-package "noarch" conditional
+* Do not exclude qemu-ifup from qemu package when not installing
+- Speed up %check by not running qom-test twice for some targets
+ 0038-tests-Don-t-run-qom-test-twice.patch
+
+-------------------------------------------------------------------
+Thu Apr 3 15:59:32 UTC 2014 - afaerber(a)suse.de
+
+- Updated to v2.0.0-rc1: cf. http://wiki.qemu-project.org/ChangeLog/2.0
+* Update update_git.sh script accordingly
+* Resolves breakage of live migration (bnc#871302)
+* Addresses CVE-2014-0142, CVE-2014-0143, CVE-2014-0144,
+ CVE-2014-0145, CVE-2014-0146, CVE-2014-0147 (bnc#870439)
+- Drop 0037-roms-Build-vgabios.bin.patch (unneeded)
+
+-------------------------------------------------------------------
+Tue Apr 1 14:50:37 UTC 2014 - afaerber(a)suse.de
+
+- Enhance update_git.sh script
+* Fix duplicate .patch for short filenames
+* Read SeaBIOS version from QEMU tarball
+
+-------------------------------------------------------------------
+Mon Mar 31 14:51:30 UTC 2014 - afaerber(a)suse.de
+
+- Re-create qemu-2.0.0-rc0.tar.bz2 to include SeaBIOS .version
+
+-------------------------------------------------------------------
+Fri Mar 28 11:53:31 UTC 2014 - afaerber(a)suse.de
+
+- Improve update_git.sh script to use a user-agnostic git symlink
+
+-------------------------------------------------------------------
+Wed Mar 26 21:09:34 UTC 2014 - brogers(a)suse.com
+
+- Tidy up qemu.spec a bit: white space, line length, use macros
+ as appropriate
+- Improve update_git.sh to not change files in OBS if the file
+ remains unchanged
+
+-------------------------------------------------------------------
+Wed Mar 26 14:16:39 UTC 2014 - afaerber(a)suse.de
+
+- Fix library directory
+- Set default file attributes for qemu-ksm
+- Enable Smartcard emulation
+* Reorder package definitions to avoid %version troubles
+
+-------------------------------------------------------------------
Old:
----
0001-XXX-dont-dump-core-on-sigabort.patc.patch
0003-qemu-0.9.0.cvs-binfmt.patch.patch
0004-qemu-cvs-alsa_bitfield.patch.patch
0005-qemu-cvs-alsa_ioctl.patch.patch
0006-qemu-cvs-alsa_mmap.patch.patch
0007-qemu-cvs-gettimeofday.patch.patch
0008-qemu-cvs-ioctl_debug.patch.patch
0009-qemu-cvs-ioctl_nodirection.patch.patch
0012-linux-user-be-silent-about-capget-f.patch
0013-PPC-KVM-Disable-mmu-notifier-check..patch
0014-linux-user-fix-segfault-deadlock.pa.patch
0015-linux-user-binfmt-support-host-bina.patch
0016-linux-user-arm-no-tb_flush-on-reset.patch
0017-linux-user-Ignore-broken-loop-ioctl.patch
0018-linux-user-lock-tcg.patch.patch
0019-linux-user-Run-multi-threaded-code-.patch
0020-linux-user-lock-tb-flushing-too.pat.patch
0021-linux-user-Fake-proc-cpuinfo.patch.patch
0022-linux-user-implement-FS_IOC_GETFLAG.patch
0023-linux-user-implement-FS_IOC_SETFLAG.patch
0024-linux-user-XXX-disable-fiemap.patch.patch
0025-slirp-nooutgoing.patch.patch
0026-vnc-password-file-and-incoming-conn.patch
0027-linux-user-add-more-blk-ioctls.patc.patch
0028-linux-user-use-target_ulong.patch.patch
0029-block-Add-support-for-DictZip-enabl.patch
0030-block-Add-tar-container-format.patc.patch
0031-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
0032-Legacy-Patch-kvm-qemu-preXX-report-.patch
0033-console-add-question-mark-escape-op.patch
0034-Make-char-muxer-more-robust-wrt-sma.patch
0035-linux-user-lseek-explicitly-cast-no.patch
0036-virtfs-proxy-helper-Provide-__u64-f.patch
0037-roms-Build-vgabios.bin.patch.patch
0038-configure-Enable-PIE-for-ppc-and-pp.patch
0039-xen_disk-add-discard-support.patch.patch
qemu-2.0.0-rc0.tar.bz2
New:
----
0001-XXX-dont-dump-core-on-sigabort.patch
0003-qemu-0.9.0.cvs-binfmt.patch
0004-qemu-cvs-alsa_bitfield.patch
0005-qemu-cvs-alsa_ioctl.patch
0006-qemu-cvs-alsa_mmap.patch
0007-qemu-cvs-gettimeofday.patch
0008-qemu-cvs-ioctl_debug.patch
0009-qemu-cvs-ioctl_nodirection.patch
0012-PPC-KVM-Disable-mmu-notifier-check.patch
0013-linux-user-fix-segfault-deadlock.patch
0014-linux-user-binfmt-support-host-bina.patch
0015-linux-user-arm-no-tb_flush-on-reset.patch
0016-linux-user-Ignore-broken-loop-ioctl.patch
0017-linux-user-lock-tcg.patch
0018-linux-user-Run-multi-threaded-code-.patch
0019-linux-user-lock-tb-flushing-too.patch
0020-linux-user-Fake-proc-cpuinfo.patch
0021-linux-user-implement-FS_IOC_GETFLAG.patch
0022-linux-user-implement-FS_IOC_SETFLAG.patch
0023-linux-user-XXX-disable-fiemap.patch
0024-slirp-nooutgoing.patch
0025-vnc-password-file-and-incoming-conn.patch
0026-linux-user-add-more-blk-ioctls.patch
0027-linux-user-use-target_ulong.patch
0028-block-Add-support-for-DictZip-enabl.patch
0029-block-Add-tar-container-format.patch
0030-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
0031-Legacy-Patch-kvm-qemu-preXX-report-.patch
0032-console-add-question-mark-escape-op.patch
0033-Make-char-muxer-more-robust-wrt-sma.patch
0034-linux-user-lseek-explicitly-cast-no.patch
0035-virtfs-proxy-helper-Provide-__u64-f.patch
0036-configure-Enable-PIE-for-ppc-and-pp.patch
0037-xen_disk-add-discard-support.patch
0038-tests-Don-t-run-qom-test-twice.patch
0039-qtest-Assure-that-init_socket-s-lis.patch
0040-qtest-Add-error-reporting-to-socket.patch
0041-qtest-Increase-socket-timeout.patch
0042-qtest-Be-paranoid-about-accept-addr.patch
0043-arm-translate.c-Fix-smlald-Instruct.patch
0044-target-arm-A64-fix-unallocated-test.patch
qemu-2.0.0.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qemu-linux-user.spec ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:18.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:18.000000000 +0200
@@ -21,49 +21,54 @@
Summary: Universal CPU emulator
License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
-Version: 1.7.90
+Version: 2.0.0
Release: 0
-Source: qemu-2.0.0-rc0.tar.bz2
+Source: qemu-2.0.0.tar.bz2
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
-Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patc.patch
+Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
Patch0002: 0002-XXX-work-around-SA_RESTART-race-wit.patch
-Patch0003: 0003-qemu-0.9.0.cvs-binfmt.patch.patch
-Patch0004: 0004-qemu-cvs-alsa_bitfield.patch.patch
-Patch0005: 0005-qemu-cvs-alsa_ioctl.patch.patch
-Patch0006: 0006-qemu-cvs-alsa_mmap.patch.patch
-Patch0007: 0007-qemu-cvs-gettimeofday.patch.patch
-Patch0008: 0008-qemu-cvs-ioctl_debug.patch.patch
-Patch0009: 0009-qemu-cvs-ioctl_nodirection.patch.patch
+Patch0003: 0003-qemu-0.9.0.cvs-binfmt.patch
+Patch0004: 0004-qemu-cvs-alsa_bitfield.patch
+Patch0005: 0005-qemu-cvs-alsa_ioctl.patch
+Patch0006: 0006-qemu-cvs-alsa_mmap.patch
+Patch0007: 0007-qemu-cvs-gettimeofday.patch
+Patch0008: 0008-qemu-cvs-ioctl_debug.patch
+Patch0009: 0009-qemu-cvs-ioctl_nodirection.patch
Patch0010: 0010-block-vmdk-Support-creation-of-SCSI.patch
Patch0011: 0011-linux-user-add-binfmt-wrapper-for-a.patch
-Patch0012: 0012-linux-user-be-silent-about-capget-f.patch
-Patch0013: 0013-PPC-KVM-Disable-mmu-notifier-check..patch
-Patch0014: 0014-linux-user-fix-segfault-deadlock.pa.patch
-Patch0015: 0015-linux-user-binfmt-support-host-bina.patch
-Patch0016: 0016-linux-user-arm-no-tb_flush-on-reset.patch
-Patch0017: 0017-linux-user-Ignore-broken-loop-ioctl.patch
-Patch0018: 0018-linux-user-lock-tcg.patch.patch
-Patch0019: 0019-linux-user-Run-multi-threaded-code-.patch
-Patch0020: 0020-linux-user-lock-tb-flushing-too.pat.patch
-Patch0021: 0021-linux-user-Fake-proc-cpuinfo.patch.patch
-Patch0022: 0022-linux-user-implement-FS_IOC_GETFLAG.patch
-Patch0023: 0023-linux-user-implement-FS_IOC_SETFLAG.patch
-Patch0024: 0024-linux-user-XXX-disable-fiemap.patch.patch
-Patch0025: 0025-slirp-nooutgoing.patch.patch
-Patch0026: 0026-vnc-password-file-and-incoming-conn.patch
-Patch0027: 0027-linux-user-add-more-blk-ioctls.patc.patch
-Patch0028: 0028-linux-user-use-target_ulong.patch.patch
-Patch0029: 0029-block-Add-support-for-DictZip-enabl.patch
-Patch0030: 0030-block-Add-tar-container-format.patc.patch
-Patch0031: 0031-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
-Patch0032: 0032-Legacy-Patch-kvm-qemu-preXX-report-.patch
-Patch0033: 0033-console-add-question-mark-escape-op.patch
-Patch0034: 0034-Make-char-muxer-more-robust-wrt-sma.patch
-Patch0035: 0035-linux-user-lseek-explicitly-cast-no.patch
-Patch0036: 0036-virtfs-proxy-helper-Provide-__u64-f.patch
-Patch0037: 0037-roms-Build-vgabios.bin.patch.patch
-Patch0038: 0038-configure-Enable-PIE-for-ppc-and-pp.patch
-Patch0039: 0039-xen_disk-add-discard-support.patch.patch
+Patch0012: 0012-PPC-KVM-Disable-mmu-notifier-check.patch
+Patch0013: 0013-linux-user-fix-segfault-deadlock.patch
+Patch0014: 0014-linux-user-binfmt-support-host-bina.patch
+Patch0015: 0015-linux-user-arm-no-tb_flush-on-reset.patch
+Patch0016: 0016-linux-user-Ignore-broken-loop-ioctl.patch
+Patch0017: 0017-linux-user-lock-tcg.patch
+Patch0018: 0018-linux-user-Run-multi-threaded-code-.patch
+Patch0019: 0019-linux-user-lock-tb-flushing-too.patch
+Patch0020: 0020-linux-user-Fake-proc-cpuinfo.patch
+Patch0021: 0021-linux-user-implement-FS_IOC_GETFLAG.patch
+Patch0022: 0022-linux-user-implement-FS_IOC_SETFLAG.patch
+Patch0023: 0023-linux-user-XXX-disable-fiemap.patch
+Patch0024: 0024-slirp-nooutgoing.patch
+Patch0025: 0025-vnc-password-file-and-incoming-conn.patch
+Patch0026: 0026-linux-user-add-more-blk-ioctls.patch
+Patch0027: 0027-linux-user-use-target_ulong.patch
+Patch0028: 0028-block-Add-support-for-DictZip-enabl.patch
+Patch0029: 0029-block-Add-tar-container-format.patch
+Patch0030: 0030-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
+Patch0031: 0031-Legacy-Patch-kvm-qemu-preXX-report-.patch
+Patch0032: 0032-console-add-question-mark-escape-op.patch
+Patch0033: 0033-Make-char-muxer-more-robust-wrt-sma.patch
+Patch0034: 0034-linux-user-lseek-explicitly-cast-no.patch
+Patch0035: 0035-virtfs-proxy-helper-Provide-__u64-f.patch
+Patch0036: 0036-configure-Enable-PIE-for-ppc-and-pp.patch
+Patch0037: 0037-xen_disk-add-discard-support.patch
+Patch0038: 0038-tests-Don-t-run-qom-test-twice.patch
+Patch0039: 0039-qtest-Assure-that-init_socket-s-lis.patch
+Patch0040: 0040-qtest-Add-error-reporting-to-socket.patch
+Patch0041: 0041-qtest-Increase-socket-timeout.patch
+Patch0042: 0042-qtest-Be-paranoid-about-accept-addr.patch
+Patch0043: 0043-arm-translate.c-Fix-smlald-Instruct.patch
+Patch0044: 0044-target-arm-A64-fix-unallocated-test.patch
# Please do not add patches manually here, run update_git.sh.
# this is to make lint happy
Source300: rpmlintrc
@@ -71,6 +76,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
+BuildRequires: gcc-c++
%if 0%{?suse_version} >= 1140
BuildRequires: glib2-devel-static
%else
@@ -115,7 +121,7 @@
run cross-architecture builds.
%prep
-%setup -q -n qemu-2.0.0-rc0
+%setup -q -n qemu-2.0.0
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@@ -155,6 +161,11 @@
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
+%patch0040 -p1
+%patch0041 -p1
+%patch0042 -p1
+%patch0043 -p1
+%patch0044 -p1
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
++++++ qemu.spec ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:18.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:18.000000000 +0200
@@ -18,19 +18,24 @@
%ifarch %ix86 x86_64
# choice of building all from source or using provided binary x86 blobs
+%if 0%{?suse_version} >= 1140
%define build_x86_fw_from_source 1
%else
%define build_x86_fw_from_source 0
%endif
+%else
+%define build_x86_fw_from_source 0
+%endif
+%define noarch_supported 1110
Name: qemu
Url: http://www.qemu.org/
Summary: Universal CPU emulator
License: BSD-3-Clause and GPL-2.0 and GPL-2.0+ and LGPL-2.1+ and MIT
Group: System/Emulators/PC
-Version: 1.7.90
+Version: 2.0.0
Release: 0
-Source: %name-2.0.0-rc0.tar.bz2
+Source: %name-2.0.0.tar.bz2
Source1: 80-kvm.rules
Source2: qemu-ifup
Source3: kvm_stat
@@ -38,45 +43,50 @@
Source5: 60-kvm.rules
Source6: ksm.service
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
-Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patc.patch
+Patch0001: 0001-XXX-dont-dump-core-on-sigabort.patch
Patch0002: 0002-XXX-work-around-SA_RESTART-race-wit.patch
-Patch0003: 0003-qemu-0.9.0.cvs-binfmt.patch.patch
-Patch0004: 0004-qemu-cvs-alsa_bitfield.patch.patch
-Patch0005: 0005-qemu-cvs-alsa_ioctl.patch.patch
-Patch0006: 0006-qemu-cvs-alsa_mmap.patch.patch
-Patch0007: 0007-qemu-cvs-gettimeofday.patch.patch
-Patch0008: 0008-qemu-cvs-ioctl_debug.patch.patch
-Patch0009: 0009-qemu-cvs-ioctl_nodirection.patch.patch
+Patch0003: 0003-qemu-0.9.0.cvs-binfmt.patch
+Patch0004: 0004-qemu-cvs-alsa_bitfield.patch
+Patch0005: 0005-qemu-cvs-alsa_ioctl.patch
+Patch0006: 0006-qemu-cvs-alsa_mmap.patch
+Patch0007: 0007-qemu-cvs-gettimeofday.patch
+Patch0008: 0008-qemu-cvs-ioctl_debug.patch
+Patch0009: 0009-qemu-cvs-ioctl_nodirection.patch
Patch0010: 0010-block-vmdk-Support-creation-of-SCSI.patch
Patch0011: 0011-linux-user-add-binfmt-wrapper-for-a.patch
-Patch0012: 0012-linux-user-be-silent-about-capget-f.patch
-Patch0013: 0013-PPC-KVM-Disable-mmu-notifier-check..patch
-Patch0014: 0014-linux-user-fix-segfault-deadlock.pa.patch
-Patch0015: 0015-linux-user-binfmt-support-host-bina.patch
-Patch0016: 0016-linux-user-arm-no-tb_flush-on-reset.patch
-Patch0017: 0017-linux-user-Ignore-broken-loop-ioctl.patch
-Patch0018: 0018-linux-user-lock-tcg.patch.patch
-Patch0019: 0019-linux-user-Run-multi-threaded-code-.patch
-Patch0020: 0020-linux-user-lock-tb-flushing-too.pat.patch
-Patch0021: 0021-linux-user-Fake-proc-cpuinfo.patch.patch
-Patch0022: 0022-linux-user-implement-FS_IOC_GETFLAG.patch
-Patch0023: 0023-linux-user-implement-FS_IOC_SETFLAG.patch
-Patch0024: 0024-linux-user-XXX-disable-fiemap.patch.patch
-Patch0025: 0025-slirp-nooutgoing.patch.patch
-Patch0026: 0026-vnc-password-file-and-incoming-conn.patch
-Patch0027: 0027-linux-user-add-more-blk-ioctls.patc.patch
-Patch0028: 0028-linux-user-use-target_ulong.patch.patch
-Patch0029: 0029-block-Add-support-for-DictZip-enabl.patch
-Patch0030: 0030-block-Add-tar-container-format.patc.patch
-Patch0031: 0031-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
-Patch0032: 0032-Legacy-Patch-kvm-qemu-preXX-report-.patch
-Patch0033: 0033-console-add-question-mark-escape-op.patch
-Patch0034: 0034-Make-char-muxer-more-robust-wrt-sma.patch
-Patch0035: 0035-linux-user-lseek-explicitly-cast-no.patch
-Patch0036: 0036-virtfs-proxy-helper-Provide-__u64-f.patch
-Patch0037: 0037-roms-Build-vgabios.bin.patch.patch
-Patch0038: 0038-configure-Enable-PIE-for-ppc-and-pp.patch
-Patch0039: 0039-xen_disk-add-discard-support.patch.patch
+Patch0012: 0012-PPC-KVM-Disable-mmu-notifier-check.patch
+Patch0013: 0013-linux-user-fix-segfault-deadlock.patch
+Patch0014: 0014-linux-user-binfmt-support-host-bina.patch
+Patch0015: 0015-linux-user-arm-no-tb_flush-on-reset.patch
+Patch0016: 0016-linux-user-Ignore-broken-loop-ioctl.patch
+Patch0017: 0017-linux-user-lock-tcg.patch
+Patch0018: 0018-linux-user-Run-multi-threaded-code-.patch
+Patch0019: 0019-linux-user-lock-tb-flushing-too.patch
+Patch0020: 0020-linux-user-Fake-proc-cpuinfo.patch
+Patch0021: 0021-linux-user-implement-FS_IOC_GETFLAG.patch
+Patch0022: 0022-linux-user-implement-FS_IOC_SETFLAG.patch
+Patch0023: 0023-linux-user-XXX-disable-fiemap.patch
+Patch0024: 0024-slirp-nooutgoing.patch
+Patch0025: 0025-vnc-password-file-and-incoming-conn.patch
+Patch0026: 0026-linux-user-add-more-blk-ioctls.patch
+Patch0027: 0027-linux-user-use-target_ulong.patch
+Patch0028: 0028-block-Add-support-for-DictZip-enabl.patch
+Patch0029: 0029-block-Add-tar-container-format.patch
+Patch0030: 0030-Legacy-Patch-kvm-qemu-preXX-dictzip.patch
+Patch0031: 0031-Legacy-Patch-kvm-qemu-preXX-report-.patch
+Patch0032: 0032-console-add-question-mark-escape-op.patch
+Patch0033: 0033-Make-char-muxer-more-robust-wrt-sma.patch
+Patch0034: 0034-linux-user-lseek-explicitly-cast-no.patch
+Patch0035: 0035-virtfs-proxy-helper-Provide-__u64-f.patch
+Patch0036: 0036-configure-Enable-PIE-for-ppc-and-pp.patch
+Patch0037: 0037-xen_disk-add-discard-support.patch
+Patch0038: 0038-tests-Don-t-run-qom-test-twice.patch
+Patch0039: 0039-qtest-Assure-that-init_socket-s-lis.patch
+Patch0040: 0040-qtest-Add-error-reporting-to-socket.patch
+Patch0041: 0041-qtest-Increase-socket-timeout.patch
+Patch0042: 0042-qtest-Be-paranoid-about-accept-addr.patch
+Patch0043: 0043-arm-translate.c-Fix-smlald-Instruct.patch
+Patch0044: 0044-target-arm-A64-fix-unallocated-test.patch
# Please do not add patches manually here, run update_git.sh.
# roms/ipxe patches
@@ -129,13 +139,15 @@
BuildRequires: libpixman-1-0-devel
BuildRequires: libpng-devel
BuildRequires: libpulse-devel
+BuildRequires: libtool
%if 0%{?suse_version} > 1310
-BuildRequires: libusb
+BuildRequires: libusb-devel
%endif
BuildRequires: libvdeplug3-devel
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
+BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
BuildRequires: pwdutils
BuildRequires: python
@@ -193,12 +205,16 @@
Suggests: qemu-arm
%endif
Suggests: qemu-extra
+Suggests: qemu-lang
%if 0%{?suse_version} >= 1210
Recommends: qemu-ksm = %{version}
-Suggests: qemu-lang
%endif
-%define firmware_files {acpi-dsdt.aml bios.bin q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/kvmvapic.bin pxe-e1000.rom pxe-pcnet.rom pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
+%define built_firmware_files {acpi-dsdt.aml bios.bin bios-256k.bin \
+q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin \
+vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/linuxboot.bin \
+optionrom/multiboot.bin optionrom/kvmvapic.bin pxe-e1000.rom pxe-pcnet.rom \
+pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
%description
QEMU is an extremely well-performing CPU emulator that allows you to
@@ -305,7 +321,6 @@
derived from the legacy kvm package.
%endif
-%if 0%{?suse_version} >= 1210
%package lang
Summary: Universal CPU emulator -- Translations
Group: System/Emulators/PC
@@ -318,14 +333,74 @@
as PC and PowerMac systems.
This sub-package contains translations.
-%endif
+
+%package tools
+Summary: Universal CPU emulator -- Tools
+Group: System/Emulators/PC
+Provides: qemu:%_libexecdir/qemu-bridge-helper
+PreReq: permissions
+
+%description tools
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains various tools, including a bridge helper.
+
+%package -n libcacard0
+Summary: Universal CPU emulator -- Smartcard emulation
+Group: System/Emulators/PC
+
+%description -n libcacard0
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains the Smartcard library.
+
+%package -n libcacard-devel
+Summary: Universal CPU emulator -- Smartcard emulation
+Group: System/Emulators/PC
+Requires: glib2-devel
+Requires: libcacard0 = %version
+Requires: mozilla-nspr
+Requires: mozilla-nss
+
+%description -n libcacard-devel
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains development files for the Smartcard library.
+
+%package guest-agent
+Summary: Universal CPU emulator -- Guest agent
+Group: System/Emulators/PC
+Provides: qemu:%_bindir/qemu-ga
+
+%description guest-agent
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains the guest agent.
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
Version: 1.7.4
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description seabios
@@ -337,7 +412,9 @@
Group: System/Emulators/PC
Version: 1.7.4
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description vgabios
@@ -350,7 +427,9 @@
Group: System/Emulators/PC
Version: 8
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description sgabios
@@ -363,42 +442,15 @@
Group: System/Emulators/PC
Version: 1.0.0
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description ipxe
Preboot Execution Environment (PXE) ROM support for various emulated network
adapters available with QEMU.
-%package tools
-Summary: Universal CPU emulator -- Tools
-Group: System/Emulators/PC
-Provides: qemu:%_libexecdir/qemu-bridge-helper
-PreReq: permissions
-
-%description tools
-QEMU is an extremely well-performing CPU emulator that allows you to
-choose between simulating an entire system and running userspace
-binaries for different architectures under your native operating
-system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
-as PC and PowerMac systems.
-
-This sub-package contains various tools, including a bridge helper.
-
-%package guest-agent
-Summary: Universal CPU emulator -- Guest agent
-Group: System/Emulators/PC
-Provides: qemu:%_bindir/qemu-ga
-
-%description guest-agent
-QEMU is an extremely well-performing CPU emulator that allows you to
-choose between simulating an entire system and running userspace
-binaries for different architectures under your native operating
-system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
-as PC and PowerMac systems.
-
-This sub-package contains the guest agent.
-
%if 0%{?with_systemd}
%package ksm
Summary: Kernel Samepage Merging services
@@ -412,7 +464,7 @@
%endif
%prep
-%setup -q -n %name-2.0.0-rc0
+%setup -q #-n %name-2.0.0-rc3
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
@@ -452,6 +504,11 @@
%patch0037 -p1
%patch0038 -p1
%patch0039 -p1
+%patch0040 -p1
+%patch0041 -p1
+%patch0042 -p1
+%patch0043 -p1
+%patch0044 -p1
%patch1000 -p1
%patch1001 -p1
@@ -459,7 +516,7 @@
%if %{build_x86_fw_from_source}
# as a safeguard, delete the firmware files that we intend to build
-for i in %firmware_files
+for i in %built_firmware_files
do
rm -f pc-bios/$i
done
@@ -467,7 +524,9 @@
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libdir=%_libdir \
--libexecdir=%_libexecdir \
+ --localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-strip \
--enable-system --disable-linux-user \
@@ -481,16 +540,15 @@
--enable-cap-ng \
--enable-curl \
--enable-curses \
-%if 0%{?suse_version} >= 1210
--enable-gtk \
%if 0%{?suse_version} >= 1220
--with-gtkabi=3.0 \
%endif
-%endif
--enable-linux-aio \
--enable-modules \
--enable-sdl \
--with-sdlabi=1.2 \
+ --enable-smartcard-nss \
%if 0%{?suse_version} >= 1140
%ifarch %ix86 x86_64
--enable-spice \
@@ -522,10 +580,10 @@
# Firmware
%if %{build_x86_fw_from_source}
-make --no-print-directory -C roms bios
-make --no-print-directory -C roms seavgabios
-make --no-print-directory -C roms pxerom
-make --no-print-directory -C roms sgabios
+make -C roms bios
+make -C roms seavgabios
+make -C roms pxerom
+make -C roms sgabios
%endif
%check
@@ -535,17 +593,15 @@
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
install -D -m 644 %{SOURCE302} $RPM_BUILD_ROOT/%{_sysconfdir}/qemu/bridge.conf
-%if 0%{?suse_version} >= 1210
%find_lang %name
-%endif
%ifarch %ix86 x86_64 s390x
cat > %{buildroot}%{_bindir}/qemu-kvm << 'EOF'
#!/bin/sh
-%ifarch %s390x
-exec /usr/bin/qemu-system-s390x -machine accel=kvm "$@"
+%ifarch s390x
+exec %{_bindir}/qemu-system-s390x -machine accel=kvm "$@"
%else
-exec /usr/bin/qemu-system-x86_64 -machine accel=kvm "$@"
+exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@"
%endif
EOF
chmod 755 %{buildroot}%{_bindir}/qemu-kvm
@@ -560,7 +616,7 @@
install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat
install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz
%endif
-install -D -p -m 0744 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
+install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT
%clean
@@ -589,6 +645,10 @@
%verify_permissions %_libexecdir/qemu-bridge-helper
%endif
+%post -n libcacard0 -p /sbin/ldconfig
+
+%postun -n libcacard0 -p /sbin/ldconfig
+
%if 0%{?with_systemd}
%pre ksm
%service_add_pre ksm.service
@@ -605,8 +665,8 @@
%files
%defattr(-, root, root)
-%dir %_libexecdir/%name
-%_libexecdir/%name/block-curl.so
+%dir %_libdir/%name
+%_libdir/%name/block-curl.so
%doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html
%doc %_mandir/man1/qemu.1.gz
%_datadir/%name
@@ -649,7 +709,9 @@
%exclude %_datadir/%name/petalogix-s3adsp1800.dtb
%exclude %_datadir/%name/QEMU,cgthree.bin
%exclude %_datadir/%name/QEMU,tcx.bin
+%ifarch %ix86 x86_64 s390x
%exclude %_datadir/%name/qemu-ifup
+%endif
%dir %_sysconfdir/%name
%ifarch %ix86 x86_64
%if 0%{?suse_version} >= 1230
@@ -714,10 +776,8 @@
%_mandir/man1/qemu-kvm.1.gz
%endif
-%if 0%{?suse_version} >= 1210
%files lang -f %name.lang
%defattr(-, root, root)
-%endif
%files seabios
%defattr(-, root, root)
@@ -762,16 +822,31 @@
%_bindir/qemu-img
%_bindir/qemu-nbd
%_bindir/virtfs-proxy-helper
+%_bindir/vscclient
%verify(not mode) %_libexecdir/qemu-bridge-helper
%dir %_sysconfdir/%name
%config %_sysconfdir/%name/bridge.conf
+%files -n libcacard0
+%defattr(-, root, root)
+%_libdir/libcacard.so.0*
+
+%files -n libcacard-devel
+%defattr(-, root, root)
+%dir %_includedir/cacard
+%_includedir/cacard/*.h
+%_libdir/libcacard.la
+%_libdir/libcacard.a
+%_libdir/libcacard.so
+%_libdir/pkgconfig/libcacard.pc
+
%files guest-agent
%defattr(-, root, root)
%attr(755,root,kvm) %_bindir/qemu-ga
%if 0%{?with_systemd}
%files ksm
+%defattr(-, root, root)
%{_unitdir}/ksm.service
%endif
++++++ 0001-XXX-dont-dump-core-on-sigabort.patc.patch -> 0001-XXX-dont-dump-core-on-sigabort.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0001-XXX-dont-dump-core-on-sigabort.patc.patch 2014-03-23 22:28:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0001-XXX-dont-dump-core-on-sigabort.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From c405d94cadd2702967b7640c292dba4235be31bc Mon Sep 17 00:00:00 2001
+From afd1df16c2e7b2dd5d4478f2ba6e29a1296c8cfa Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Mon, 21 Nov 2011 23:50:36 +0100
Subject: [PATCH] XXX dont dump core on sigabort
@@ -8,10 +8,10 @@
1 file changed, 6 insertions(+)
diff --git a/linux-user/signal.c b/linux-user/signal.c
-index 24c91f3..847fa7c 100644
+index 7d6246f..1bcf16f 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
-@@ -399,6 +399,10 @@ static void QEMU_NORETURN force_sig(int target_sig)
+@@ -448,6 +448,10 @@ static void QEMU_NORETURN force_sig(int target_sig)
host_sig = target_to_host_signal(target_sig);
gdb_signalled(env, target_sig);
@@ -22,7 +22,7 @@
/* dump core if supported by target binary format */
if (core_dump_signal(target_sig) && (ts->bprm->core_dump != NULL)) {
stop_all_tasks();
-@@ -416,6 +420,8 @@ static void QEMU_NORETURN force_sig(int target_sig)
+@@ -465,6 +469,8 @@ static void QEMU_NORETURN force_sig(int target_sig)
target_sig, strsignal(host_sig), "core dumped" );
}
++++++ 0002-XXX-work-around-SA_RESTART-race-wit.patch ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:18.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:18.000000000 +0200
@@ -1,4 +1,4 @@
-From cd46303ab0b8bfe23f73bb14880d8e6c57e66080 Mon Sep 17 00:00:00 2001
+From e9ce5f593385ed16e456058d1f873e381c9d053d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Thu, 1 Dec 2011 19:00:01 +0100
Subject: [PATCH] XXX work around SA_RESTART race with boehm-gc (ARM only)
@@ -49,10 +49,10 @@
} else {
goto error;
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
-index c2f74f3..c6366c2 100644
+index 36d4a73..a2c4e35 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
-@@ -133,6 +133,8 @@ typedef struct TaskState {
+@@ -134,6 +134,8 @@ typedef struct TaskState {
struct sigqueue sigqueue_table[MAX_SIGQUEUE_SIZE]; /* siginfo queue */
struct sigqueue *first_free; /* first free siginfo queue entry */
int signal_pending; /* non zero if a signal may be pending */
@@ -61,7 +61,7 @@
} __attribute__((aligned(16))) TaskState;
extern char *exec_path;
-@@ -198,6 +200,7 @@ int get_osversion(void);
+@@ -199,6 +201,7 @@ int get_osversion(void);
void init_qemu_uname_release(void);
void fork_start(void);
void fork_end(int child);
@@ -70,7 +70,7 @@
/* Creates the initial guest address space in the host memory space using
* the given host start address hint and size. The guest_start parameter
diff --git a/linux-user/signal.c b/linux-user/signal.c
-index 847fa7c..fef10bc 100644
+index 1bcf16f..cfaf501 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -25,6 +25,7 @@
@@ -81,7 +81,7 @@
#include "qemu.h"
#include "qemu-common.h"
-@@ -509,6 +510,11 @@ int queue_signal(CPUArchState *env, int sig, target_siginfo_t *info)
+@@ -571,6 +572,11 @@ int queue_signal(CPUArchState *env, int sig, target_siginfo_t *info)
k->pending = 1;
/* signal that a new signal is pending */
ts->signal_pending = 1;
@@ -93,7 +93,7 @@
return 1; /* indicates that the signal was queued */
}
}
-@@ -644,8 +650,24 @@ int do_sigaction(int sig, const struct target_sigaction *act,
+@@ -706,8 +712,24 @@ int do_sigaction(int sig, const struct target_sigaction *act,
if (host_sig != SIGSEGV && host_sig != SIGBUS) {
sigfillset(&act1.sa_mask);
act1.sa_flags = SA_SIGINFO;
@@ -119,10 +119,10 @@
ignore state to avoid getting unexpected interrupted
syscalls */
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index ffc11de..c193397 100644
+index 9864813..1d791a3 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -5215,6 +5215,87 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
+@@ -5259,6 +5259,87 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
return get_errno(open(path(pathname), flags, mode));
}
@@ -210,7 +210,7 @@
/* do_syscall() should always have a single exit point at the end so
that actions, such as logging of syscall results, can be performed.
All errnos that do_syscall() returns must be -TARGET_<errcode>. */
-@@ -5228,6 +5309,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+@@ -5272,6 +5353,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
struct stat st;
struct statfs stfs;
void *p;
@@ -223,7 +223,7 @@
#ifdef DEBUG
gemu_log("syscall %d", num);
-@@ -8347,7 +8434,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+@@ -8457,7 +8544,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
cmd = target_to_host_fcntl_cmd(arg2);
if (cmd == -TARGET_EINVAL) {
ret = cmd;
@@ -232,7 +232,7 @@
}
switch(arg2) {
-@@ -9284,6 +9371,7 @@ fail:
+@@ -9395,6 +9482,7 @@ fail:
#endif
if(do_strace)
print_syscall_ret(num, ret);
++++++ 0003-qemu-0.9.0.cvs-binfmt.patch.patch -> 0003-qemu-0.9.0.cvs-binfmt.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0003-qemu-0.9.0.cvs-binfmt.patch.patch 2014-03-23 22:28:53.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0003-qemu-0.9.0.cvs-binfmt.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,7 +1,10 @@
-From 357a1297e68bd36fc75d1c7d0cdd0f7293bba4e0 Mon Sep 17 00:00:00 2001
+From b34c0c408d3f08110ccb980d4ca0ef58a1a03c86 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli(a)suse.de>
Date: Tue, 14 Apr 2009 16:18:44 +0200
Subject: [PATCH] qemu-0.9.0.cvs-binfmt
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
Fixes binfmt_misc setup script:
- x86_64 is i386-compatible
@@ -9,15 +12,17 @@
- path to QEMU
Signed-off-by: Ulrich Hecht <uli(a)suse.de>
+[AF: Update path for qemu-aarch64 for v2.0.0-rc1]
+Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
- scripts/qemu-binfmt-conf.sh | 37 ++++++++++++++++++++-----------------
- 1 file changed, 20 insertions(+), 17 deletions(-)
+ scripts/qemu-binfmt-conf.sh | 39 +++++++++++++++++++++------------------
+ 1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
-index 0da2618..dc652f0 100644
+index 289b1a3..75e0526 100644
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
-@@ -27,43 +27,46 @@ case "$cpu" in
+@@ -27,46 +27,49 @@ case "$cpu" in
armv[4-9]*)
cpu="arm"
;;
@@ -43,6 +48,10 @@
+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm:' > /proc/sys/fs/binfmt_misc/register
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb:' > /proc/sys/fs/binfmt_misc/register
fi
+ if [ $cpu != "aarch64" ] ; then
+- echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register
++ echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register
+ fi
if [ $cpu != "sparc" ] ; then
- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/local/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
++++++ 0004-qemu-cvs-alsa_bitfield.patch.patch -> 0004-qemu-cvs-alsa_bitfield.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0004-qemu-cvs-alsa_bitfield.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0004-qemu-cvs-alsa_bitfield.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From eae7841334a0a53ff4b4b485f13ca6f7c830ae02 Mon Sep 17 00:00:00 2001
+From 08da583bd034109d09bfa6fedaa19bd0bdbc6c3a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 14 Apr 2009 16:20:50 +0200
Subject: [PATCH] qemu-cvs-alsa_bitfield
++++++ 0005-qemu-cvs-alsa_ioctl.patch.patch -> 0005-qemu-cvs-alsa_ioctl.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0005-qemu-cvs-alsa_ioctl.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0005-qemu-cvs-alsa_ioctl.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From bcfb81675b318fa9a83d49be6e194894d2bb1131 Mon Sep 17 00:00:00 2001
+From 4820daf43dce7bbafc27ab1102a6eb52a17e4da9 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 14 Apr 2009 16:23:27 +0200
Subject: [PATCH] qemu-cvs-alsa_ioctl
@@ -2255,10 +2255,10 @@
+ unsigned char *code;
+};
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
-index 732c9e3..84094ab 100644
+index fdf9a47..a2ac23e 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
-@@ -2538,6 +2538,8 @@ struct target_ucred {
+@@ -2545,6 +2545,8 @@ struct target_ucred {
uint32_t gid;
};
++++++ 0006-qemu-cvs-alsa_mmap.patch.patch -> 0006-qemu-cvs-alsa_mmap.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0006-qemu-cvs-alsa_mmap.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0006-qemu-cvs-alsa_mmap.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 6767f4a5d5336071a032e7aeec1b07d4dc412225 Mon Sep 17 00:00:00 2001
+From b1f94337048b56d240420c0d0a37ad061084904c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 14 Apr 2009 16:24:15 +0200
Subject: [PATCH] qemu-cvs-alsa_mmap
++++++ 0007-qemu-cvs-gettimeofday.patch.patch -> 0007-qemu-cvs-gettimeofday.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0007-qemu-cvs-gettimeofday.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0007-qemu-cvs-gettimeofday.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 2ab8ba594caa75e869d684576cb76b7cf47d3a4e Mon Sep 17 00:00:00 2001
+From 2a9ed81b68696702c3dfab0e3635ca1a7afe1ea4 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli(a)suse.de>
Date: Tue, 14 Apr 2009 16:25:41 +0200
Subject: [PATCH] qemu-cvs-gettimeofday
@@ -9,10 +9,10 @@
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index c193397..98c12bb 100644
+index 1d791a3..206dd12 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -6359,6 +6359,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
+@@ -6403,6 +6403,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_gettimeofday:
{
struct timeval tv;
++++++ 0008-qemu-cvs-ioctl_debug.patch.patch -> 0008-qemu-cvs-ioctl_debug.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0008-qemu-cvs-ioctl_debug.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0008-qemu-cvs-ioctl_debug.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From ecb044a5ede319e8aea9b95e2a32f04bc9842602 Mon Sep 17 00:00:00 2001
+From 9671d1a0e8e53a44513131d105c0f543c181cc0f Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH] qemu-cvs-ioctl_debug
@@ -12,10 +12,10 @@
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 98c12bb..312b7d6 100644
+index 206dd12..3407fd7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -3646,7 +3646,12 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
+@@ -3654,7 +3654,12 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {
++++++ 0009-qemu-cvs-ioctl_nodirection.patch.patch -> 0009-qemu-cvs-ioctl_nodirection.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0009-qemu-cvs-ioctl_nodirection.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0009-qemu-cvs-ioctl_nodirection.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 021f44a22b1c6121805fe175d97da6d4d43abd45 Mon Sep 17 00:00:00 2001
+From a535f471a344608107dce681f66a75b38f9e8441 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 14 Apr 2009 16:27:36 +0200
Subject: [PATCH] qemu-cvs-ioctl_nodirection
@@ -15,10 +15,10 @@
1 file changed, 6 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 312b7d6..78a2fe7 100644
+index 3407fd7..7d7d700 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -3680,6 +3680,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
+@@ -3688,6 +3688,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
arg_type++;
target_size = thunk_type_size(arg_type, 0);
switch(ie->access) {
@@ -30,7 +30,7 @@
case IOC_R:
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
if (!is_error(ret)) {
-@@ -3698,6 +3703,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
+@@ -3706,6 +3711,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
unlock_user(argptr, arg, 0);
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
break;
++++++ 0010-block-vmdk-Support-creation-of-SCSI.patch ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:18.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:18.000000000 +0200
@@ -1,4 +1,4 @@
-From f22c4c2cc220f6b074ac6a4d6c6d8911b6148ed8 Mon Sep 17 00:00:00 2001
+From a96062c693f9fa9ce4d0dd23c9cfc8816b0eacce Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli(a)suse.de>
Date: Tue, 14 Apr 2009 16:37:42 +0200
Subject: [PATCH] block/vmdk: Support creation of SCSI VMDK images in qemu-img
@@ -20,10 +20,10 @@
4 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
-index fae50c9..7cb6098 100644
+index 990a754..40c5c84 100644
--- a/block.c
+++ b/block.c
-@@ -5237,7 +5237,7 @@ void bdrv_img_create(const char *filename, const char *fmt,
+@@ -5277,7 +5277,7 @@ void bdrv_img_create(const char *filename, const char *fmt,
Error **errp, bool quiet)
{
QEMUOptionParameter *param = NULL, *create_options = NULL;
@@ -32,7 +32,7 @@
BlockDriver *drv, *proto_drv;
BlockDriver *backing_drv = NULL;
Error *local_err = NULL;
-@@ -5352,6 +5352,10 @@ void bdrv_img_create(const char *filename, const char *fmt,
+@@ -5392,6 +5392,10 @@ void bdrv_img_create(const char *filename, const char *fmt,
if (!quiet) {
printf("Formatting '%s', fmt=%s ", filename, fmt);
print_option_parameters(param);
@@ -75,7 +75,7 @@
};
diff --git a/include/block/block_int.h b/include/block/block_int.h
-index 4fc5ea8..ae28f01 100644
+index cd5bc73..0d4208f 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -40,10 +40,12 @@
@@ -92,7 +92,7 @@
#define BLOCK_OPT_BACKING_FMT "backing_fmt"
#define BLOCK_OPT_CLUSTER_SIZE "cluster_size"
diff --git a/qemu-img.c b/qemu-img.c
-index 2e40cc1..fc4888d 100644
+index 8455994..a8545b7 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1154,7 +1154,7 @@ static int img_convert(int argc, char **argv)
++++++ 0011-linux-user-add-binfmt-wrapper-for-a.patch ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:18.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:18.000000000 +0200
@@ -1,4 +1,4 @@
-From ef95f78ca9897bcc1bfcad76698344c2845afdfb Mon Sep 17 00:00:00 2001
+From 99a52830916b325a52d7eac1abb979d525229fc4 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Fri, 30 Sep 2011 19:40:36 +0200
Subject: [PATCH] linux-user: add binfmt wrapper for argv[0] handling
@@ -25,13 +25,14 @@
CC: Reinhard Max <max(a)suse.de>
Signed-off-by: Alexander Graf <agraf(a)suse.de>
[AF: Rebased onto new Makefile infrastructure, twice]
+[AF: Updated for aarch64 for v2.0.0-rc1]
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
Makefile.target | 13 +++++++++++++
linux-user/Makefile.objs | 2 ++
linux-user/binfmt.c | 42 ++++++++++++++++++++++++++++++++++++++++++
- scripts/qemu-binfmt-conf.sh | 34 +++++++++++++++++-----------------
- 4 files changed, 74 insertions(+), 17 deletions(-)
+ scripts/qemu-binfmt-conf.sh | 36 ++++++++++++++++++------------------
+ 4 files changed, 75 insertions(+), 18 deletions(-)
create mode 100644 linux-user/binfmt.c
diff --git a/Makefile.target b/Makefile.target
@@ -139,10 +140,10 @@
+ return execve(new_argv[0], new_argv, envp);
+}
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
-index dc652f0..37d03f3 100644
+index 75e0526..557dd2c 100644
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
-@@ -34,39 +34,39 @@ esac
+@@ -34,42 +34,42 @@ esac
# register the interpreter for each cpu except for the native one
if [ $cpu != "i386" ] ; then
@@ -161,6 +162,10 @@
+ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-binfmt:P' > /proc/sys/fs/binfmt_misc/register
fi
+ if [ $cpu != "aarch64" ] ; then
+- echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64:' > /proc/sys/fs/binfmt_misc/register
++ echo ':aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64-binfmt:P' > /proc/sys/fs/binfmt_misc/register
+ fi
if [ $cpu != "sparc" ] ; then
- echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc:' > /proc/sys/fs/binfmt_misc/register
+ echo ':sparc:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x02:\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-sparc-binfmt:P' > /proc/sys/fs/binfmt_misc/register
++++++ 0013-PPC-KVM-Disable-mmu-notifier-check..patch -> 0012-PPC-KVM-Disable-mmu-notifier-check.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0013-PPC-KVM-Disable-mmu-notifier-check..patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0012-PPC-KVM-Disable-mmu-notifier-check.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 97b1499528c524628f0b0fe03917abb58e41f067 Mon Sep 17 00:00:00 2001
+From 9ceca2f2c25c99e930d31ab11c7ff46dd9d43da6 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Fri, 6 Jan 2012 01:05:55 +0100
Subject: [PATCH] PPC: KVM: Disable mmu notifier check
@@ -13,7 +13,7 @@
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
-index 6a0bc94..6c2af34 100644
+index 91513c6..36b5ef6 100644
--- a/exec.c
+++ b/exec.c
@@ -1039,10 +1039,12 @@ static void *file_ram_alloc(RAMBlock *block,
++++++ 0014-linux-user-fix-segfault-deadlock.pa.patch -> 0013-linux-user-fix-segfault-deadlock.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0014-linux-user-fix-segfault-deadlock.pa.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0013-linux-user-fix-segfault-deadlock.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 0e23bd461d077e553b7be5e8d192ca400f4ffbdf Mon Sep 17 00:00:00 2001
+From c8bac440eee7d3377d27c676dfa6034ea059451c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Fri, 13 Jan 2012 17:05:41 +0100
Subject: [PATCH] linux-user: fix segfault deadlock
++++++ 0015-linux-user-binfmt-support-host-bina.patch -> 0014-linux-user-binfmt-support-host-bina.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0015-linux-user-binfmt-support-host-bina.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0014-linux-user-binfmt-support-host-bina.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 88203441776c0269c998530c3322ba3827e66e57 Mon Sep 17 00:00:00 2001
+From ae7b4452a263d662035eb35c14fe84590bfff364 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Thu, 2 Feb 2012 18:02:33 +0100
Subject: [PATCH] linux-user: binfmt: support host binaries
++++++ 0016-linux-user-arm-no-tb_flush-on-reset.patch -> 0015-linux-user-arm-no-tb_flush-on-reset.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0016-linux-user-arm-no-tb_flush-on-reset.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0015-linux-user-arm-no-tb_flush-on-reset.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From a773a6d801482a3fb8a7a51f82dc22b470ab8a10 Mon Sep 17 00:00:00 2001
+From bc949bb060b7f52ee5da9ef34e06bb12ba202726 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 29 May 2012 15:30:01 +0200
Subject: [PATCH] linux-user: arm: no tb_flush on reset
++++++ 0017-linux-user-Ignore-broken-loop-ioctl.patch -> 0016-linux-user-Ignore-broken-loop-ioctl.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0017-linux-user-Ignore-broken-loop-ioctl.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0016-linux-user-Ignore-broken-loop-ioctl.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 1a62d47ce18d5798fcfc9d576ac4805015806299 Mon Sep 17 00:00:00 2001
+From 9414e435edf0bdf2341c8e69e81e6f42cd73aca4 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 12 Jun 2012 04:41:10 +0200
Subject: [PATCH] linux-user: Ignore broken loop ioctl
@@ -41,10 +41,10 @@
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index aa9fd3a..32bbd5d 100644
+index 7d7d700..4823aa0 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -3623,6 +3623,13 @@ static abi_long do_ioctl_rt(const IOCTLEntry *ie, uint8_t *buf_temp,
+@@ -3631,6 +3631,13 @@ static abi_long do_ioctl_rt(const IOCTLEntry *ie, uint8_t *buf_temp,
return ret;
}
@@ -59,7 +59,7 @@
#define IOCTL(cmd, access, ...) \
{ TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } },
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
-index 84094ab..668076f 100644
+index a2ac23e..dd6d041 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1044,6 +1044,7 @@ struct target_pollfd {
++++++ 0018-linux-user-lock-tcg.patch.patch -> 0017-linux-user-lock-tcg.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0018-linux-user-lock-tcg.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0017-linux-user-lock-tcg.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 24525af3bf864f4849101f4506c896d5703aadec Mon Sep 17 00:00:00 2001
+From c06014909fc303dffb38e62943d88c4ba9f8da31 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Thu, 5 Jul 2012 17:31:39 +0200
Subject: [PATCH] linux-user: lock tcg
++++++ 0019-linux-user-Run-multi-threaded-code-.patch -> 0018-linux-user-Run-multi-threaded-code-.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0019-linux-user-Run-multi-threaded-code-.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0018-linux-user-Run-multi-threaded-code-.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 6744a839307d7553ef959d564ae820eb8a400a48 Mon Sep 17 00:00:00 2001
+From ca45f1d446ca88675e85bf80f133d3d8d955dbf0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 10 Jul 2012 20:40:55 +0200
Subject: [PATCH] linux-user: Run multi-threaded code on a single core
@@ -19,10 +19,10 @@
1 file changed, 9 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 32bbd5d..15ac71c 100644
+index 4823aa0..ff5ed06 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -4326,6 +4326,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
+@@ -4334,6 +4334,15 @@ static int do_fork(CPUArchState *env, unsigned int flags, abi_ulong newsp,
if (nptl_flags & CLONE_SETTLS)
cpu_set_tls (new_env, newtls);
++++++ 0020-linux-user-lock-tb-flushing-too.pat.patch -> 0019-linux-user-lock-tb-flushing-too.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0020-linux-user-lock-tb-flushing-too.pat.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0019-linux-user-lock-tb-flushing-too.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From c4a6baf3d9eaa1d62daf4e3ab69f46f7fce9f294 Mon Sep 17 00:00:00 2001
+From cba80a9dc1f00c65320122f6a9afe95cbf12fbab Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 11 Jul 2012 16:47:42 +0200
Subject: [PATCH] linux-user: lock tb flushing too
@@ -14,7 +14,7 @@
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/translate-all.c b/translate-all.c
-index f243c10..7067db9 100644
+index 5759974..1abb87d 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -619,19 +619,23 @@ static TranslationBlock *tb_alloc(target_ulong pc)
++++++ 0021-linux-user-Fake-proc-cpuinfo.patch.patch -> 0020-linux-user-Fake-proc-cpuinfo.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0021-linux-user-Fake-proc-cpuinfo.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0020-linux-user-Fake-proc-cpuinfo.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 54ace443d26657c878600a9e028240cb65ecfc2d Mon Sep 17 00:00:00 2001
+From 761b115c27a0f900f519422e4a79573da3632f4a Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Mon, 23 Jul 2012 10:24:14 +0200
Subject: [PATCH] linux-user: Fake /proc/cpuinfo
@@ -22,10 +22,10 @@
1 file changed, 20 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 15ac71c..f8cbacc 100644
+index ff5ed06..8a78348 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -5092,6 +5092,25 @@ static int open_self_stat(void *cpu_env, int fd)
+@@ -5136,6 +5136,25 @@ static int open_self_stat(void *cpu_env, int fd)
return 0;
}
@@ -51,7 +51,7 @@
static int open_self_auxv(void *cpu_env, int fd)
{
CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env);
-@@ -5205,6 +5224,7 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
+@@ -5249,6 +5268,7 @@ static int do_open(void *cpu_env, const char *pathname, int flags, mode_t mode)
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
{ "/proc/net/route", open_net_route, is_proc },
#endif
++++++ 0022-linux-user-implement-FS_IOC_GETFLAG.patch -> 0021-linux-user-implement-FS_IOC_GETFLAG.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0022-linux-user-implement-FS_IOC_GETFLAG.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0021-linux-user-implement-FS_IOC_GETFLAG.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 87cf8193d86c579ac8a0546f3645e6e2162f2d84 Mon Sep 17 00:00:00 2001
+From 36fc0fea8b44e3993088c6b9cab42db36fe1da76 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Mon, 20 Aug 2012 00:02:52 +0200
Subject: [PATCH] linux-user: implement FS_IOC_GETFLAGS ioctl
@@ -28,10 +28,10 @@
IOCTL(SIOCATMARK, 0, TYPE_NULL)
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
-index 668076f..6d7a7cf 100644
+index dd6d041..2456d5b 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
-@@ -2453,6 +2453,8 @@ struct target_eabi_flock64 {
+@@ -2460,6 +2460,8 @@ struct target_f_owner_ex {
#define TARGET_MTIOCGET TARGET_IOR('m', 2, struct mtget)
#define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos)
++++++ 0023-linux-user-implement-FS_IOC_SETFLAG.patch -> 0022-linux-user-implement-FS_IOC_SETFLAG.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0023-linux-user-implement-FS_IOC_SETFLAG.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0022-linux-user-implement-FS_IOC_SETFLAG.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 3f9f234c01de236ec8f4ae2879142e7bc7f236fa Mon Sep 17 00:00:00 2001
+From 8c00316b2996d0c2171032e58d7e21fd8af9bee1 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Mon, 20 Aug 2012 00:07:13 +0200
Subject: [PATCH] linux-user: implement FS_IOC_SETFLAGS ioctl
@@ -28,10 +28,10 @@
IOCTL(SIOCATMARK, 0, TYPE_NULL)
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
-index 6d7a7cf..15827bf 100644
+index 2456d5b..03863a6 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
-@@ -2454,6 +2454,7 @@ struct target_eabi_flock64 {
+@@ -2461,6 +2461,7 @@ struct target_f_owner_ex {
#define TARGET_MTIOCPOS TARGET_IOR('m', 3, struct mtpos)
#define TARGET_FS_IOC_GETFLAGS TARGET_IORU('f', 1)
++++++ 0024-linux-user-XXX-disable-fiemap.patch.patch -> 0023-linux-user-XXX-disable-fiemap.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0024-linux-user-XXX-disable-fiemap.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0023-linux-user-XXX-disable-fiemap.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 890d2d99454300c53ca6776d097362f186777043 Mon Sep 17 00:00:00 2001
+From fac2c74e7593b04a4fc45e0d40c06036f60ae75d Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 21 Aug 2012 14:20:40 +0200
Subject: [PATCH] linux-user: XXX disable fiemap
@@ -9,10 +9,10 @@
1 file changed, 5 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index f8cbacc..1f80002 100644
+index 8a78348..28a3d74 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -3180,6 +3180,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp,
+@@ -3188,6 +3188,11 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp,
uint32_t outbufsz;
int free_fm = 0;
++++++ 0025-slirp-nooutgoing.patch.patch -> 0024-slirp-nooutgoing.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0025-slirp-nooutgoing.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0024-slirp-nooutgoing.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 80c43c4b1cb9a0f1e25bdbf993a882a38af85a1d Mon Sep 17 00:00:00 2001
+From 871d3d13b54c6ba223b09953c50b762d0404cbec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Wed, 29 Aug 2012 18:42:56 +0200
Subject: [PATCH] slirp: -nooutgoing
@@ -12,10 +12,10 @@
4 files changed, 40 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
-index 068da2d..b40da6c 100644
+index 2d33815..62a1cfc 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
-@@ -2590,6 +2590,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
+@@ -2603,6 +2603,16 @@ Store the QEMU process PID in @var{file}. It is useful if you launch QEMU
from a script.
ETEXI
@@ -97,10 +97,10 @@
socket_set_fast_reuse(s);
opt = 1;
diff --git a/vl.c b/vl.c
-index 842e897..192aa7b 100644
+index 9975e5a..b18c815 100644
--- a/vl.c
+++ b/vl.c
-@@ -159,6 +159,7 @@ const char *vnc_display;
+@@ -162,6 +162,7 @@ const char *vnc_display;
int acpi_enabled = 1;
int no_hpet = 0;
int fd_bootchk = 1;
@@ -108,7 +108,7 @@
static int no_reboot;
int no_shutdown = 0;
int cursor_hide = 1;
-@@ -3328,6 +3329,14 @@ int main(int argc, char **argv, char **envp)
+@@ -3351,6 +3352,14 @@ int main(int argc, char **argv, char **envp)
case QEMU_OPTION_singlestep:
singlestep = 1;
break;
++++++ 0026-vnc-password-file-and-incoming-conn.patch -> 0025-vnc-password-file-and-incoming-conn.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0026-vnc-password-file-and-incoming-conn.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0025-vnc-password-file-and-incoming-conn.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 0587986e55f3bf9263fa62bd21425fd30405f2dc Mon Sep 17 00:00:00 2001
+From 955ef0968a268bcb6ef68b8788952546aed3a1dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Wed, 29 Aug 2012 20:06:01 +0200
Subject: [PATCH] vnc: password-file= and incoming-connections=
@@ -9,7 +9,7 @@
1 file changed, 71 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
-index 9c84b3e..d596d25 100644
+index 5925774..8445dd6 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -45,6 +45,7 @@ static const struct timeval VNC_REFRESH_LOSSY = { 2, 0 };
@@ -20,7 +20,7 @@
static int vnc_cursor_define(VncState *vs);
static void vnc_release_modifiers(VncState *vs);
-@@ -1027,6 +1028,7 @@ static void vnc_disconnect_start(VncState *vs)
+@@ -1031,6 +1032,7 @@ static void vnc_disconnect_start(VncState *vs)
void vnc_disconnect_finish(VncState *vs)
{
int i;
@@ -28,7 +28,7 @@
vnc_jobs_join(vs); /* Wait encoding jobs */
-@@ -1075,6 +1077,13 @@ void vnc_disconnect_finish(VncState *vs)
+@@ -1079,6 +1081,13 @@ void vnc_disconnect_finish(VncState *vs)
}
g_free(vs->lossy_rect);
g_free(vs);
@@ -42,7 +42,7 @@
}
int vnc_client_io_error(VncState *vs, int ret, int last_errno)
-@@ -3037,6 +3046,39 @@ char *vnc_display_local_addr(DisplayState *ds)
+@@ -3041,6 +3050,39 @@ char *vnc_display_local_addr(DisplayState *ds)
return vnc_socket_local_addr("%s:%s", vs->lsock);
}
@@ -82,7 +82,7 @@
void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
{
VncDisplay *vs = vnc_display;
-@@ -3070,6 +3112,9 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
+@@ -3074,6 +3116,9 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
while ((options = strchr(options, ','))) {
options++;
if (strncmp(options, "password", 8) == 0) {
@@ -92,7 +92,7 @@
if (fips_get_state()) {
error_setg(errp,
"VNC password auth disabled due to FIPS mode, "
-@@ -3078,6 +3123,32 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
+@@ -3082,6 +3127,32 @@ void vnc_display_open(DisplayState *ds, const char *display, Error **errp)
goto fail;
}
password = 1; /* Require password auth */
++++++ 0027-linux-user-add-more-blk-ioctls.patc.patch -> 0026-linux-user-add-more-blk-ioctls.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0027-linux-user-add-more-blk-ioctls.patc.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0026-linux-user-add-more-blk-ioctls.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 811f9aaa6560561860d90fea353f5832a50e5467 Mon Sep 17 00:00:00 2001
+From 6b62214c4bd34a4480814ac47449fab7c34305ed Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 10 Oct 2012 10:21:20 +0200
Subject: [PATCH] linux-user: add more blk ioctls
@@ -42,7 +42,7 @@
IOCTL(BLKRASET, 0, TYPE_INT)
IOCTL(BLKRAGET, IOC_R, MK_PTR(TYPE_LONG))
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
-index 15827bf..40c8900 100644
+index 03863a6..2271d5f 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -913,6 +913,12 @@ struct target_pollfd {
++++++ 0028-linux-user-use-target_ulong.patch.patch -> 0027-linux-user-use-target_ulong.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0028-linux-user-use-target_ulong.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0027-linux-user-use-target_ulong.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 076210cc06b65ebebef8d181ec74106eb6c5d198 Mon Sep 17 00:00:00 2001
+From 9f8f18dc792d6c9e3fb661cb8543d0c09b342ac4 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Tue, 9 Oct 2012 09:06:49 +0200
Subject: [PATCH] linux-user: use target_ulong
@@ -17,10 +17,10 @@
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
-index c6366c2..151d09d 100644
+index a2c4e35..6fd5e0c 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
-@@ -188,10 +188,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
+@@ -189,10 +189,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
void target_set_brk(abi_ulong new_brk);
abi_long do_brk(abi_ulong new_brk);
void syscall_init(void);
@@ -36,10 +36,10 @@
extern THREAD CPUState *thread_cpu;
void cpu_loop(CPUArchState *env);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index 1f80002..aacc224 100644
+index 28a3d74..a12a722 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -5351,10 +5351,10 @@ int syscall_restartable(int syscall_nr)
+@@ -5395,10 +5395,10 @@ int syscall_restartable(int syscall_nr)
/* do_syscall() should always have a single exit point at the end so
that actions, such as logging of syscall results, can be performed.
All errnos that do_syscall() returns must be -TARGET_<errcode>. */
++++++ 0029-block-Add-support-for-DictZip-enabl.patch -> 0028-block-Add-support-for-DictZip-enabl.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0029-block-Add-support-for-DictZip-enabl.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0028-block-Add-support-for-DictZip-enabl.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 122051dc2fc438473aa17cd7847cb597e1d8a804 Mon Sep 17 00:00:00 2001
+From 8b201b80c7957d04876330c37857b1ac4d8df21e Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 5 Aug 2009 09:49:37 +0200
Subject: [PATCH] block: Add support for DictZip enabled gzip files
++++++ 0030-block-Add-tar-container-format.patc.patch -> 0029-block-Add-tar-container-format.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0030-block-Add-tar-container-format.patc.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0029-block-Add-tar-container-format.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 96fd8c590b6f1e38e2d28a4b37792162de0f73ca Mon Sep 17 00:00:00 2001
+From 9faf6837f5e436c6d2003e64cb4b44b90d234c72 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 5 Aug 2009 17:28:38 +0200
Subject: [PATCH] block: Add tar container format
++++++ 0031-Legacy-Patch-kvm-qemu-preXX-dictzip.patch -> 0030-Legacy-Patch-kvm-qemu-preXX-dictzip.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0031-Legacy-Patch-kvm-qemu-preXX-dictzip.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0030-Legacy-Patch-kvm-qemu-preXX-dictzip.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 4056851c208c99dd3f00845871599539e928e47f Mon Sep 17 00:00:00 2001
+From e26cff5986190a24dcc53d658da1fc8e7772338c Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 12 Dec 2012 19:11:30 +0100
Subject: [PATCH] Legacy Patch kvm-qemu-preXX-dictzip3.patch
++++++ 0032-Legacy-Patch-kvm-qemu-preXX-report-.patch -> 0031-Legacy-Patch-kvm-qemu-preXX-report-.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0032-Legacy-Patch-kvm-qemu-preXX-report-.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0031-Legacy-Patch-kvm-qemu-preXX-report-.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From aedb4fdda43d3b5c9780dfc1e8cc84490742ab82 Mon Sep 17 00:00:00 2001
+From e828d54e5b1ef01c620e1c761340cd73af785b6b Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Wed, 12 Dec 2012 19:11:31 +0100
Subject: [PATCH] Legacy Patch kvm-qemu-preXX-report-default-mac-used.patch
++++++ 0033-console-add-question-mark-escape-op.patch -> 0032-console-add-question-mark-escape-op.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0033-console-add-question-mark-escape-op.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0032-console-add-question-mark-escape-op.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 62e5e21a8022c87d48e2419c47b7b4dbf897fe81 Mon Sep 17 00:00:00 2001
+From 1f6cee23194037e7c2601e7a728b7fa824f4d66f Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Mon, 6 Jun 2011 06:53:52 +0200
Subject: [PATCH] console: add question-mark escape operator
@@ -16,7 +16,7 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/console.c b/ui/console.c
-index 4df251d..9d6b3b3 100644
+index e057755..24413e8 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -866,7 +866,7 @@ static void console_putchar(QemuConsole *s, int ch)
++++++ 0034-Make-char-muxer-more-robust-wrt-sma.patch -> 0033-Make-char-muxer-more-robust-wrt-sma.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0034-Make-char-muxer-more-robust-wrt-sma.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0033-Make-char-muxer-more-robust-wrt-sma.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From a620d8b81230c54245b6b0255b7ddff886272c5b Mon Sep 17 00:00:00 2001
+From e30f0e39abb8e5ad453333ac3dd0f6d7b270e045 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Thu, 1 Apr 2010 17:36:23 +0200
Subject: [PATCH] Make char muxer more robust wrt small FIFOs
++++++ 0035-linux-user-lseek-explicitly-cast-no.patch -> 0034-linux-user-lseek-explicitly-cast-no.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0035-linux-user-lseek-explicitly-cast-no.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0034-linux-user-lseek-explicitly-cast-no.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 1f62de84675c5c3cd14a59a8070c2bb47d494cc0 Mon Sep 17 00:00:00 2001
+From f222ce0d5af1eb8258e84d6fcd8ab89a85131a21 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf(a)suse.de>
Date: Thu, 13 Dec 2012 14:29:22 +0100
Subject: [PATCH] linux-user: lseek: explicitly cast non-set offsets to signed
@@ -16,10 +16,10 @@
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index aacc224..67f8c25 100644
+index a12a722..d1f8b3d 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -5665,9 +5665,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
+@@ -5709,9 +5709,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_ulong arg1,
case TARGET_NR_oldstat:
goto unimplemented;
#endif
++++++ 0036-virtfs-proxy-helper-Provide-__u64-f.patch -> 0035-virtfs-proxy-helper-Provide-__u64-f.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0036-virtfs-proxy-helper-Provide-__u64-f.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0035-virtfs-proxy-helper-Provide-__u64-f.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 862047d71a3d245a5709a75cc3c109b94f6019ac Mon Sep 17 00:00:00 2001
+From 52b3782f6ec265abbd8704d4999940e2161819d5 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers(a)suse.com>
Date: Thu, 16 May 2013 12:39:10 +0200
Subject: [PATCH] virtfs-proxy-helper: Provide __u64 for broken
++++++ 0038-configure-Enable-PIE-for-ppc-and-pp.patch -> 0036-configure-Enable-PIE-for-ppc-and-pp.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0038-configure-Enable-PIE-for-ppc-and-pp.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0036-configure-Enable-PIE-for-ppc-and-pp.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 53969fce3b20e0bb592675503b8bade77c1cea3f Mon Sep 17 00:00:00 2001
+From c5ce0620bff591f2c344771e75447d602212c6f0 Mon Sep 17 00:00:00 2001
From: Dinar Valeev <k0da(a)opensuse.org>
Date: Wed, 2 Oct 2013 17:56:03 +0200
Subject: [PATCH] configure: Enable PIE for ppc and ppc64 hosts
@@ -14,10 +14,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
-index 8c2838e..530a10d 100755
+index 69b9f56..21523908 100755
--- a/configure
+++ b/configure
-@@ -1467,7 +1467,7 @@ fi
+@@ -1487,7 +1487,7 @@ fi
if test "$pie" = ""; then
case "$cpu-$targetos" in
++++++ 0039-xen_disk-add-discard-support.patch.patch -> 0037-xen_disk-add-discard-support.patch ++++++
--- /work/SRC/openSUSE:Factory/qemu/0039-xen_disk-add-discard-support.patch.patch 2014-03-23 22:28:54.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.qemu.new/0037-xen_disk-add-discard-support.patch 2014-04-22 10:06:16.000000000 +0200
@@ -1,4 +1,4 @@
-From 3ffc91748021ceebd6ea0de8cbf29b0117e8bcb3 Mon Sep 17 00:00:00 2001
+From 1798372872568aa5d3fd50c8d01ba658082a8711 Mon Sep 17 00:00:00 2001
From: Olaf Hering <olaf(a)aepfle.de>
Date: Thu, 30 Jan 2014 16:02:18 +0100
Subject: [PATCH] xen_disk: add discard support
++++++ 0038-tests-Don-t-run-qom-test-twice.patch ++++++
>From 857545e61d741cc4f439f98c5e93210b7fa09577 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Mon, 7 Apr 2014 16:03:08 +0200
Subject: [PATCH] tests: Don't run qom-test twice
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Commit 3687d5325 accidentally resulted in running qom-test twice
for x86_64, once directly via the wildcard, and once because x86_64
includes all the i386 qtests (which includes qom-test).
Filter out x86_64 as well as microblazeel and xtensaeb to fix this.
Cc: Peter Maydell <peter.maydell(a)linaro.org>
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
tests/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index 88f7105..8f2b018 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -162,7 +162,9 @@ check-qtest-microblazeel-y = $(check-qtest-microblaze-y)
check-qtest-xtensaeb-y = $(check-qtest-xtensa-y)
# qom-test works for all sysemu architectures:
-$(foreach target,$(SYSEMU_TARGET_LIST), \
+QTEST_SYSEMU_TARGET_LIST=$(filter-out x86_64 microblazeel xtensaeb, \
+ $(SYSEMU_TARGET_LIST))
+$(foreach target,$(QTEST_SYSEMU_TARGET_LIST), \
$(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))
check-qapi-schema-y := $(addprefix tests/qapi-schema/, \
++++++ 0039-qtest-Assure-that-init_socket-s-lis.patch ++++++
>From c58810a9fe080ce5358ab670b6d4abe1202e63a2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Thu, 17 Apr 2014 18:19:14 +0200
Subject: [PATCH] qtest: Assure that init_socket()'s listen() does not fail
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
tests/libqtest.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 8155695..232f781 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -72,7 +72,8 @@ static int init_socket(const char *socket_path)
ret = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
} while (ret == -1 && errno == EINTR);
g_assert_no_errno(ret);
- listen(sock, 1);
+ ret = listen(sock, 1);
+ g_assert_no_errno(ret);
return sock;
}
++++++ 0040-qtest-Add-error-reporting-to-socket.patch ++++++
>From 19fed6c601938b60dafb004f7194ff4e86def6f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Thu, 17 Apr 2014 18:38:25 +0200
Subject: [PATCH] qtest: Add error reporting to socket_accept()
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
tests/libqtest.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 232f781..4b90d91 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -93,6 +93,9 @@ static int socket_accept(int sock)
do {
ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
} while (ret == -1 && errno == EINTR);
+ if (ret == -1) {
+ fprintf(stderr, "%s failed: %s\n", __func__, strerror(errno));
+ }
close(sock);
return ret;
++++++ 0041-qtest-Increase-socket-timeout.patch ++++++
>From 1126af0e6664e58a5e6e2280f6d61bb829099444 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Thu, 17 Apr 2014 18:39:10 +0200
Subject: [PATCH] qtest: Increase socket timeout
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change from 5 to 15 seconds.
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
tests/libqtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 4b90d91..18efcf2 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -34,7 +34,7 @@
#include "qapi/qmp/json-parser.h"
#define MAX_IRQ 256
-#define SOCKET_TIMEOUT 5
+#define SOCKET_TIMEOUT 15
QTestState *global_qtest;
++++++ 0042-qtest-Be-paranoid-about-accept-addr.patch ++++++
>From 9938d82cc9cc5ae82283bea7a24ff45d08690e27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber(a)suse.de>
Date: Thu, 17 Apr 2014 19:21:12 +0200
Subject: [PATCH] qtest: Be paranoid about accept() addrlen argument
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If EINTR occurs, re-initialize our argument.
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
tests/libqtest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 18efcf2..1eb9db6 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -89,8 +89,8 @@ static int socket_accept(int sock)
setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (void *)&timeout,
sizeof(timeout));
- addrlen = sizeof(addr);
do {
+ addrlen = sizeof(addr);
ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
} while (ret == -1 && errno == EINTR);
if (ret == -1) {
++++++ 0043-arm-translate.c-Fix-smlald-Instruct.patch ++++++
>From 0fb8a7de8e8013362922d802db7eda5f9bf37766 Mon Sep 17 00:00:00 2001
From: Peter Crosthwaite <peter.crosthwaite(a)xilinx.com>
Date: Wed, 16 Apr 2014 20:20:52 -0700
Subject: [PATCH] arm: translate.c: Fix smlald Instruction
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The smlald (and probably smlsld) instruction was doing incorrect sign
extensions of the operands amongst 64bit result calculation. The
instruction psuedo-code is:
operand2 = if m_swap then ROR(R[m],16) else R[m];
product1 = SInt(R[n]<15:0>) * SInt(operand2<15:0>);
product2 = SInt(R[n]<31:16>) * SInt(operand2<31:16>);
result = product1 + product2 + SInt(R[dHi]:R[dLo]);
R[dHi] = result<63:32>;
R[dLo] = result<31:0>;
The result calculation should be done in 64 bit arithmetic, and hence
product1 and product2 should be sign extended to 64b before calculation.
The current implementation was adding product1 and product2 together
then sign-extending the intermediate result leading to false negatives.
E.G. if product1 = product2 = 0x4000000, their sum = 0x80000000, which
will be incorrectly interpreted as -ve on sign extension.
We fix by doing the 64b extensions on both product1 and product2 before
any addition/subtraction happens.
We also fix where we were possibly incorrectly setting the Q saturation
flag for SMLSLD, which the ARM ARM specifically says is not set.
Reported-by: Christina Smith <christina.smith(a)xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite(a)xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell(a)linaro.org>
Message-id: 2cddb6f5a15be4ab8d2160f3499d128ae93d304d.1397704570.git.peter.crosthwaite(a)xilinx.com
Cc: qemu-stable(a)nongnu.org
Signed-off-by: Peter Maydell <peter.maydell(a)linaro.org>
(cherry picked from commit 33bbd75a7c3321432fe40a8cbacd64619c56138c)
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
target-arm/translate.c | 34 +++++++++++++++++++++++-----------
1 file changed, 23 insertions(+), 11 deletions(-)
diff --git a/target-arm/translate.c b/target-arm/translate.c
index 56e3b4b..0335f10 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -8328,27 +8328,39 @@ static void disas_arm_insn(CPUARMState * env, DisasContext *s)
if (insn & (1 << 5))
gen_swap_half(tmp2);
gen_smul_dual(tmp, tmp2);
- if (insn & (1 << 6)) {
- /* This subtraction cannot overflow. */
- tcg_gen_sub_i32(tmp, tmp, tmp2);
- } else {
- /* This addition cannot overflow 32 bits;
- * however it may overflow considered as a signed
- * operation, in which case we must set the Q flag.
- */
- gen_helper_add_setq(tmp, cpu_env, tmp, tmp2);
- }
- tcg_temp_free_i32(tmp2);
if (insn & (1 << 22)) {
/* smlald, smlsld */
+ TCGv_i64 tmp64_2;
+
tmp64 = tcg_temp_new_i64();
+ tmp64_2 = tcg_temp_new_i64();
tcg_gen_ext_i32_i64(tmp64, tmp);
+ tcg_gen_ext_i32_i64(tmp64_2, tmp2);
tcg_temp_free_i32(tmp);
+ tcg_temp_free_i32(tmp2);
+ if (insn & (1 << 6)) {
+ tcg_gen_sub_i64(tmp64, tmp64, tmp64_2);
+ } else {
+ tcg_gen_add_i64(tmp64, tmp64, tmp64_2);
+ }
+ tcg_temp_free_i64(tmp64_2);
gen_addq(s, tmp64, rd, rn);
gen_storeq_reg(s, rd, rn, tmp64);
tcg_temp_free_i64(tmp64);
} else {
/* smuad, smusd, smlad, smlsd */
+ if (insn & (1 << 6)) {
+ /* This subtraction cannot overflow. */
+ tcg_gen_sub_i32(tmp, tmp, tmp2);
+ } else {
+ /* This addition cannot overflow 32 bits;
+ * however it may overflow considered as a
+ * signed operation, in which case we must set
+ * the Q flag.
+ */
+ gen_helper_add_setq(tmp, cpu_env, tmp, tmp2);
+ }
+ tcg_temp_free_i32(tmp2);
if (rd != 15)
{
tmp2 = load_reg(s, rd);
++++++ 0044-target-arm-A64-fix-unallocated-test.patch ++++++
>From de439482d4ed1db0f0f5837c98abc46f0a579ba0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alex=20Benn=C3=A9e?= <alex.bennee(a)linaro.org>
Date: Wed, 16 Apr 2014 12:29:39 +0100
Subject: [PATCH] target-arm: A64: fix unallocated test of scalar SQXTUN
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The test for the U bit was incorrectly inverted in the scalar case of SQXTUN.
This doesn't affect the vector case as the U bit is used to select XTN(2).
Reported-by: Hao Liu <hao.liu(a)arm.com>
Signed-off-by: Alex Bennée <alex.bennee(a)linaro.org>
Reviewed-by: Claudio Fontana <claudio.fontana(a)huawei.com>
Reviewed-by: Peter Maydell <peter.maydell(a)linaro.org>
Cc: qemu-stable(a)nongnu.org
Signed-off-by: Peter Maydell <peter.maydell(a)linaro.org>
(cherry picked from commit e44a90c59697cf98e05619fbb6f77a403d347495)
Signed-off-by: Andreas Färber <afaerber(a)suse.de>
---
target-arm/translate-a64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index 9175e48..a780366 100644
--- a/target-arm/translate-a64.c
+++ b/target-arm/translate-a64.c
@@ -7455,7 +7455,7 @@ static void disas_simd_scalar_two_reg_misc(DisasContext *s, uint32_t insn)
}
break;
case 0x12: /* SQXTUN */
- if (u) {
+ if (!u) {
unallocated_encoding(s);
return;
}
++++++ qemu-2.0.0-rc0.tar.bz2 -> qemu-2.0.0.tar.bz2 ++++++
/work/SRC/openSUSE:Factory/qemu/qemu-2.0.0-rc0.tar.bz2 /work/SRC/openSUSE:Factory/.qemu.new/qemu-2.0.0.tar.bz2 differ: char 11, line 1
++++++ qemu-linux-user.spec.in ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:19.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:19.000000000 +0200
@@ -23,7 +23,7 @@
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
-Source: qemu-2.0.0-rc0.tar.bz2
+Source: qemu-2.0.0.tar.bz2
# This patch queue is auto-generated from https://github.com/openSUSE/qemu
PATCH_FILES
# Please do not add patches manually here, run update_git.sh.
@@ -33,6 +33,7 @@
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
+BuildRequires: gcc-c++
%if 0%{?suse_version} >= 1140
BuildRequires: glib2-devel-static
%else
@@ -77,7 +78,7 @@
run cross-architecture builds.
%prep
-%setup -q -n qemu-2.0.0-rc0
+%setup -q -n qemu-2.0.0
PATCH_EXEC
%build
++++++ qemu.spec.in ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:19.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:19.000000000 +0200
@@ -18,10 +18,15 @@
%ifarch %ix86 x86_64
# choice of building all from source or using provided binary x86 blobs
+%if 0%{?suse_version} >= 1140
%define build_x86_fw_from_source 1
%else
%define build_x86_fw_from_source 0
%endif
+%else
+%define build_x86_fw_from_source 0
+%endif
+%define noarch_supported 1110
Name: qemu
Url: http://www.qemu.org/
@@ -30,7 +35,7 @@
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
-Source: %name-2.0.0-rc0.tar.bz2
+Source: %name-2.0.0.tar.bz2
Source1: 80-kvm.rules
Source2: qemu-ifup
Source3: kvm_stat
@@ -91,13 +96,15 @@
BuildRequires: libpixman-1-0-devel
BuildRequires: libpng-devel
BuildRequires: libpulse-devel
+BuildRequires: libtool
%if 0%{?suse_version} > 1310
-BuildRequires: libusb
+BuildRequires: libusb-devel
%endif
BuildRequires: libvdeplug3-devel
%if 0%{?suse_version} > 1220
BuildRequires: makeinfo
%endif
+BuildRequires: mozilla-nss-devel
BuildRequires: ncurses-devel
BuildRequires: pwdutils
BuildRequires: python
@@ -106,7 +113,7 @@
%{?systemd_requires}
%define with_systemd 1
%endif
-%if 0%{?sles_version} != 11
+%if 0%{?sles_version} != 11
BuildRequires: usbredir-devel
%endif
%if 0%{?suse_version} >= 1210
@@ -155,12 +162,16 @@
Suggests: qemu-arm
%endif
Suggests: qemu-extra
+Suggests: qemu-lang
%if 0%{?suse_version} >= 1210
Recommends: qemu-ksm = %{version}
-Suggests: qemu-lang
%endif
-%define firmware_files {acpi-dsdt.aml bios.bin q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/linuxboot.bin optionrom/multiboot.bin optionrom/kvmvapic.bin pxe-e1000.rom pxe-pcnet.rom pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
+%define built_firmware_files {acpi-dsdt.aml bios.bin bios-256k.bin \
+q35-acpi-dsdt.aml sgabios.bin vgabios.bin vgabios-cirrus.bin \
+vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin optionrom/linuxboot.bin \
+optionrom/multiboot.bin optionrom/kvmvapic.bin pxe-e1000.rom pxe-pcnet.rom \
+pxe-ne2k_pci.rom pxe-rtl8139.rom pxe-eepro100.rom pxe-virtio.rom}
%description
QEMU is an extremely well-performing CPU emulator that allows you to
@@ -267,7 +278,6 @@
derived from the legacy kvm package.
%endif
-%if 0%{?suse_version} >= 1210
%package lang
Summary: Universal CPU emulator -- Translations
Group: System/Emulators/PC
@@ -280,14 +290,74 @@
as PC and PowerMac systems.
This sub-package contains translations.
-%endif
+
+%package tools
+Summary: Universal CPU emulator -- Tools
+Group: System/Emulators/PC
+Provides: qemu:%_libexecdir/qemu-bridge-helper
+PreReq: permissions
+
+%description tools
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains various tools, including a bridge helper.
+
+%package -n libcacard0
+Summary: Universal CPU emulator -- Smartcard emulation
+Group: System/Emulators/PC
+
+%description -n libcacard0
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains the Smartcard library.
+
+%package -n libcacard-devel
+Summary: Universal CPU emulator -- Smartcard emulation
+Group: System/Emulators/PC
+Requires: glib2-devel
+Requires: libcacard0 = %version
+Requires: mozilla-nspr
+Requires: mozilla-nss
+
+%description -n libcacard-devel
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains development files for the Smartcard library.
+
+%package guest-agent
+Summary: Universal CPU emulator -- Guest agent
+Group: System/Emulators/PC
+Provides: qemu:%_bindir/qemu-ga
+
+%description guest-agent
+QEMU is an extremely well-performing CPU emulator that allows you to
+choose between simulating an entire system and running userspace
+binaries for different architectures under your native operating
+system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
+as PC and PowerMac systems.
+
+This sub-package contains the guest agent.
%package seabios
Summary: X86 BIOS for QEMU
Group: System/Emulators/PC
-Version: 1.7.4
+SEABIOS_VERSION
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description seabios
@@ -297,9 +367,11 @@
%package vgabios
Summary: VGA BIOSes for QEMU
Group: System/Emulators/PC
-Version: 1.7.4
+SEABIOS_VERSION
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description vgabios
@@ -312,7 +384,9 @@
Group: System/Emulators/PC
Version: 8
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description sgabios
@@ -325,42 +399,15 @@
Group: System/Emulators/PC
Version: 1.0.0
Release: 0
+%if 0%{?suse_version} > %{noarch_supported}
BuildArch: noarch
+%endif
Conflicts: qemu < 1.6.0
%description ipxe
Preboot Execution Environment (PXE) ROM support for various emulated network
adapters available with QEMU.
-%package tools
-Summary: Universal CPU emulator -- Tools
-Group: System/Emulators/PC
-Provides: qemu:%_libexecdir/qemu-bridge-helper
-PreReq: permissions
-
-%description tools
-QEMU is an extremely well-performing CPU emulator that allows you to
-choose between simulating an entire system and running userspace
-binaries for different architectures under your native operating
-system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
-as PC and PowerMac systems.
-
-This sub-package contains various tools, including a bridge helper.
-
-%package guest-agent
-Summary: Universal CPU emulator -- Guest agent
-Group: System/Emulators/PC
-Provides: qemu:%_bindir/qemu-ga
-
-%description guest-agent
-QEMU is an extremely well-performing CPU emulator that allows you to
-choose between simulating an entire system and running userspace
-binaries for different architectures under your native operating
-system. It currently emulates x86, ARM, PowerPC and SPARC CPUs as well
-as PC and PowerMac systems.
-
-This sub-package contains the guest agent.
-
%if 0%{?with_systemd}
%package ksm
Summary: Kernel Samepage Merging services
@@ -374,7 +421,7 @@
%endif
%prep
-%setup -q -n %name-2.0.0-rc0
+%setup -q #-n %name-2.0.0-rc3
PATCH_EXEC
%patch1000 -p1
@@ -383,7 +430,7 @@
%if %{build_x86_fw_from_source}
# as a safeguard, delete the firmware files that we intend to build
-for i in %firmware_files
+for i in %built_firmware_files
do
rm -f pc-bios/$i
done
@@ -391,7 +438,9 @@
%build
./configure --prefix=%_prefix --sysconfdir=%_sysconfdir \
+ --libdir=%_libdir \
--libexecdir=%_libexecdir \
+ --localstatedir=%_localstatedir \
--extra-cflags="%{optflags}" \
--disable-strip \
--enable-system --disable-linux-user \
@@ -405,16 +454,15 @@
--enable-cap-ng \
--enable-curl \
--enable-curses \
-%if 0%{?suse_version} >= 1210
--enable-gtk \
%if 0%{?suse_version} >= 1220
--with-gtkabi=3.0 \
%endif
-%endif
--enable-linux-aio \
--enable-modules \
--enable-sdl \
--with-sdlabi=1.2 \
+ --enable-smartcard-nss \
%if 0%{?suse_version} >= 1140
%ifarch %ix86 x86_64
--enable-spice \
@@ -427,7 +475,7 @@
%if 0%{?suse_version} > 1310
--enable-libusb \
%endif
-%if 0%{?sles_version} != 11
+%if 0%{?sles_version} != 11
--enable-usb-redir \
%endif
--enable-vde \
@@ -446,10 +494,10 @@
# Firmware
%if %{build_x86_fw_from_source}
-make --no-print-directory -C roms bios
-make --no-print-directory -C roms seavgabios
-make --no-print-directory -C roms pxerom
-make --no-print-directory -C roms sgabios
+make -C roms bios
+make -C roms seavgabios
+make -C roms pxerom
+make -C roms sgabios
%endif
%check
@@ -459,17 +507,15 @@
make install DESTDIR=$RPM_BUILD_ROOT
rm -fr $RPM_BUILD_ROOT/%_datadir/doc
install -D -m 644 %{SOURCE302} $RPM_BUILD_ROOT/%{_sysconfdir}/qemu/bridge.conf
-%if 0%{?suse_version} >= 1210
%find_lang %name
-%endif
%ifarch %ix86 x86_64 s390x
cat > %{buildroot}%{_bindir}/qemu-kvm << 'EOF'
#!/bin/sh
-%ifarch %s390x
-exec /usr/bin/qemu-system-s390x -machine accel=kvm "$@"
+%ifarch s390x
+exec %{_bindir}/qemu-system-s390x -machine accel=kvm "$@"
%else
-exec /usr/bin/qemu-system-x86_64 -machine accel=kvm "$@"
+exec %{_bindir}/qemu-system-x86_64 -machine accel=kvm "$@"
%endif
EOF
chmod 755 %{buildroot}%{_bindir}/qemu-kvm
@@ -484,7 +530,7 @@
install -D -m 755 %{SOURCE3} %{buildroot}%{_bindir}/kvm_stat
install -D -m 644 %{SOURCE4} %{buildroot}%{_mandir}/man1/qemu-kvm.1.gz
%endif
-install -D -p -m 0744 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
+install -D -p -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/ksm.service
%fdupes -s $RPM_BUILD_ROOT
%clean
@@ -513,6 +559,10 @@
%verify_permissions %_libexecdir/qemu-bridge-helper
%endif
+%post -n libcacard0 -p /sbin/ldconfig
+
+%postun -n libcacard0 -p /sbin/ldconfig
+
%if 0%{?with_systemd}
%pre ksm
%service_add_pre ksm.service
@@ -529,8 +579,8 @@
%files
%defattr(-, root, root)
-%dir %_libexecdir/%name
-%_libexecdir/%name/block-curl.so
+%dir %_libdir/%name
+%_libdir/%name/block-curl.so
%doc COPYING COPYING.LIB Changelog README VERSION qemu-doc.html qemu-tech.html
%doc %_mandir/man1/qemu.1.gz
%_datadir/%name
@@ -573,7 +623,9 @@
%exclude %_datadir/%name/petalogix-s3adsp1800.dtb
%exclude %_datadir/%name/QEMU,cgthree.bin
%exclude %_datadir/%name/QEMU,tcx.bin
+%ifarch %ix86 x86_64 s390x
%exclude %_datadir/%name/qemu-ifup
+%endif
%dir %_sysconfdir/%name
%ifarch %ix86 x86_64
%if 0%{?suse_version} >= 1230
@@ -638,10 +690,8 @@
%_mandir/man1/qemu-kvm.1.gz
%endif
-%if 0%{?suse_version} >= 1210
%files lang -f %name.lang
%defattr(-, root, root)
-%endif
%files seabios
%defattr(-, root, root)
@@ -686,16 +736,31 @@
%_bindir/qemu-img
%_bindir/qemu-nbd
%_bindir/virtfs-proxy-helper
+%_bindir/vscclient
%verify(not mode) %_libexecdir/qemu-bridge-helper
%dir %_sysconfdir/%name
%config %_sysconfdir/%name/bridge.conf
+%files -n libcacard0
+%defattr(-, root, root)
+%_libdir/libcacard.so.0*
+
+%files -n libcacard-devel
+%defattr(-, root, root)
+%dir %_includedir/cacard
+%_includedir/cacard/*.h
+%_libdir/libcacard.la
+%_libdir/libcacard.a
+%_libdir/libcacard.so
+%_libdir/pkgconfig/libcacard.pc
+
%files guest-agent
%defattr(-, root, root)
%attr(755,root,kvm) %_bindir/qemu-ga
%if 0%{?with_systemd}
%files ksm
+%defattr(-, root, root)
%{_unitdir}/ksm.service
%endif
++++++ update_git.sh ++++++
--- /var/tmp/diff_new_pack.OZuPSx/_old 2014-04-22 10:06:19.000000000 +0200
+++ /var/tmp/diff_new_pack.OZuPSx/_new 2014-04-22 10:06:19.000000000 +0200
@@ -11,16 +11,30 @@
# when it comes.
GIT_TREE=git://github.com/openSUSE/qemu.git
-GIT_LOCAL_TREE=/home/andreas/QEMU/qemu-opensuse
+GIT_LOCAL_TREE=~/git/qemu-opensuse
GIT_BRANCH=opensuse-2.0
-GIT_UPSTREAM_TAG=v2.0.0-rc0
+GIT_UPSTREAM_TAG=v2.0.0
QEMU_TMP=/dev/shm/qemu-tmp
-# clean up
+restore_file_to_package() {
+# If the processed file matches the previous one, move the previous
+# one back in place, otherwise add the processed file.
+
+ if cmp -s "$1" saved."$1"; then
+ osc mv --force saved."$1" "$1"
+ else
+ osc add "$1"
+ fi
+}
+
+# save files in case they remain unchanged
if [ -e 0001-* ]; then
- osc rm --force 0*
+ for i in 0*; do
+ osc mv $i saved.$i
+ done
fi
-rm -f qemu.spec qemu-linux-user.spec
+osc mv qemu.spec saved.qemu.spec
+osc mv qemu-linux-user.spec saved.qemu-linux-user.spec
# fetch all patches
rm -rf $QEMU_TMP
@@ -41,13 +55,14 @@
rm -rf $QEMU_TMP
# cut off file name after 40 bytes, so we work around git version differences
-# while at it, also remove the signature
+# while at it, also remove the signature.
for i in 0*; do
PATCHNAME=${i%.patch}
- PATCHNAME=${i:0:40}.patch
+ PATCHNAME=${PATCHNAME:0:40}.patch
head -n $(expr $(wc -l $i | cut -d ' ' -f 1) - 3) $i > "$PATCHNAME.tmp"
rm "$i"
mv "$PATCHNAME.tmp" "$PATCHNAME"
+ restore_file_to_package "$PATCHNAME"
done
# we have all patches as files now - generate the spec files!
@@ -65,10 +80,26 @@
done
elif [ "$line" = "QEMU_VERSION" ]; then
echo "Version: $QEMU_VERSION"
+ elif [[ "$line" =~ ^Source: ]]; then
+ QEMU_TARBALL=qemu-`echo "$line" | cut -d '-' -f 2-`
+ VERSION_FILE=${QEMU_TARBALL%.tar.bz2}/roms/seabios/.version
+ SEABIOS_VERSION=`tar jxfO "$QEMU_TARBALL" "$VERSION_FILE"`
+ SEABIOS_VERSION=`echo $SEABIOS_VERSION | cut -d '-' -f 2`
+ echo "$line"
+ elif [ "$line" = "SEABIOS_VERSION" ]; then
+ echo "Version: $SEABIOS_VERSION"
else
echo "$line"
fi
done < $package.spec.in > $package.spec
done
-osc add 0*
+
+restore_file_to_package qemu.spec
+restore_file_to_package qemu-linux-user.spec
+
+# remove any remaining saved files
+files=(saved.*)
+if [ -e "${files[0]}" ]; then
+ osc rm --force saved.*
+fi
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package mbuffer for openSUSE:Factory checked in at 2014-04-22 10:06:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mbuffer (Old)
and /work/SRC/openSUSE:Factory/.mbuffer.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mbuffer"
Changes:
--------
--- /work/SRC/openSUSE:Factory/mbuffer/mbuffer.changes 2013-04-17 07:24:43.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mbuffer.new/mbuffer.changes 2014-04-22 10:06:12.000000000 +0200
@@ -1,0 +2,18 @@
+Wed Apr 16 22:51:24 UTC 2014 - crrodriguez(a)opensuse.org
+
+- version 20140310
+* added memory advise for buffer memory
+* prevent buffer overflow attack via defaults file
+* ignore defaults file from other users
+* updated documentation for use with cron
+* minor bugfixes
+* new feature: set option defaults in ~/.mbuffer.rc
+* enhancement: write status to the log file
+* enhancement: added option to suppress status logging
+* fix: formatting fix for summary message
+- spec file changes:
+ * refresh patch with p1
+ * the mhash library is abandonware, this is no good
+ since we are talking about crypto software, use openSSL instead.
+
+-------------------------------------------------------------------
Old:
----
mbuffer-20130220.tgz
New:
----
mbuffer-20140310.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ mbuffer.spec ++++++
--- /var/tmp/diff_new_pack.3Sd9iS/_old 2014-04-22 10:06:13.000000000 +0200
+++ /var/tmp/diff_new_pack.3Sd9iS/_new 2014-04-22 10:06:13.000000000 +0200
@@ -14,7 +14,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: mbuffer
-Version: 20130220
+Version: 20140310
Release: 0
Summary: Replacement for "buffer" with many more Features
Source: http://www.maier-komor.de/software/mbuffer/mbuffer-%{version}.tgz
@@ -23,7 +23,7 @@
Group: Productivity/Text/Utilities
License: GPL-3.0+
BuildRoot: %{_tmppath}/build-%{name}-%{version}
-BuildRequires: openssl-devel make gcc glibc-devel glibc-devel mhash-devel
+BuildRequires: openssl-devel
BuildRequires: libtool
%description
@@ -38,7 +38,7 @@
%prep
%setup -q
-%patch1
+%patch1 -p1
%build
%configure \
++++++ mbuffer-20130220.tgz -> mbuffer-20140310.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/.hg_archival.txt new/mbuffer-20140310/.hg_archival.txt
--- old/mbuffer-20130220/.hg_archival.txt 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/.hg_archival.txt 2014-03-10 23:41:15.000000000 +0100
@@ -1,5 +1,5 @@
repo: 6e3b485d74645931e2408ed1f57e659029b5639a
-node: 32d9cfa57a3c816cc7fa6dfef775615e53c20c0c
+node: d98ef1ef3a25043dbae9b29d0f6bd96d873c3934
branch: default
-latesttag: 20130220
+latesttag: R20140310
latesttagdistance: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/.hgtags new/mbuffer-20140310/.hgtags
--- old/mbuffer-20130220/.hgtags 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/.hgtags 2014-03-10 23:41:15.000000000 +0100
@@ -82,3 +82,5 @@
8ae0ca3fcabebb985e84f3306f312892e350a0b5 20130209
6c60e788eb7a6bd22822dfc36e0f73369c4298be 20130210
35bfc3c313d416df09cfabca9ca691b60f7816b6 20130220
+d93542af23e7750fc8e50c502f84ae7c62ec7856 R20140126
+3f18779d5fda082e6093e69de8c9c4098c67823d R20140310
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/ChangeLog new/mbuffer-20140310/ChangeLog
--- old/mbuffer-20130220/ChangeLog 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/ChangeLog 2014-03-10 23:41:15.000000000 +0100
@@ -1,3 +1,17 @@
+20140310:
+- added memory advise for buffer memory
+- compatibility fix for Solars st driver
+- prevent buffer overflow attack via defaults file
+- ignore defaults file from other users
+- updated documentation for use with cron
+- minor bugfixes
+
+20140126:
+- new feature: set option defaults in ~/.mbuffer.rc
+- enhancement: write status to the log file
+- enhancement: added option to suppress status logging
+- fix: formatting fix for summary message
+
20130220:
- reverted incorrect fix for -P 100, which may lead to data corruption
- reenable hash libraries (no correlation with data corruption)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/configure new/mbuffer-20140310/configure
--- old/mbuffer-20130220/configure 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/configure 2014-03-10 23:41:15.000000000 +0100
@@ -2372,7 +2372,7 @@
PACKAGE=mbuffer
-VERSION=20130220
+VERSION=20140302
if test "${LD_LIBRARY_PATH}" != "" ; then
echo ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/configure.in new/mbuffer-20140310/configure.in
--- old/mbuffer-20130220/configure.in 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/configure.in 2014-03-10 23:41:15.000000000 +0100
@@ -5,7 +5,7 @@
AC_EXEEXT
PACKAGE=mbuffer
-VERSION=20130220
+VERSION=20140310
if test "${LD_LIBRARY_PATH}" != "" ; then
echo ""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/mbuffer.1.in new/mbuffer-20140310/mbuffer.1.in
--- old/mbuffer-20130220/mbuffer.1.in 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/mbuffer.1.in 2014-03-10 23:41:15.000000000 +0100
@@ -96,7 +96,11 @@
Same as above only for setting the transfer limit for the writer.
.TP
\fB\-A\fR <\fIcmd\fP>
-the device used is an autoloader which uses \fIcmd\fP to load the next volume
+the device used is an autoloader which uses \fIcmd\fP to load the next
+volume. Pass <\fI/bin/false\fP> as an autoload command to suppress the
+warning message that appears when run without controlling terminal (e.g.
+via cron). Like this the autoload will fail and mbuffer will terminate
+with an error message when reaching the end of the tape.
.TP
\fB\-a\fR <\fItime\fP>
the device used is an autoloader which takes \fItime\fP seconds to load a new tape
@@ -120,6 +124,9 @@
\fB\-q\fR
quiet \- do not display the status on the standard error output
.TP
+\fB\-Q\fR
+quiet \- do not log the status in the log file
+.TP
\fB\-\-direct\fR
Use O_DIRECT to open file descriptors. This option is not available on
all systems. It tells the OS to bypass the page cache to improve
@@ -159,6 +166,38 @@
terminates mbuffer via SIGINT. Be aware that the watchdog is unaware of
tape-change activities. So choose the watchdog timeout greater that the
worst-case tape-change time.
+.SH "DEFAULT VALUES"
+The default values for following options can be set as \fIkey = value\fP pairs
+in the ~/.mbuffer.rc file:
+.br
+\fIblocksize\fP: block size (option -s)
+.br
+\fItimeout\fP: watchdog timeout (option -W)
+.br
+\fItotalmem\fP: total buffer size (option -m)
+.br
+\fImaxreadspeed\fP: maximum read speed (option -r)
+.br
+\fImaxwritespeed\fP: maximum write speed (option -R)
+.br
+\fIstartwrite\fP: threshold for start writing (option -P)
+.br
+\fIstartread\fP: threshold for start reading (option -p)
+.br
+\fIpause\fP: pause after writing a block (option -u)
+.br
+\fInumblocks\fP: number of blocks in buffer (option -b)
+.br
+\fImemlock\fP: lock buffer in memory (option -L)
+.br
+\fIshowstatus\fP: print transfer status on console (option -q)
+.br
+\fIlogstatus\fP: write transfer status to logfile (option -Q)
+.br
+\fItcpbuffer\fP: TCP buffer size (option --tcpbuffer)
+.br
+
+
.SH "ENVIRONMENT VARIABLES"
If TMPDIR is set, mbuffer allocates storage for file-based buffers in this
directory\&. If TMPDIR is unset, \fI/var/tmp\fR will be used\&.
@@ -167,6 +206,8 @@
\fI@prefix@/bin/mbuffer\fP
.br
\fI/var/tmp/mbuffer-*\fP
+.br
+\fI~/.mbuffer.rc\fP
.SH "EXAMPLES"
.LP
To run this program with the default options just type:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mbuffer-20130220/mbuffer.c new/mbuffer-20140310/mbuffer.c
--- old/mbuffer-20130220/mbuffer.c 2013-02-20 23:37:08.000000000 +0100
+++ new/mbuffer-20140310/mbuffer.c 2014-03-10 23:41:15.000000000 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2013, Thomas Maier-Komor
+ * Copyright (C) 2000-2014, Thomas Maier-Komor
*
* This is the source code of mbuffer.
*
@@ -132,11 +132,10 @@
static pthread_t
Reader, Watchdog;
static long
- Tmp = -1, Pause = 0, Memmap = 0,
- Status = 1, Outblocksize = 0,
- Autoload_time = 0, OptSync = 0;
+ Tmp = -1,
+ OptSync = 0;
static unsigned long
- Outsize = 10240;
+ Outsize = 10240, Pause = 0, Timeout = 0;
static volatile int
Terminate = 0, /* abort execution, because of error or signal */
EmptyCount = 0, /* counter incremented when buffer runs empty */
@@ -145,7 +144,8 @@
Done = 0,
MainOutOK = 1; /* is the main outputThread still writing or just coordinating senders */
static unsigned long long
- Blocksize = 10240, MaxReadSpeed = 0, MaxWriteSpeed = 0, OutVolsize = 0;
+ Totalmem = 0, PgSz = 0, NumP = 0, Blocksize = 10240,
+ MaxReadSpeed = 0, MaxWriteSpeed = 0, OutVolsize = 0;
static volatile unsigned long long
Rest = 0, Numin = 0, Numout = 0;
static double
@@ -153,9 +153,12 @@
static char
*Tmpfile = 0, **Buffer;
static const char
- *Infile = 0, *Autoload_cmd = 0;
+ *Infile = 0, *AutoloadCmd = 0;
+static unsigned int
+ AutoloadTime = 0;
static int
Memlock = 0, TermQ[2],
+ Memmap = 0, Quiet = 0, Status = 1, StatusLog = 1,
Hashers = 0, Direct = 0, SetOutsize = 0;
static long
NumVolumes = 1, /* number of input volumes, 0 for interactive prompting */
@@ -258,18 +261,17 @@
m = (int) (secs - h * 3600)/60;
secs -= m * 60 + h * 3600;
if (numthreads > 1)
- msg += sprintf(msg,"summary: %d x ",numthreads);
+ msg += sprintf(msg,"summary: %dx ",numthreads);
else
msg += sprintf(msg,"summary: ");
msg += kb2str(msg,numb);
msg += sprintf(msg,"Byte in ");
if (h > 0)
- msg += sprintf(msg,"%d h %02d min ",h,m);
- else if (m > 0) {
- msg += sprintf(msg,"%2d min ",m);
- msg += sprintf(msg,"%04.1f sec - average of ",secs);
- } else
- msg += sprintf(msg,"%4.1f sec - average of ",secs);
+ msg += sprintf(msg,"%dh %02dmin %04.1fsec - average of ",h,m,secs);
+ else if (m > 0)
+ msg += sprintf(msg,"%2dmin %04.1fsec - average of ",m,secs);
+ else
+ msg += sprintf(msg,"%4.1fsec - average of ",secs);
msg += kb2str(msg,av);
msg += sprintf(msg,"B/s");
if (EmptyCount != 0)
@@ -345,12 +347,11 @@
-static void *watchdogThread(void *timeout)
+static void *watchdogThread(void *ignored)
{
unsigned long ni = Numin, no = Numout;
- unsigned t = (unsigned) timeout;
for (;;) {
- sleep(t);
+ sleep(Timeout);
if ((ni == Numin) && (Finish == -1)) {
errormsg("watchdog timeout: input stalled; sending SIGINT\n");
kill(getpid(),SIGINT);
@@ -401,7 +402,7 @@
}
while (!Done) {
int err,numsender;
- ssize_t nw;
+ ssize_t nw = 0;
char buf[256], *b = buf;
timeout.tv_sec = 0;
@@ -445,17 +446,21 @@
b += sprintf(b,"B/s, ");
b += kb2str(b,total);
b += sprintf(b,"B total, buffer %3.0f%% full",fill);
+ if (Quiet == 0) {
#ifdef NEED_IO_INTERLOCK
- if (Log == STDERR_FILENO) {
- int e;
- e = pthread_mutex_lock(&LogMut);
- assert(e == 0);
- nw = write(STDERR_FILENO,buf,strlen(buf));
- e = pthread_mutex_unlock(&LogMut);
- assert(e == 0);
- } else
+ if (Log == STDERR_FILENO) {
+ int e;
+ e = pthread_mutex_lock(&LogMut);
+ assert(e == 0);
+ nw = write(STDERR_FILENO,buf,strlen(buf));
+ e = pthread_mutex_unlock(&LogMut);
+ assert(e == 0);
+ } else
#endif
- nw = write(STDERR_FILENO,buf,strlen(buf));
+ nw = write(STDERR_FILENO,buf,strlen(buf));
+ }
+ if ((StatusLog != 0) && (Log != STDERR_FILENO))
+ infomsg("%s\n",buf+1);
err = pthread_mutex_unlock(&TermMut);
assert(0 == err);
if (nw == -1) /* stop trying to print status messages after a write error */
@@ -606,8 +611,8 @@
do {
if ((Autoloader) && (Infile)) {
int ret;
- if (Autoload_cmd) {
- cmd = Autoload_cmd;
+ if (AutoloadCmd) {
+ cmd = AutoloadCmd;
} else {
(void) snprintf(cmd_buf, sizeof(cmd_buf), "mt -f %s offline", Infile);
cmd = cmd_buf;
@@ -623,9 +628,9 @@
Terminate = 1;
pthread_exit((void *) -1);
}
- if (Autoload_time) {
+ if (AutoloadTime) {
infomsg("waiting for drive to get ready...\n");
- (void) sleep(Autoload_time);
+ (void) sleep(AutoloadTime);
}
} else {
if (0 == promptInteractive(at,num))
@@ -1038,7 +1043,7 @@
if (Autoloader) {
const char default_cmd[] = "mt -f %s offline";
char cmd_buf[sizeof(default_cmd)+strlen(outfile)];
- const char *cmd = Autoload_cmd;
+ const char *cmd = AutoloadCmd;
int err;
if (cmd == 0) {
@@ -1056,9 +1061,9 @@
Autoloader = 0;
return -1;
}
- if (Autoload_time) {
+ if (AutoloadTime) {
infomsg("waiting for drive to get ready...\n");
- (void) sleep(Autoload_time);
+ (void) sleep(AutoloadTime);
}
} else {
int err;
@@ -1106,29 +1111,6 @@
-static int checkIncompleteOutput(int out, const char *outfile)
-{
- static unsigned long mulretry = 0; /* well this isn't really good design,
- but better than a global variable */
-
- debugmsg("Outblocksize = %ld, mulretry = %lu\n",Outblocksize,mulretry);
- if ((0 != mulretry) || (0 == Outblocksize)) {
- out = requestOutputVolume(out,outfile);
- debugmsg("resetting outputsize to normal\n");
- if (0 != mulretry) {
- Outsize = mulretry;
- mulretry = 0;
- }
- } else {
- debugmsg("setting to new outputsize (end of device)\n");
- mulretry = Outsize;
- Outsize = Outblocksize;
- }
- return out;
-}
-
-
-
static void terminateOutputThread(dest_t *d, int status)
{
int err;
@@ -1278,6 +1260,7 @@
}
do {
/* use Outsize which could be the blocksize of the device (option -d) */
+ unsigned long long n = rest > Outsize ? Outsize : rest;
int num;
if (haderror) {
if (NumSenders == 0)
@@ -1287,7 +1270,6 @@
#ifdef HAVE_SENDFILE
if (sendout) {
off_t baddr = (off_t) (Buffer[at] + blocksize - rest);
- unsigned long long n = SetOutsize ? (rest > Outsize ? (rest/Outsize)*Outsize : rest) : rest;
num = sendfile(out,SFV_FD_SELF,&baddr,n);
debugiomsg("outputThread: sendfile(%d, SFV_FD_SELF, &(Buffer[%d] + %llu), %llu) = %d\n", out, at, blocksize - rest, n, num);
if ((num == -1) && ((errno == EOPNOTSUPP) || (errno == EINVAL))) {
@@ -1298,17 +1280,18 @@
} else
#endif
{
- num = write(out,Buffer[at] + blocksize - rest, rest > Outsize ? Outsize : rest);
- debugiomsg("outputThread: writing %lld@0x%p: ret = %d\n",rest > Outsize ? Outsize : rest,Buffer[at] + blocksize - rest,num);
+ num = write(out,Buffer[at] + blocksize - rest, n);
+ debugiomsg("outputThread: writing %lld@0x%p: ret = %d\n", n, Buffer[at] + blocksize - rest, num);
}
- if ((-1 == num) && (Terminal||Autoloader) && ((errno == ENOMEM) || (errno == ENOSPC))) {
- /* request a new volume - but first check
- * whether we are really at the
- * end of the device */
- out = checkIncompleteOutput(out,dest->name);
- if (out == -1)
- haderror = 1;
- continue;
+ if (Terminal||Autoloader) {
+ if (((-1 == num) && ((errno == ENOMEM) || (errno == ENOSPC)))
+ || (0 == num)) {
+ /* request a new volume */
+ out = requestOutputVolume(out,dest->name);
+ if (out == -1)
+ haderror = 1;
+ continue;
+ }
} else if (-1 == num) {
dest->result = strerror(errno);
errormsg("outputThread: error writing to %s at offset 0x%llx: %s\n",dest->arg,(long long)Blocksize*Numout+blocksize-rest,strerror(errno));
@@ -1367,7 +1350,7 @@
{
(void) fprintf(stderr,
"mbuffer version "VERSION"\n"\
- "Copyright 2001-2011 - T. Maier-Komor\n"\
+ "Copyright 2001-2014 - T. Maier-Komor\n"\
"License: GPLv3 - see file LICENSE\n"\
"This program comes with ABSOLUTELY NO WARRANTY!!!\n"
"Donations via PayPal to thomas(a)maier-komor.de are welcome and support this work!\n"
@@ -1422,6 +1405,7 @@
"-A <cmd> : issue command <cmd> to request new volume\n"
"-v <level> : set verbose level to <level> (valid values are 0..6)\n"
"-q : quiet - do not display the status on stderr\n"
+ "-Q : quiet - do not log the status\n"
"-c : write with synchronous data integrity support\n"
"-e : stop processing on any kind of error\n"
#ifdef O_DIRECT
@@ -1435,6 +1419,7 @@
"-4 : force use of IPv4\n"
"-6 : force use of IPv6\n"
"-0 : use IPv4 or IPv6\n"
+ "--tcpbuffer: size for TCP buffer\n"
"-V\n"
"--version : print version information\n"
"Unsupported buffer options: -t -Z -B\n"
@@ -1604,12 +1589,243 @@
fatal("unable to open all outputs\n");
}
+
+
+static const char *calcval(const char *arg, unsigned long long *res)
+{
+ char ch;
+ double d;
+
+ switch (sscanf(arg,"%lf%c",&d,&ch)) {
+ default:
+ assert(0);
+ break;
+ case 2:
+ if (d <= 0)
+ return "negative value out of range";
+ switch (ch) {
+ case 'k':
+ case 'K':
+ d *= 1024.0;
+ *res = d;
+ return 0;
+ case 'm':
+ case 'M':
+ d *= 1024.0*1024.0;
+ *res = d;
+ return 0;
+ case 'g':
+ case 'G':
+ d *= 1024.0*1024.0*1024.0;
+ *res = d;
+ return 0;
+ case 't':
+ case 'T':
+ d *= 1024.0*1024.0*1024.0*1024.0;
+ *res = d;
+ return 0;
+ case '%':
+ if ((d >= 90) || (d <= 0))
+ return "invalid value for percentage (must be 0..90)";
+ *res = d;
+ return 0;
+ case 'b':
+ case 'B':
+ if (d < 128)
+ return "invalid value for number of bytes";
+ *res = d;
+ return 0;
+ default:
+ return "invalid dimension";
+ }
+ case 1:
+ if (d <= 0)
+ return "value out of range";
+ if (d <= 100)
+ return "value out of range";
+ *res = d;
+ return 0;
+ case 0:
+ break;
+ }
+ return "unrecognized argument";
+}
+
+
+static void initDefaults()
+{
+ char dfname[PATH_MAX+1], line[256];
+ const char *home = getenv("HOME");
+ size_t l;
+ int df;
+ FILE *dfstr;
+ struct stat st;
+
+ if (home == 0) {
+ warningmsg("HOME environment variable not set - unable to find defaults file\n");
+ return;
+ }
+ strncpy(dfname,home,PATH_MAX);
+ dfname[sizeof(dfname)-1] = 0;
+ l = strlen(dfname);
+ if (l + 12 > PATH_MAX) {
+ warningmsg("path to defaults file breaks PATH_MAX\n");
+ return;
+ }
+ strcat(dfname,"/.mbuffer.rc");
+ df = open(dfname,O_RDONLY);
+ if (df == -1) {
+ if (errno == ENOENT)
+ infomsg("no defaults file ~/.mbuffer.rc\n");
+ else
+ warningmsg("error opening defaults file %s: %s\n",dfname,strerror(errno));
+ return;
+ }
+ if (-1 == fstat(df,&st)) {
+ warningmsg("unable to stat defaults file %s: %s\n",dfname,strerror(errno));
+ close(df);
+ return;
+ }
+ if (getuid() != st.st_uid) {
+ warningmsg("ignoring defaults file from different user\n");
+ close(df);
+ return;
+ }
+ infomsg("reading defaults file %s\n",dfname);
+ dfstr = fdopen(df,"r");
+ assert(dfstr);
+ while (!feof(dfstr)) {
+ char key[64],valuestr[64];
+ fscanf(dfstr,"%255[^\n]\n",line);
+ char *pound = strchr(line,'#');
+ unsigned long long value;
+ int a;
+
+ if (pound)
+ *pound = 0;
+ a = sscanf(line,"%63[A-Za-z]%*[ \t=:]%63[0-9a-zA-Z]",key,valuestr);
+ if (a != 2) {
+ warningmsg("unable to parse line '%s' in .mbuffer.rc; %d arguments\n",line,a);
+ continue;
+ }
+ debugmsg("parsing key/value pair %s=%s\n",key,valuestr);
+ if (strcasecmp(key,"numblocks") == 0) {
+ long nb = strtol(valuestr,0,0);
+ if ((nb == 0) && (errno == EINVAL)) {
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ } else {
+ Numblocks = nb;
+ debugmsg("Numblocks = %llu\n",Numblocks);
+ }
+ } else if (strcasecmp(key,"pause") == 0) {
+ long p = strtol(valuestr,0,0);
+ if ((p == 0) && (errno == EINVAL)) {
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ } else {
+ Pause = p;
+ debugmsg("Pause = %d\n",Pause);
+ }
+ } else if (strcasecmp(key,"autoloadtime") == 0) {
+ long at = strtol(valuestr,0,0) - 1;
+ if ((at == 0) && (errno == EINVAL))
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ else {
+ AutoloadTime = at;
+ debugmsg("Autoloader time = %d\n",AutoloadTime);
+ }
+ } else if (strcasecmp(key,"startread") == 0) {
+ double sr = 0;
+ if (1 == sscanf(valuestr,"%lf",&sr))
+ sr /= 100;
+ if ((sr <= 1) && (sr > 0)) {
+ StartRead = sr;
+ debugmsg("StartRead = %1.2lf\n",StartRead);
+ }
+ } else if (strcasecmp(key,"startwrite") == 0) {
+ double sw = 0;
+ if (1 == sscanf(valuestr,"%lf",&sw))
+ sw /= 100;
+ if ((sw <= 1) && (sw > 0)) {
+ StartWrite = sw;
+ debugmsg("StartWrite = %1.2lf\n",StartWrite);
+ }
+ } else if (strcasecmp(key,"timeout") == 0) {
+ long t = strtol(valuestr,0,0);
+ if (((t == 0) && (errno == EINVAL)) || (t < 0))
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ else {
+ Timeout = t;
+ debugmsg("Timeout = %lu\n",Timeout);
+ }
+ } else if (strcasecmp(key,"showstatus") == 0) {
+ if ((strcasecmp(valuestr,"yes") == 0) || (strcasecmp(valuestr,"on") == 0) || (strcmp(valuestr,"1") == 0)) {
+ Quiet = 0;
+ debugmsg("showstatus = yes\n");
+ } else if ((strcasecmp(valuestr,"no") == 0) || (strcasecmp(valuestr,"off") == 0) || (strcmp(valuestr,"0") == 0)) {
+ Quiet = 1;
+ debugmsg("showstatus = no\n");
+ } else
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ continue;
+ } else if (strcasecmp(key,"logstatus") == 0) {
+ if ((strcasecmp(valuestr,"yes") == 0) || (strcasecmp(valuestr,"on") == 0) || (strcmp(valuestr,"1") == 0)) {
+ StatusLog = 1;
+ debugmsg("logstatus = yes\n");
+ } else if ((strcasecmp(valuestr,"no") == 0) || (strcasecmp(valuestr,"off") == 0) || (strcmp(valuestr,"0") == 0)) {
+ StatusLog = 0;
+ debugmsg("logstatus = no\n");
+ } else
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ continue;
+ } else if (strcasecmp(key,"memlock") == 0) {
+ if ((strcasecmp(valuestr,"yes") == 0) || (strcasecmp(valuestr,"on") == 0) || (strcmp(valuestr,"1") == 0)) {
+ Memlock = 1;
+ debugmsg("Memlock = %lu\n",Memlock);
+ } else if ((strcasecmp(valuestr,"no") == 0) || (strcasecmp(valuestr,"off") == 0) || (strcmp(valuestr,"0") == 0)) {
+ Memlock = 0;
+ debugmsg("Memlock = %lu\n",Memlock);
+ } else
+ warningmsg("invalid argument for %s: \"%s\"\n",key,valuestr);
+ continue;
+ }
+ const char *argerror = calcval(valuestr,&value);
+ if (argerror) {
+ warningmsg("ignoring key/value pair from defaults file (%s = %s): %s\n",key,valuestr,argerror);
+ continue;
+ }
+ if (strcasecmp(key,"blocksize") == 0) {
+ Blocksize = value;
+ } else if (strcasecmp(key,"maxwritespeed") == 0) {
+ MaxWriteSpeed = value;
+ } else if (strcasecmp(key,"maxreadspeed") == 0) {
+ MaxReadSpeed = value;
+ } else if (strcasecmp(key,"Totalmem") == 0) {
+ if (value < 100) {
+#if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__) || defined(__FreeBSD__)
+ Totalmem = ((unsigned long long) NumP * PgSz * value) / 100 ;
+ debugmsg("Totalmem = %lluk\n",Totalmem>>10);
+#else
+ warningmsg("Unable to determine page size or amount of available memory - please specify an absolute amount of memory.\n");
+#endif
+ }
+ } else if (strcasecmp(key,"tcpbuffer") == 0) {
+ TCPBufSize = value;
+ } else {
+ warningmsg("unknown key: %s\n",key);
+ continue;
+ }
+ infomsg("setting %s to %lld\n",key,value);
+ }
+ fclose(dfstr);
+ close(df);
+}
+
+
int main(int argc, const char **argv)
{
- unsigned long long totalmem = 0;
int optMset = 0, optSset = 0, optBset = 0, optMode = O_EXCL, numOut = 0;
int numstdout = 0, numthreads = 0;
- long mxnrsem, timeout = 0;
+ long mxnrsem;
int c, fl, err;
sigset_t signalSet;
#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
@@ -1621,33 +1837,56 @@
const char *outfile = 0;
struct sigaction sig;
dest_t *dest = 0;
-#if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__)
- long long pgsz, nump;
+ /* setup logging prefix */
+ progname = basename(argv0);
+ PrefixLen = strlen(progname) + 2;
+ Prefix = malloc(PrefixLen);
+ (void) strcpy(Prefix,progname);
+ Prefix[PrefixLen - 2] = ':';
+ Prefix[PrefixLen - 1] = ' ';
+
+ /* set verbose level before parsing defaults and options */
+ for (c = 1; c < argc; c++) {
+ const char *arg = argv[c];
+ if ((arg[0] == '-') && (arg[1] == 'v')) {
+ long verb;
+ if (arg[2])
+ verb = strtol(arg+2,0,0);
+ else
+ verb = strtol(argv[++c],0,0);
+ if ((verb == 0) && (errno == EINVAL))
+ errormsg("invalid argument to option -v: \"%s\"\n",argv[c]);
+ else
+ Verbose = verb;
+ debugmsg("Verbose = %d\n",Verbose);
+ }
+ }
+
+ /* gather system parameters */
TickTime = 1000000 / sysconf(_SC_CLK_TCK);
- pgsz = sysconf(_SC_PAGESIZE);
- assert(pgsz > 0);
- nump = sysconf(_SC_AVPHYS_PAGES);
- assert(nump > 0);
- Blocksize = pgsz;
- Numblocks = nump/50;
+#if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__)
+ PgSz = sysconf(_SC_PAGESIZE);
+ assert(PgSz > 0);
+ NumP = sysconf(_SC_AVPHYS_PAGES);
+ assert(NumP > 0);
+ Blocksize = PgSz;
+ debugmsg("total # of phys pages: %li (pagesize %li)\n",NumP,PgSz);
+ Numblocks = NumP/50;
#elif defined(__FreeBSD__)
size_t nump_size = sizeof(nump_size);
- unsigned long pgsz,nump;
- sysctlbyname("hw.availpages", &nump, &nump_size, NULL, 0);
- pgsz = sysconf(_SC_PAGESIZE);
- assert(pgsz > 0);
+ sysctlbyname("hw.availpages", &NumP, &nump_size, NULL, 0);
+ PgSz = sysconf(_SC_PAGESIZE);
+ assert(PgSz > 0);
#endif
#if defined(_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK >= 0) && defined(CLOCK_MONOTONIC)
if (sysconf(_SC_MONOTONIC_CLOCK) > 0)
ClockSrc = CLOCK_MONOTONIC;
#endif
- progname = basename(argv0);
- PrefixLen = strlen(progname) + 2;
- Prefix = malloc(PrefixLen);
- (void) strcpy(Prefix,progname);
- Prefix[PrefixLen - 2] = ':';
- Prefix[PrefixLen - 1] = ' ';
+
+ /* setup parameters */
+ initDefaults();
+ debugmsg("default buffer set to %d blocks of %lld bytes\n",Numblocks,Blocksize);
for (c = 1; c < argc; c++) {
if (!argcheck("-s",argv,&c,argc)) {
Blocksize = Outsize = calcint(argv,c,Blocksize);
@@ -1662,16 +1901,16 @@
optMode |= O_TRUNC;
debugmsg("truncate next file\n");
} else if (!argcheck("-m",argv,&c,argc)) {
- totalmem = calcint(argv,c,totalmem);
+ Totalmem = calcint(argv,c,Totalmem);
optMset = 1;
- if (totalmem < 100) {
+ if (Totalmem < 100) {
#if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__) || defined(__FreeBSD__)
- totalmem = ((unsigned long long) nump * pgsz * totalmem) / 100 ;
+ Totalmem = ((unsigned long long) NumP * PgSz * Totalmem) / 100 ;
#else
fatal("Unable to determine page size or amount of available memory - please specify an absolute amount of memory.\n");
#endif
}
- debugmsg("totalmem = %lluk\n",totalmem>>10);
+ debugmsg("Totalmem = %lluk\n",Totalmem>>10);
} else if (!argcheck("-b",argv,&c,argc)) {
long nb = strtol(argv[c],0,0);
if ((nb == 0) && (errno == EINVAL)) {
@@ -1692,19 +1931,7 @@
fatal("cannot determine blocksize of device (unsupported by OS)\n");
#endif
} else if (!argcheck("-v",argv,&c,argc)) {
- int verb;
- if (c == argc)
- fatal("missing argument for option -v\n");
- verb = strtol(argv[c],0,0);
- if ((verb == 0) && (errno == EINVAL))
- errormsg("invalid argument to option -v: \"%s\"\n",argv[c]);
- else
- Verbose = verb;
- debugmsg("Verbose = %d\n",Verbose);
-#if defined(_SC_AVPHYS_PAGES) && defined(_SC_PAGESIZE) && !defined(__CYGWIN__)
- debugmsg("total # of phys pages: %li (pagesize %li)\n",nump,pgsz);
-#endif
- debugmsg("default buffer set to %d blocks of %lld bytes\n",Numblocks,Blocksize);
+ /* has been parsed already */
} else if (!argcheck("-u",argv,&c,argc)) {
long p = strtol(argv[c],0,0);
@@ -1807,7 +2034,10 @@
debugmsg("overwrite = 1\n");
} else if (!strcmp("-q",argv[c])) {
debugmsg("disabling display of status\n");
- Status = 0;
+ Quiet = 1;
+ } else if (!strcmp("-Q",argv[c])) {
+ debugmsg("disabling logging of status\n");
+ StatusLog = 0;
} else if (!strcmp("-c",argv[c])) {
debugmsg("enabling full synchronous I/O\n");
OptSync = O_SYNC;
@@ -1820,15 +2050,13 @@
errormsg("invalid argument to option -a: \"%s\"\n",argv[c]);
else {
Autoloader = 1;
- Autoload_time = at;
+ AutoloadTime = at;
}
- if (at && timeout && timeout <= Autoload_time)
- fatal("autoload time must be smaller than watchdog timeout\n");
- debugmsg("Autoloader time = %d\n",Autoload_time);
+ debugmsg("Autoloader time = %d\n",AutoloadTime);
} else if (!argcheck("-A",argv,&c,argc)) {
Autoloader = 1;
- Autoload_cmd = argv[c];
- debugmsg("Autoloader command = \"%s\"\n", Autoload_cmd);
+ AutoloadCmd = argv[c];
+ debugmsg("Autoloader command = \"%s\"\n", AutoloadCmd);
} else if (!argcheck("-P",argv,&c,argc)) {
if (1 != sscanf(argv[c],"%lf",&StartWrite))
StartWrite = 0;
@@ -1852,10 +2080,10 @@
warning("POSIX memory locking is unsupported on this system.\n");
#endif
} else if (!argcheck("-W",argv,&c,argc)) {
- timeout = strtol(argv[c],0,0);
- if (timeout <= 0)
+ Timeout = strtol(argv[c],0,0);
+ if (Timeout <= 0)
fatal("invalid argument to option -W\n");
- if (timeout <= Autoload_time)
+ if (Timeout <= AutoloadTime)
fatal("timeout must be bigger than autoload time\n");
} else if (!strcmp("--direct",argv[c])) {
#ifdef O_DIRECT
@@ -1908,20 +2136,22 @@
}
/* consistency check for options */
+ if (AutoloadTime && Timeout && Timeout <= AutoloadTime)
+ fatal("autoload time must be smaller than watchdog timeout\n");
if (optBset&optSset&optMset) {
- if (Numblocks * Blocksize != totalmem)
+ if (Numblocks * Blocksize != Totalmem)
fatal("inconsistent options: blocksize * number of blocks != totalsize!\n");
} else if (((!optBset)&optSset&optMset) || (optMset&(!optBset)&(!optSset))) {
- if (totalmem <= Blocksize)
+ if (Totalmem <= Blocksize)
fatal("total memory must be larger than block size\n");
- Numblocks = totalmem / Blocksize;
- infomsg("Numblocks = %llu, Blocksize = %llu, totalmem = %llu\n",(unsigned long long)Numblocks,(unsigned long long)Blocksize,(unsigned long long)totalmem);
+ Numblocks = Totalmem / Blocksize;
+ infomsg("Numblocks = %llu, Blocksize = %llu, Totalmem = %llu\n",(unsigned long long)Numblocks,(unsigned long long)Blocksize,(unsigned long long)Totalmem);
} else if (optBset&!optSset&optMset) {
if (Blocksize == 0)
fatal("blocksize must be greater than 0\n");
- if (totalmem <= Blocksize)
+ if (Totalmem <= Blocksize)
fatal("total memory must be larger than block size\n");
- Blocksize = totalmem / Numblocks;
+ Blocksize = Totalmem / Numblocks;
infomsg("blocksize = %llu\n",(unsigned long long)Blocksize);
}
if ((StartRead < 1) && (StartWrite > 0))
@@ -2021,6 +2251,10 @@
Buffer[0] = (char *) valloc(Blocksize * Numblocks);
if (Buffer[0] == 0)
fatal("Could not allocate enough memory (%lld requested): %s\n",(unsigned long long)Blocksize * Numblocks,strerror(errno));
+#ifdef MADV_DONTFORK
+ if (-1 == madvise(Buffer[0],Blocksize * Numblocks, MADV_DONTFORK))
+ warningmsg("unable to advise memory handling of buffer: %s\n",strerror(errno));
+#endif
}
for (c = 1; c < Numblocks; c++) {
Buffer[c] = Buffer[0] + Blocksize * c;
@@ -2092,7 +2326,7 @@
}
debugmsg("checking if we have a controlling terminal...\n");
- sig.sa_sigaction = SIG_IGN;
+ sig.sa_handler = SIG_IGN;
err = sigaction(SIGTTIN,&sig,0);
assert(err == 0);
fl = fcntl(STDERR_FILENO,F_GETFL);
@@ -2193,6 +2427,8 @@
"This can result in incorrect written data when\n"
"using multiple volumes. Continue at your own risk!\n");
#endif
+ if (((Verbose < 4) || (StatusLog == 0)) && (Quiet != 0))
+ Status = 0;
if (Status) {
if (-1 == pipe(TermQ))
fatal("could not create termination pipe: %s\n",strerror(errno));
@@ -2202,8 +2438,8 @@
}
err = pthread_create(&dest->thread,0,&outputThread,dest);
assert(0 == err);
- if (timeout) {
- err = pthread_create(&Watchdog,0,&watchdogThread,(void*)timeout);
+ if (Timeout) {
+ err = pthread_create(&Watchdog,0,&watchdogThread,(void*)0);
assert(0 == err);
}
if (Status) {
@@ -2223,7 +2459,7 @@
assert(err == 1);
}
}
- if (timeout) {
+ if (Timeout) {
err = pthread_cancel(Watchdog);
assert(err == 0);
}
++++++ mbuffer-fix_pointer_cast.patch ++++++
--- /var/tmp/diff_new_pack.3Sd9iS/_old 2014-04-22 10:06:13.000000000 +0200
+++ /var/tmp/diff_new_pack.3Sd9iS/_new 2014-04-22 10:06:13.000000000 +0200
@@ -1,6 +1,6 @@
---- mbuffer.c.orig 2010-03-27 22:04:34.000000000 +0100
-+++ mbuffer.c 2010-03-27 22:06:14.000000000 +0100
-@@ -47,6 +47,7 @@
+--- mbuffer-20140310.orig/mbuffer.c
++++ mbuffer-20140310/mbuffer.c
+@@ -48,6 +48,7 @@ typedef int caddr_t;
#include <sys/time.h>
#include <termios.h>
#include <unistd.h>
@@ -8,7 +8,7 @@
#ifdef __FreeBSD__
-@@ -1027,7 +1028,7 @@
+@@ -1111,7 +1112,7 @@ static int requestOutputVolume(int out,
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package openstack-heat for openSUSE:Factory checked in at 2014-04-22 07:52:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openstack-heat (Old)
and /work/SRC/openSUSE:Factory/.openstack-heat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-heat"
Changes:
--------
--- /work/SRC/openSUSE:Factory/openstack-heat/openstack-heat.changes 2014-04-14 10:54:55.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.openstack-heat.new/openstack-heat.changes 2014-04-22 07:52:05.000000000 +0200
@@ -1,0 +2,30 @@
+Thu Apr 17 12:51:48 UTC 2014 - dmueller(a)suse.com
+
+- update to 2014.1:
+ * no change
+
+-------------------------------------------------------------------
+Mon Apr 14 08:57:22 UTC 2014 - dmueller(a)suse.com
+
+- update to 2014.1.rc2:
+ * Cherry pick oslo-incubator db fixes
+ * Add handle_update to VolumeAttachment
+ * Ensure outputs are resolved for adopted stacks
+ * Pass and use the environment in validate_template
+ * Cherry pick oslo rpc HA fixes
+ * Check top-level sections when parsing a template
+ * Fix timeout for stack actions
+ * Credentials for native heat os-collect-config polling
+ * Allow for stack users in _authorize_stack_user
+ * Fix Jenkins translation jobs
+ * Add a resource_facade intrinsic function to HOT
+ * Resolve data from Resource Facade
+ * Add a default DeletionPolicy for Fn::ResourceFacade
+ * Always answer empty list if deployments not ready
+ * Ensure parameter timeout_mins available in update
+ * Insertion port id in address attribute of server
+ * Disable check_uptodate.sh check in pep8
+ * Updated from global requirements
+
+
+-------------------------------------------------------------------
Old:
----
heat-2014.1.rc1.tar.gz
New:
----
heat-2014.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openstack-heat-doc.spec ++++++
--- /var/tmp/diff_new_pack.APTPIy/_old 2014-04-22 07:52:06.000000000 +0200
+++ /var/tmp/diff_new_pack.APTPIy/_new 2014-04-22 07:52:06.000000000 +0200
@@ -19,7 +19,7 @@
%define component heat
Name: openstack-%{component}-doc
-Version: 2014.1.rc1
+Version: 2014.1
Release: 0
Summary: OpenStack Orchestration (Heat) - Documentation
License: Apache-2.0
++++++ openstack-heat.spec ++++++
--- /var/tmp/diff_new_pack.APTPIy/_old 2014-04-22 07:52:06.000000000 +0200
+++ /var/tmp/diff_new_pack.APTPIy/_new 2014-04-22 07:52:06.000000000 +0200
@@ -21,7 +21,7 @@
%define username %{component}
Name: openstack-%{component}
-Version: 2014.1.rc1
+Version: 2014.1
Release: 0
Summary: Openstack Orchestration (Heat)
License: Apache-2.0
@@ -73,32 +73,32 @@
Group: Development/Languages/Python
Requires: python >= 2.6.8
Requires: python-Babel >= 1.3
-Requires: python-PasteDeploy >= 1.5.0
-Requires: python-PyYAML >= 3.1.0
+Requires: python-PasteDeploy >= 1.5
+Requires: python-PyYAML >= 3.1
Requires: python-Routes >= 1.12.3
Requires: python-SQLAlchemy >= 0.7.8
Requires: python-WebOb >= 1.2.3
Requires: python-argparse
Requires: python-ceilometerclient >= 1.0.6
Requires: python-cinderclient >= 1.0.6
-Requires: python-eventlet >= 0.13.0
+Requires: python-eventlet >= 0.13
Requires: python-greenlet >= 0.3.2
Requires: python-heatclient >= 0.2.3
Requires: python-httplib2 >= 0.7.5
-Requires: python-iso8601 >= 0.1.8
-Requires: python-keystoneclient >= 0.6.0
+Requires: python-iso8601 >= 0.1.9
+Requires: python-keystoneclient >= 0.7
Requires: python-kombu >= 2.4.8
Requires: python-lockfile >= 0.8
Requires: python-lxml >= 2.3
Requires: python-netaddr >= 0.7.6
Requires: python-neutronclient >= 2.3.4
-Requires: python-novaclient >= 2.15.0
-Requires: python-oslo.config >= 1.2.0
-Requires: python-paramiko >= 1.9.0
+Requires: python-novaclient >= 2.17
+Requires: python-oslo.config >= 1.2
+Requires: python-paramiko >= 1.9
Requires: python-pbr >= 0.6
Requires: python-pycrypto >= 2.6
Requires: python-requests >= 1.1
-Requires: python-six >= 1.4.1
+Requires: python-six >= 1.5.2
Requires: python-sqlalchemy-migrate >= 0.8.2
Requires: python-troveclient >= 1.0.3
@@ -145,10 +145,10 @@
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
Requires: python-discover
%endif
-Requires: python-glanceclient >= 0.9.0
-Requires: python-mock >= 1.0
+Requires: python-glanceclient >= 0.9
+Requires: python-mock >= 1
Requires: python-mox >= 0.5.3
-Requires: python-paramiko >= 1.9.0
+Requires: python-paramiko >= 1.9
Requires: python-testrepository >= 0.0.18
Requires: python-testscenarios >= 0.4
Requires: python-testtools >= 0.9.34
++++++ heat-2014.1.rc1.tar.gz -> heat-2014.1.tar.gz ++++++
++++ 39587 lines of diff (skipped)
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package util-linux for openSUSE:Factory checked in at 2014-04-22 07:49:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/util-linux (Old)
and /work/SRC/openSUSE:Factory/.util-linux.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "util-linux"
Changes:
--------
--- /work/SRC/openSUSE:Factory/util-linux/util-linux.changes 2014-04-06 09:56:40.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.util-linux.new/util-linux.changes 2014-04-22 07:49:59.000000000 +0200
@@ -1,0 +2,19 @@
+Thu Apr 17 22:43:31 CEST 2014 - sbrabec(a)suse.cz
+
+- Enable socket activation needed by systemd service (bnc#872807).
+
+-------------------------------------------------------------------
+Fri Apr 11 16:45:03 CEST 2014 - sbrabec(a)suse.cz
+
+- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic
+ (util-linux-libblkid-ext-probe.patch, bnc#864703).
+
+-------------------------------------------------------------------
+Fri Apr 11 16:27:11 CEST 2014 - hare(a)suse.de
+
+- Abort blkid probing on I/O errors (bnc#859062,
+ blkid-stop-scanning-on-I-O-error.patch,
+ blkid-convert-superblocks-to-new-calling-convention.patch,
+ http://www.spinics.net/lists/util-linux-ng/msg08976.html)
+
+-------------------------------------------------------------------
New:
----
blkid-convert-superblocks-to-new-calling-convention.patch
blkid-stop-scanning-on-I-O-error.patch
util-linux-libblkid-ext-probe.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.ZOW7Jm/_old 2014-04-22 07:50:00.000000000 +0200
+++ /var/tmp/diff_new_pack.ZOW7Jm/_new 2014-04-22 07:50:00.000000000 +0200
@@ -124,6 +124,13 @@
Patch23: util-linux-ng-2.19.1-barrier_documentation.patch
# PATCH-FEATURE-SLES util-linux-lscpu-improve-hypervisor-detection.patch fate310255 puzel(a)novell.com -- Improve hypervisor detection.
Patch24: util-linux-lscpu-improve-hypervisor-detection.patch
+# PATH-FIX-SLES blkid-stop-scanning-on-I-O-error.patch bnc859062 hare(a)suse.de -- Abort blkid probing on I/O errors
+Patch30: blkid-stop-scanning-on-I-O-error.patch
+# PATH-FIX-SLES lkid-convert-superblocks-to-new-calling-convention.patch bnc859062 hare(a)suse.de -- convert blkid probing functions to new calling sequence
+Patch31: blkid-convert-superblocks-to-new-calling-convention.patch
+# PATH-FIX-UPSTREAM util-linux-libblkid-ext-probe.patch bnc864703 sbrabec(a)suse.cz -- libblkid: Drop the broken ext2/ext3/ext4 discrimination logic.
+Patch32: util-linux-libblkid-ext-probe.patch
+
##
## klogconsole
##
@@ -256,6 +263,9 @@
%patch21 -p1
%patch23 -p1
%patch24 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
#
# setctsid
cp -p %{S:22} %{S:23} .
@@ -311,6 +321,7 @@
--enable-new-mount \
--enable-login-utils \
--enable-tunelp \
+ --enable-socket-activation \
%if %{with enable_last}
--enable-last \
%else
++++++ blkid-convert-superblocks-to-new-calling-convention.patch ++++++
++++ 2268 lines (skipped)
++++++ blkid-stop-scanning-on-I-O-error.patch ++++++
>From 65245d440656a8df4352f9a5b9ec047bf4b6a663 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare(a)suse.de>
Date: Tue, 21 Jan 2014 09:16:46 +0100
Subject: [PATCH] blkid: stop scanning on I/O error
Whenever we fail to read from a device it's pointless to
continue with probing; we should be failing immediately.
Otherwise the system will continue logging I/O errors.
This patch updates the probe functions to return -1
on error and 1 if not found.
Signed-off-by: Hannes Reinecke <hare(a)suse.de>
---
libblkid/src/partitions/partitions.c | 13 +++++++++----
libblkid/src/probe.c | 13 +++++++++++--
libblkid/src/superblocks/superblocks.c | 13 ++++++++++---
3 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/libblkid/src/partitions/partitions.c b/libblkid/src/partitions/partitions.c
index 6c915d9..98baece 100644
--- a/libblkid/src/partitions/partitions.c
+++ b/libblkid/src/partitions/partitions.c
@@ -540,7 +540,8 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id,
if (pr->size <= 0 || (id->minsz && id->minsz > pr->size))
goto nothing; /* the device is too small */
- if (blkid_probe_get_idmag(pr, id, &off, &mag))
+ rc = blkid_probe_get_idmag(pr, id, &off, &mag);
+ if (rc != 0)
goto nothing;
/* final check by probing function */
@@ -548,12 +549,13 @@ static int idinfo_probe(blkid_probe pr, const struct blkid_idinfo *id,
DBG(LOWPROBE, blkid_debug(
"%s: ---> call probefunc()", id->name));
rc = id->probefunc(pr, mag);
- if (rc == -1) {
+ if (rc != 0) {
/* reset after error */
reset_partlist(blkid_probe_get_partlist(pr));
if (chn && !chn->binary)
blkid_probe_chain_reset_vals(pr, chn);
- DBG(LOWPROBE, blkid_debug("%s probefunc failed", id->name));
+ DBG(LOWPROBE, blkid_debug("%s probefunc failed, rc %d",
+ id->name, rc));
}
if (rc == 0 && mag && chn && !chn->binary)
rc = blkid_probe_set_magic(pr, off, mag->len,
@@ -599,7 +601,10 @@ static int partitions_probe(blkid_probe pr, struct blkid_chain *chn)
continue;
/* apply checks from idinfo */
- if (idinfo_probe(pr, idinfos[i], chn) != 0)
+ rc = idinfo_probe(pr, idinfos[i], chn);
+ if (rc < 0)
+ return rc;
+ if (rc > 0)
continue;
name = idinfos[i]->name;
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 4b0c997..452c743 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -569,13 +569,17 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
if (!bf) {
ssize_t ret;
- if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0)
+ if (blkid_llseek(pr->fd, pr->off + off, SEEK_SET) < 0) {
+ errno = 0;
return NULL;
+ }
/* allocate info and space for data by why call */
bf = calloc(1, sizeof(struct blkid_bufinfo) + len);
- if (!bf)
+ if (!bf) {
+ errno = 0;
return NULL;
+ }
bf->data = ((unsigned char *) bf) + sizeof(struct blkid_bufinfo);
bf->len = len;
@@ -587,7 +591,10 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
ret = read(pr->fd, bf->data, len);
if (ret != (ssize_t) len) {
+ DBG(LOWPROBE, blkid_debug("\tbuffer read: return %d error %d", ret, errno));
free(bf);
+ if (ret >= 0 || errno != EIO)
+ errno = 0;
return NULL;
}
list_add_tail(&bf->bufs, &pr->buffers);
@@ -794,6 +801,8 @@ int blkid_probe_get_idmag(blkid_probe pr, const struct blkid_idinfo *id,
off = (mag->kboff + (mag->sboff >> 10)) << 10;
buf = blkid_probe_get_buffer(pr, off, 1024);
+ if (!buf && errno)
+ return -1;
if (buf && !memcmp(mag->magic,
buf + (mag->sboff & 0x3ff), mag->len)) {
DBG(LOWPROBE, blkid_debug("\tmagic sboff=%u, kboff=%ld",
diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c
index 565daf2..ad93b4e 100644
--- a/libblkid/src/superblocks/superblocks.c
+++ b/libblkid/src/superblocks/superblocks.c
@@ -380,15 +380,22 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn)
DBG(LOWPROBE, blkid_debug("[%zd] %s:", i, id->name));
- if (blkid_probe_get_idmag(pr, id, &off, &mag))
+ rc = blkid_probe_get_idmag(pr, id, &off, &mag);
+ if (rc < 0)
+ break;
+ if (rc > 0)
continue;
/* final check by probing function */
if (id->probefunc) {
DBG(LOWPROBE, blkid_debug("\tcall probefunc()"));
- if (id->probefunc(pr, mag) != 0) {
+ rc = id->probefunc(pr, mag);
+ if (rc != 0) {
blkid_probe_chain_reset_vals(pr, chn);
- continue;
+ if (rc < 0)
+ break;
+ else
+ continue;
}
}
--
1.8.1.4
++++++ util-linux-libblkid-ext-probe.patch ++++++
This is a backport of patch from master branch.
commit a1ca32fb3862ccac7275d6b342805b6d99f20e39
Author: Lukas Czerner <lczerner(a)redhat.com>
Date: Tue Dec 3 16:24:44 2013 +0100
libblkid: Identify extN file system properly
Currently when trying to identify extN file system we're playing games
with searching for kernel modules and parsing /proc/filesystem. All of
this just because ext4 module can be used to mount ext3 and ext2 file
systems on recent kernel and also because of ext4dev.
However all of this is not necessary. Ext4 module which does support
mounting ext2 and ext3 file system is able to recognize and mount ext2
and ext3 type so there is no need to disguise it and ext4dev should only
be ever used for testing and not as fallback when other modules are
missing (use -t instead).
This also introduces a bug when in situation that we only have ext4
modules with ext2/ext3 support which is not loaded and we try to mount
ext2 file system we will mount it incorrectly as ext4. This will not
happen if the ext4 module is already loaded.
With this patch we remove all the unnecessary checks and return the real
type of the file system which is on the device. This fixes the issue.
However on the kernel which was not compiled with EXT4_USE_FOR_EXT23
support one would have to provide file system type (-t) to be able to
mount the file system with ext4 driver.
Signed-off-by: Lukas Czerner <lczerner(a)redhat.com>
Signed-off-by: Karel Zak <kzak(a)redhat.com>
Index: util-linux-2.24.1/libblkid/src/superblocks/ext.c
===================================================================
--- util-linux-2.24.1.orig/libblkid/src/superblocks/ext.c
+++ util-linux-2.24.1/libblkid/src/superblocks/ext.c
@@ -18,7 +18,6 @@
#endif
#include <time.h>
-#include "linux_version.h"
#include "superblocks.h"
struct ext2_super_block {
@@ -132,140 +131,11 @@ struct ext2_super_block {
#define EXT3_FEATURE_RO_COMPAT_UNSUPPORTED ~EXT3_FEATURE_RO_COMPAT_SUPP
/*
- * Check to see if a filesystem is in /proc/filesystems.
- * Returns 1 if found, 0 if not
- */
-static int fs_proc_check(const char *fs_name)
-{
- FILE *f;
- char buf[80], *cp, *t;
-
- f = fopen("/proc/filesystems", "r" UL_CLOEXECSTR);
- if (!f)
- return 0;
- while (!feof(f)) {
- if (!fgets(buf, sizeof(buf), f))
- break;
- cp = buf;
- if (!isspace(*cp)) {
- while (*cp && !isspace(*cp))
- cp++;
- }
- while (*cp && isspace(*cp))
- cp++;
- if ((t = strchr(cp, '\n')) != NULL)
- *t = 0;
- if ((t = strchr(cp, '\t')) != NULL)
- *t = 0;
- if ((t = strchr(cp, ' ')) != NULL)
- *t = 0;
- if (!strcmp(fs_name, cp)) {
- fclose(f);
- return 1;
- }
- }
- fclose(f);
- return (0);
-}
-
-/*
- * Check to see if a filesystem is available as a module
- * Returns 1 if found, 0 if not
- */
-static int check_for_modules(const char *fs_name)
-{
-#ifdef __linux__
- struct utsname uts;
- FILE *f;
- char buf[1024], *cp;
- int namesz;
-
- if (uname(&uts))
- return 0;
- snprintf(buf, sizeof(buf), "/lib/modules/%s/modules.dep", uts.release);
-
- f = fopen(buf, "r" UL_CLOEXECSTR);
- if (!f)
- return 0;
-
- namesz = strlen(fs_name);
-
- while (!feof(f)) {
- if (!fgets(buf, sizeof(buf), f))
- break;
- if ((cp = strchr(buf, ':')) != NULL)
- *cp = 0;
- else
- continue;
- if ((cp = strrchr(buf, '/')) == NULL)
- continue;
- cp++;
-
- if (!strncmp(cp, fs_name, namesz) &&
- (!strcmp(cp + namesz, ".ko") ||
- !strcmp(cp + namesz, ".ko.gz"))) {
- fclose(f);
- return 1;
- }
- }
- fclose(f);
-#endif /* __linux__ */
- return 0;
-}
-
-/*
* Starting in 2.6.29, ext4 can be used to support filesystems
* without a journal.
*/
#define EXT4_SUPPORTS_EXT2 KERNEL_VERSION(2, 6, 29)
-static int system_supports_ext2(void)
-{
- static time_t last_check = 0;
- static int ret = -1;
- time_t now = time(0);
-
- if (ret != -1 || (now - last_check) < 5)
- return ret;
- last_check = now;
- ret = (fs_proc_check("ext2") || check_for_modules("ext2"));
- return ret;
-}
-
-static int system_supports_ext4(void)
-{
- static time_t last_check = 0;
- static int ret = -1;
- time_t now = time(0);
-
- if (ret != -1 || (now - last_check) < 5)
- return ret;
- last_check = now;
- ret = (fs_proc_check("ext4") || check_for_modules("ext4"));
- return ret;
-}
-
-static int system_supports_ext4dev(void)
-{
- static time_t last_check = 0;
- static int ret = -1;
- time_t now = time(0);
-
- if (ret != -1 || (now - last_check) < 5)
- return ret;
- last_check = now;
- ret = (fs_proc_check("ext4dev") || check_for_modules("ext4dev"));
- return ret;
-}
-
-static int system_supports_ext4_ext2(void)
-{
-#ifdef __linux__
- return get_linux_version() >= EXT4_SUPPORTS_EXT2;
-#else
- return 0;
-#endif
-}
/*
* reads superblock and returns:
* fc = feature_compat
@@ -357,15 +227,6 @@ static int probe_ext2(blkid_probe pr,
(fi & EXT2_FEATURE_INCOMPAT_UNSUPPORTED))
return 1;
- /*
- * If ext2 is not present, but ext4 or ext4dev are, then
- * disclaim we are ext2
- */
- if (!system_supports_ext2() &&
- (system_supports_ext4() || system_supports_ext4dev()) &&
- system_supports_ext4_ext2())
- return 1;
-
ext_get_info(pr, 2, es);
return 0;
}
@@ -408,34 +269,9 @@ static int probe_ext4dev(blkid_probe pr,
if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return 1;
- /*
- * If the filesystem does not have a journal and ext2 and ext4
- * is not present, then force this to be detected as an
- * ext4dev filesystem.
- */
- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
- !system_supports_ext2() && !system_supports_ext4() &&
- system_supports_ext4dev() &&
- system_supports_ext4_ext2())
- goto force_ext4dev;
-
- /*
- * If the filesystem is marked as OK for use by in-development
- * filesystem code, but ext4dev is not supported, and ext4 is,
- * then don't call ourselves ext4dev, since we should be
- * detected as ext4 in that case.
- *
- * If the filesystem is marked as in use by production
- * filesystem, then it can only be used by ext4 and NOT by
- * ext4dev, so always disclaim we are ext4dev in that case.
- */
- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) {
- if (!system_supports_ext4dev() && system_supports_ext4())
- return 1;
- } else
+ if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS))
return 1;
-force_ext4dev:
ext_get_info(pr, 4, es);
return 0;
}
@@ -454,22 +290,11 @@ static int probe_ext4(blkid_probe pr,
if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
return 1;
- /*
- * If the filesystem does not have a journal and ext2 is not
- * present, then force this to be detected as an ext2
- * filesystem.
- */
- if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
- !system_supports_ext2() && system_supports_ext4() &&
- system_supports_ext4_ext2())
- goto force_ext4;
-
/* Ext4 has at least one feature which ext3 doesn't understand */
if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
!(fi & EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
return 1;
-force_ext4:
/*
* If the filesystem is a OK for use by in-development
* filesystem code, and ext4dev is supported or ext4 is not
@@ -480,10 +305,8 @@ force_ext4:
* filesystem, then it can only be used by ext4 and NOT by
* ext4dev.
*/
- if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS) {
- if (system_supports_ext4dev() || !system_supports_ext4())
- return 1;
- }
+ if (le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)
+ return 1;
ext_get_info(pr, 4, es);
return 0;
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package pam for openSUSE:Factory checked in at 2014-04-22 07:49:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pam (Old)
and /work/SRC/openSUSE:Factory/.pam.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pam"
Changes:
--------
--- /work/SRC/openSUSE:Factory/pam/pam.changes 2014-04-09 13:15:15.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.pam.new/pam.changes 2014-04-22 07:49:16.000000000 +0200
@@ -1,0 +2,6 @@
+Wed Apr 9 16:02:17 UTC 2014 - ckornacker(a)suse.com
+
+- Fix CVE-2014-2583: pam_timestamp path injection (bnc#870433)
+ bug-870433_pam_timestamp-fix-directory-traversal.patch
+
+-------------------------------------------------------------------
New:
----
bug-870433_pam_timestamp-fix-directory-traversal.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pam.spec ++++++
--- /var/tmp/diff_new_pack.hhrxbV/_old 2014-04-22 07:49:16.000000000 +0200
+++ /var/tmp/diff_new_pack.hhrxbV/_new 2014-04-22 07:49:16.000000000 +0200
@@ -55,6 +55,7 @@
Patch1: Linux-PAM-git-20140127.diff
Patch2: pam_loginuid-log_write_errors.diff
Patch3: pam_xauth-sigpipe.diff
+Patch4: bug-870433_pam_timestamp-fix-directory-traversal.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -102,6 +103,7 @@
%patch1 -p2
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
export CFLAGS="%optflags -DNDEBUG"
++++++ bug-870433_pam_timestamp-fix-directory-traversal.patch ++++++
>From 9dcead87e6d7f66d34e7a56d11a30daca367dffb Mon Sep 17 00:00:00 2001
From: "Dmitry V. Levin" <ldv(a)altlinux.org>
Date: Wed, 26 Mar 2014 22:17:23 +0000
Subject: [PATCH] pam_timestamp: fix potential directory traversal issue
(ticket #27)
pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of
the timestamp pathname it creates, so extra care should be taken to
avoid potential directory traversal issues.
* modules/pam_timestamp/pam_timestamp.c (check_tty): Treat
"." and ".." tty values as invalid.
(get_ruser): Treat "." and ".." ruser values, as well as any ruser
value containing '/', as invalid.
Fixes CVE-2014-2583.
Reported-by: Sebastian Krahmer <krahmer(a)suse.de>
---
modules/pam_timestamp/pam_timestamp.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c
index 5193733..b3f08b1 100644
--- a/modules/pam_timestamp/pam_timestamp.c
+++ b/modules/pam_timestamp/pam_timestamp.c
@@ -158,7 +158,7 @@ check_tty(const char *tty)
tty = strrchr(tty, '/') + 1;
}
/* Make sure the tty wasn't actually a directory (no basename). */
- if (strlen(tty) == 0) {
+ if (!strlen(tty) || !strcmp(tty, ".") || !strcmp(tty, "..")) {
return NULL;
}
return tty;
@@ -243,6 +243,17 @@ get_ruser(pam_handle_t *pamh, char *ruserbuf, size_t ruserbuflen)
if (pwd != NULL) {
ruser = pwd->pw_name;
}
+ } else {
+ /*
+ * This ruser is used by format_timestamp_name as a component
+ * of constructed timestamp pathname, so ".", "..", and '/'
+ * are disallowed to avoid potential path traversal issues.
+ */
+ if (!strcmp(ruser, ".") ||
+ !strcmp(ruser, "..") ||
+ strchr(ruser, '/')) {
+ ruser = NULL;
+ }
}
if (ruser == NULL || strlen(ruser) >= ruserbuflen) {
*ruserbuf = '\0';
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0
Hello community,
here is the log from the commit of package glibc for openSUSE:Factory checked in at 2014-04-22 07:47:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/glibc (Old)
and /work/SRC/openSUSE:Factory/.glibc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "glibc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/glibc/glibc-testsuite.changes 2014-04-08 17:05:53.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.glibc.new/glibc-testsuite.changes 2014-04-22 07:47:57.000000000 +0200
@@ -1,0 +2,18 @@
+Thu Apr 17 09:13:32 UTC 2014 - schwab(a)suse.de
+
+- ibm-long-double-frexpl.patch: Correct IBM long double frexpl
+ (bnc#872573, BZ #16740, BZ #16619)
+
+-------------------------------------------------------------------
+Tue Apr 15 14:23:54 UTC 2014 - schwab(a)suse.de
+
+- ibm-long-double-math.patch: Remove faulty assembler implementations of
+ ceil, nearbyintl, roundl for IBM long double (bnc#873457, BZ #16701, BZ
+ #16706, BZ #16707)
+
+-------------------------------------------------------------------
+Tue Apr 15 11:00:59 UTC 2014 - aj(a)suse.com
+
+- Use /run for nscd instead of /var/run.
+
+-------------------------------------------------------------------
glibc-utils.changes: same change
glibc.changes: same change
New:
----
ibm-long-double-frexpl.patch
ibm-long-double-math.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ glibc-testsuite.spec ++++++
--- /var/tmp/diff_new_pack.Q0Fckt/_old 2014-04-22 07:47:58.000000000 +0200
+++ /var/tmp/diff_new_pack.Q0Fckt/_new 2014-04-22 07:47:58.000000000 +0200
@@ -248,6 +248,12 @@
Patch1007: ppc64-copysign.patch
# PATCH-FIX-UPSTREAM Correct IBM long double nextafterl (BZ #16739)
Patch1008: nextafterl-ibm-ldouble.patch
+# PATCH-FIX-UPSTREAM Remove faulty assembler implementations for IBM long double (BZ #16701, BZ #16706, BZ #16707)
+Patch1009: ibm-long-double-math.patch
+# PATCH-FIX-UPSTREAM Correct IBM long double frexpl (BZ #16740, BZ #16619)
+Patch1010: ibm-long-double-frexpl.patch
+# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629)
+Patch1011: aarch64-setcontext.patch
###
# Patches awaiting upstream approval
@@ -262,8 +268,6 @@
Patch2003: abort-no-flush.patch
# PATCH-FIX-UPSTREAM Properly handle forced elision in pthread_mutex_trylock (BZ #16657)
Patch2004: pthread-mutex-trylock-elision.patch
-# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629)
-Patch2005: aarch64-setcontext.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages
@@ -473,13 +477,15 @@
%patch1006 -p1
%patch1007 -p1
%patch1008 -p1
+%patch1009 -p1
+%patch1010 -p1
+%patch1011 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
%patch2003 -p1
%patch2004 -p1
-%patch2005 -p1
%patch3000
@@ -887,9 +893,9 @@
cp nscd/nscd.conf %{buildroot}/etc
mkdir -p %{buildroot}/etc/init.d
ln -sf /sbin/service %{buildroot}/usr/sbin/rcnscd
-mkdir -p %{buildroot}/var/run/nscd
-touch %{buildroot}/var/run/nscd/{passwd,group,hosts,services,netgroup}
-touch %{buildroot}/var/run/nscd/{socket,nscd.pid}
+mkdir -p %{buildroot}/run/nscd
+touch %{buildroot}/run/nscd/{passwd,group,hosts,services,netgroup}
+touch %{buildroot}/run/nscd/{socket,nscd.pid}
#
# Create ld.so.conf
@@ -971,7 +977,7 @@
rm -f %{buildroot}/etc/*nscd* %{buildroot}%{_sbindir}/*nscd*
rm -rf %{buildroot}/usr/lib/systemd
rm -rf %{buildroot}/usr/lib/tmpfiles.d
-rm -rf %{buildroot}/var/run/nscd
+rm -rf %{buildroot}/run/nscd
%endif # i686
%endif # %{normal_build}
@@ -1021,7 +1027,7 @@
%pre -n nscd
getent group nscd >/dev/null || %{_sbindir}/groupadd -r nscd
-getent passwd nscd >/dev/null || %{_sbindir}/useradd -r -g nscd -c "User for nscd" -s /sbin/nologin -d /var/run/nscd nscd
+getent passwd nscd >/dev/null || %{_sbindir}/useradd -r -g nscd -c "User for nscd" -s /sbin/nologin -d /run/nscd nscd
%service_add_pre nscd.service
%preun -n nscd
@@ -1029,7 +1035,7 @@
%post -n nscd
%service_add_post nscd.service
-mkdir -p /var/run/nscd
+mkdir -p /run/nscd
# Previously we had nscd.socket, remove it
test -x /usr/bin/systemctl && /usr/bin/systemctl stop nscd.socket 2>/dev/null || :
test -x /usr/bin/systemctl && /usr/bin/systemctl disable nscd.socket 2>/dev/null || :
@@ -1274,14 +1280,14 @@
/usr/lib/systemd/system/nscd.service
%dir /usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d/nscd.conf
-%dir %attr(0755,root,root) %ghost /var/run/nscd
-%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
-%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/netgroup
+%dir %attr(0755,root,root) %ghost /run/nscd
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/nscd.pid
+%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/socket
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/passwd
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/group
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/hosts
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/services
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/netgroup
%endif # !i686
%if %{build_profile}
glibc-utils.spec: same change
++++++ glibc.spec ++++++
--- /var/tmp/diff_new_pack.Q0Fckt/_old 2014-04-22 07:47:58.000000000 +0200
+++ /var/tmp/diff_new_pack.Q0Fckt/_new 2014-04-22 07:47:58.000000000 +0200
@@ -248,6 +248,12 @@
Patch1007: ppc64-copysign.patch
# PATCH-FIX-UPSTREAM Correct IBM long double nextafterl (BZ #16739)
Patch1008: nextafterl-ibm-ldouble.patch
+# PATCH-FIX-UPSTREAM Remove faulty assembler implementations for IBM long double (BZ #16701, BZ #16706, BZ #16707)
+Patch1009: ibm-long-double-math.patch
+# PATCH-FIX-UPSTREAM Correct IBM long double frexpl (BZ #16740, BZ #16619)
+Patch1010: ibm-long-double-frexpl.patch
+# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629)
+Patch1011: aarch64-setcontext.patch
###
# Patches awaiting upstream approval
@@ -262,8 +268,6 @@
Patch2003: abort-no-flush.patch
# PATCH-FIX-UPSTREAM Properly handle forced elision in pthread_mutex_trylock (BZ #16657)
Patch2004: pthread-mutex-trylock-elision.patch
-# PATCH-FIX-UPSTREAM Fix aarch64 setcontext clobbering alternate signal stack (BZ #16629)
-Patch2005: aarch64-setcontext.patch
# Non-glibc patches
# PATCH-FIX-OPENSUSE Remove debianisms from manpages
@@ -473,13 +477,15 @@
%patch1006 -p1
%patch1007 -p1
%patch1008 -p1
+%patch1009 -p1
+%patch1010 -p1
+%patch1011 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
%patch2003 -p1
%patch2004 -p1
-%patch2005 -p1
%patch3000
@@ -887,9 +893,9 @@
cp nscd/nscd.conf %{buildroot}/etc
mkdir -p %{buildroot}/etc/init.d
ln -sf /sbin/service %{buildroot}/usr/sbin/rcnscd
-mkdir -p %{buildroot}/var/run/nscd
-touch %{buildroot}/var/run/nscd/{passwd,group,hosts,services,netgroup}
-touch %{buildroot}/var/run/nscd/{socket,nscd.pid}
+mkdir -p %{buildroot}/run/nscd
+touch %{buildroot}/run/nscd/{passwd,group,hosts,services,netgroup}
+touch %{buildroot}/run/nscd/{socket,nscd.pid}
#
# Create ld.so.conf
@@ -971,7 +977,7 @@
rm -f %{buildroot}/etc/*nscd* %{buildroot}%{_sbindir}/*nscd*
rm -rf %{buildroot}/usr/lib/systemd
rm -rf %{buildroot}/usr/lib/tmpfiles.d
-rm -rf %{buildroot}/var/run/nscd
+rm -rf %{buildroot}/run/nscd
%endif # i686
%endif # %{normal_build}
@@ -1021,7 +1027,7 @@
%pre -n nscd
getent group nscd >/dev/null || %{_sbindir}/groupadd -r nscd
-getent passwd nscd >/dev/null || %{_sbindir}/useradd -r -g nscd -c "User for nscd" -s /sbin/nologin -d /var/run/nscd nscd
+getent passwd nscd >/dev/null || %{_sbindir}/useradd -r -g nscd -c "User for nscd" -s /sbin/nologin -d /run/nscd nscd
%service_add_pre nscd.service
%preun -n nscd
@@ -1029,7 +1035,7 @@
%post -n nscd
%service_add_post nscd.service
-mkdir -p /var/run/nscd
+mkdir -p /run/nscd
# Previously we had nscd.socket, remove it
test -x /usr/bin/systemctl && /usr/bin/systemctl stop nscd.socket 2>/dev/null || :
test -x /usr/bin/systemctl && /usr/bin/systemctl disable nscd.socket 2>/dev/null || :
@@ -1274,14 +1280,14 @@
/usr/lib/systemd/system/nscd.service
%dir /usr/lib/tmpfiles.d
/usr/lib/tmpfiles.d/nscd.conf
-%dir %attr(0755,root,root) %ghost /var/run/nscd
-%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid
-%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/services
-%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/netgroup
+%dir %attr(0755,root,root) %ghost /run/nscd
+%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/nscd.pid
+%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/socket
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/passwd
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/group
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/hosts
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/services
+%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /run/nscd/netgroup
%endif # !i686
%if %{build_profile}
++++++ ibm-long-double-frexpl.patch ++++++
2014-04-16 Alan Modra <amodra(a)gmail.com>
[BZ #16740]
[BZ #16619]
* sysdeps/ieee754/ldbl-128ibm/s_frexpl.c (__frexpl): Rewrite.
* math/libm-test.inc (frexp_test_data): Add tests.
Index: glibc-2.19/math/libm-test.inc
===================================================================
--- glibc-2.19.orig/math/libm-test.inc
+++ glibc-2.19/math/libm-test.inc
@@ -8723,6 +8723,15 @@ static const struct test_f_f1_data frexp
TEST_fI_f1 (frexp, 12.8L, 0.8L, 4, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, -27.34L, -0.854375L, 5, NO_INEXACT_EXCEPTION),
+
+#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
+ TEST_fI_f1 (frexp, 1.0L-0x1p-106L, 1.0L-0x1p-106L, 0, NO_INEXACT_EXCEPTION),
+ TEST_fI_f1 (frexp, 1.0L, 0.5L, 1, NO_INEXACT_EXCEPTION),
+ TEST_fI_f1 (frexp, 1.0L+0x1p-105L, 0.5L+0x1p-106L, 1, NO_INEXACT_EXCEPTION),
+ TEST_fI_f1 (frexp, -1.0L+0x1p-106L, -1.0L+0x1p-106L, 0, NO_INEXACT_EXCEPTION),
+ TEST_fI_f1 (frexp, -1.0L, -0.5L, 1, NO_INEXACT_EXCEPTION),
+ TEST_fI_f1 (frexp, -1.0L-0x1p-105L, -0.5L-0x1p-106L, 1, NO_INEXACT_EXCEPTION),
+#endif
};
static void
Index: glibc-2.19/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
===================================================================
--- glibc-2.19.orig/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
+++ glibc-2.19/sysdeps/ieee754/ldbl-128ibm/s_frexpl.c
@@ -31,57 +31,115 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
#include <math_ldbl_opt.h>
-static const long double
-two107 = 162259276829213363391578010288128.0; /* 0x4670000000000000, 0 */
-
long double __frexpl(long double x, int *eptr)
{
- uint64_t hx, lx, ix, ixl;
- int64_t explo;
- double xhi, xlo;
-
- ldbl_unpack (x, &xhi, &xlo);
- EXTRACT_WORDS64 (hx, xhi);
- EXTRACT_WORDS64 (lx, xlo);
- ixl = 0x7fffffffffffffffULL&lx;
- ix = 0x7fffffffffffffffULL&hx;
- *eptr = 0;
- if(ix>=0x7ff0000000000000ULL||ix==0) return x; /* 0,inf,nan */
- if (ix<0x0010000000000000ULL) { /* subnormal */
- x *= two107;
- xhi = ldbl_high (x);
- EXTRACT_WORDS64 (hx, xhi);
- ix = hx&0x7fffffffffffffffULL;
- *eptr = -107;
+ uint64_t hx, lx, ix, ixl;
+ int64_t explo, expon;
+ double xhi, xlo;
+
+ ldbl_unpack (x, &xhi, &xlo);
+ EXTRACT_WORDS64 (hx, xhi);
+ EXTRACT_WORDS64 (lx, xlo);
+ ixl = 0x7fffffffffffffffULL & lx;
+ ix = 0x7fffffffffffffffULL & hx;
+ expon = 0;
+ if (ix >= 0x7ff0000000000000ULL || ix == 0)
+ {
+ /* 0,inf,nan. */
+ *eptr = expon;
+ return x;
+ }
+ expon = ix >> 52;
+ if (expon == 0)
+ {
+ /* Denormal high double, the low double must be 0.0. */
+ int cnt;
+
+ /* Normalize. */
+ if (sizeof (ix) == sizeof (long))
+ cnt = __builtin_clzl (ix);
+ else if ((ix >> 32) != 0)
+ cnt = __builtin_clzl ((long) (ix >> 32));
+ else
+ cnt = __builtin_clzl ((long) ix) + 32;
+ cnt = cnt - 12;
+ expon -= cnt;
+ ix <<= cnt + 1;
+ }
+ expon -= 1022;
+ ix &= 0x000fffffffffffffULL;
+ hx &= 0x8000000000000000ULL;
+ hx |= (1022LL << 52) | ix;
+
+ if (ixl != 0)
+ {
+ /* If the high double is an exact power of two and the low
+ double has the opposite sign, then the exponent calculated
+ from the high double is one too big. */
+ if (ix == 0
+ && (int64_t) (hx ^ lx) < 0)
+ {
+ hx += 1L << 52;
+ expon -= 1;
+ }
+
+ explo = ixl >> 52;
+ if (explo == 0)
+ {
+ /* The low double started out as a denormal. Normalize its
+ mantissa and adjust the exponent. */
+ int cnt;
+
+ if (sizeof (ixl) == sizeof (long))
+ cnt = __builtin_clzl (ixl);
+ else if ((ixl >> 32) != 0)
+ cnt = __builtin_clzl ((long) (ixl >> 32));
+ else
+ cnt = __builtin_clzl ((long) ixl) + 32;
+ cnt = cnt - 12;
+ explo -= cnt;
+ ixl <<= cnt + 1;
+ }
+
+ /* With variable precision we can't assume much about the
+ magnitude of the returned low double. It may even be a
+ denormal. */
+ explo -= expon;
+ ixl &= 0x000fffffffffffffULL;
+ lx &= 0x8000000000000000ULL;
+ if (explo <= 0)
+ {
+ /* Handle denormal low double. */
+ if (explo > -52)
+ {
+ ixl |= 1LL << 52;
+ ixl >>= 1 - explo;
+ }
+ else
+ {
+ ixl = 0;
+ lx = 0;
+ if ((hx & 0x7ff0000000000000ULL) == (1023LL << 52))
+ {
+ /* Oops, the adjustment we made above for values a
+ little smaller than powers of two turned out to
+ be wrong since the returned low double will be
+ zero. This can happen if the input was
+ something weird like 0x1p1000 - 0x1p-1000. */
+ hx -= 1L << 52;
+ expon += 1;
+ }
+ }
+ explo = 0;
}
- *eptr += (ix>>52)-1022;
+ lx |= (explo << 52) | ixl;
+ }
- if (ixl != 0ULL) {
- explo = (ixl>>52) - (ix>>52) + 0x3fe;
- if ((ixl&0x7ff0000000000000ULL) == 0LL) {
- /* the lower double is a denormal so we need to correct its
- mantissa and perhaps its exponent. */
- int cnt;
-
- if (sizeof (ixl) == sizeof (long))
- cnt = __builtin_clzl (ixl);
- else if ((ixl >> 32) != 0)
- cnt = __builtin_clzl ((long) (ixl >> 32));
- else
- cnt = __builtin_clzl ((long) ixl) + 32;
- cnt = cnt - 12;
- lx = (lx&0x8000000000000000ULL) | ((explo-cnt)<<52)
- | ((ixl<<(cnt+1))&0x000fffffffffffffULL);
- } else
- lx = (lx&0x800fffffffffffffULL) | (explo<<52);
- } else
- lx = 0ULL;
-
- hx = (hx&0x800fffffffffffffULL) | 0x3fe0000000000000ULL;
- INSERT_WORDS64 (xhi, hx);
- INSERT_WORDS64 (xlo, lx);
- x = ldbl_pack (xhi, xlo);
- return x;
+ INSERT_WORDS64 (xhi, hx);
+ INSERT_WORDS64 (xlo, lx);
+ x = ldbl_pack (xhi, xlo);
+ *eptr = expon;
+ return x;
}
#ifdef IS_IN_libm
long_double_symbol (libm, __frexpl, frexpl);
++++++ ibm-long-double-math.patch ++++++
2014-03-14 Adhemerval Zanella <azanella(a)linux.vnet.ibm.com>
[BZ #16707]
* sysdeps/powerpc/powerpc64/fpu/s_roundl.S: Remove wrong
implementation.
* math/libm-test.inc (round_test_data): Add more tests.
[BZ #16706]
* sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S: Remove wrong
implementation.
* math/libm-test.inc (nearbyint_test_data): Add more tests.
[BZ #16701]
* sysdeps/powerpc/powerpc64/fpu/s_ceill.S: Remove wrong
implementation.
* math/libm-test.inc (ceil_test_data): Add more tests.
Index: glibc-2.19/math/libm-test.inc
===================================================================
--- glibc-2.19.orig/math/libm-test.inc
+++ glibc-2.19/math/libm-test.inc
@@ -6000,6 +6000,15 @@ static const struct test_f_f_data ceil_t
TEST_f_f (ceil, -72057594037927936.75L, -72057594037927936.0L),
TEST_f_f (ceil, -72057594037927937.5L, -72057594037927937.0L),
+ /* Check cases where first double is a exact integer higher than 2^52 and
+ the precision is determined by second long double for IBM long double. */
+ TEST_f_f (ceil, 34503599627370498.515625L, 34503599627370499.0L),
+ TEST_f_f (ceil, -34503599627370498.515625L, -34503599627370498.0L),
+# if LDBL_MANT_DIG >= 106
+ TEST_f_f (ceil, 1192568192774434123539907640624.484375L, 1192568192774434123539907640625.0L),
+ TEST_f_f (ceil, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
+# endif
+
TEST_f_f (ceil, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L),
TEST_f_f (ceil, 10141204801825835211973625643008.25L, 10141204801825835211973625643009.0L),
TEST_f_f (ceil, 10141204801825835211973625643008.5L, 10141204801825835211973625643009.0L),
@@ -10495,6 +10504,16 @@ static const struct test_f_f_data nearby
TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0, NO_INEXACT_EXCEPTION),
TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0, NO_INEXACT_EXCEPTION),
#endif
+#ifdef TEST_LDOUBLE
+ /* Check cases where first double is a exact integer higher than 2^52 and
+ the precision is determined by second long double for IBM long double. */
+ TEST_f_f (nearbyint, 34503599627370498.515625L, 34503599627370499.0L),
+ TEST_f_f (nearbyint, -34503599627370498.515625L, -34503599627370499.0L),
+# if LDBL_MANT_DIG >= 106
+ TEST_f_f (nearbyint, 1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L),
+ TEST_f_f (nearbyint, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
+# endif
+#endif
};
static void
@@ -11792,6 +11811,15 @@ static const struct test_f_f_data round_
TEST_f_f (round, -72057594037927936.75L, -72057594037927937.0L),
TEST_f_f (round, -72057594037927937.5L, -72057594037927938.0L),
+ /* Check cases where first double is a exact integer higher than 2^52 and
+ the precision is determined by second long double for IBM long double. */
+ TEST_f_f (round, 34503599627370498.515625L, 34503599627370499.0L),
+ TEST_f_f (round, -34503599627370498.515625L, -34503599627370499.0L),
+# if LDBL_MANT_DIG >= 106
+ TEST_f_f (round, 1192568192774434123539907640624.484375L, 1192568192774434123539907640624.0L),
+ TEST_f_f (round, -1192568192774434123539907640624.484375L, -1192568192774434123539907640624.0L),
+# endif
+
TEST_f_f (round, 10141204801825835211973625643007.5L, 10141204801825835211973625643008.0L),
TEST_f_f (round, 10141204801825835211973625643008.25L, 10141204801825835211973625643008.0L),
TEST_f_f (round, 10141204801825835211973625643008.5L, 10141204801825835211973625643009.0L),
Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/s_ceill.S
===================================================================
--- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/s_ceill.S
+++ /dev/null
@@ -1,132 +0,0 @@
-/* s_ceill.S IBM extended format long double version.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
- .section ".toc","aw"
-.LC0: /* 2**52 */
- .tc FD_43300000_0[TC],0x4330000000000000
-
- .section ".text"
-
-/* long double [fp1,fp2] ceill (long double x [fp1,fp2])
- IEEE 1003.1 ceil function.
-
- PowerPC64 long double uses the IBM extended format which is
- represented two 64-floating point double values. The values are
- non-overlapping giving an effective precision of 106 bits. The first
- double contains the high order bits of mantissa and is always ceiled
- to represent a normal ceiling of long double to double. Since the
- long double value is sum of the high and low values, the low double
- normally has the opposite sign to compensate for the this ceiling.
-
- For long double there are two cases:
- 1) |x| < 2**52, all the integer bits are in the high double.
- ceil the high double and set the low double to -0.0.
- 2) |x| >= 2**52, ceiling involves both doubles.
- See the comment before label .L2 for details.
- */
-
-ENTRY (__ceill)
- mffs fp11 /* Save current FPU rounding mode. */
- lfd fp13,.LC0@toc(2)
- fabs fp0,fp1
- fabs fp9,fp2
- fsub fp12,fp13,fp13 /* generate 0.0 */
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
- bnl- cr7,.L2
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
- fneg fp2,fp12
- ble- cr6,.L1
- fadd fp1,fp1,fp13 /* x+= TWO52; */
- fsub fp1,fp1,fp13 /* x-= TWO52; */
- fabs fp1,fp1 /* if (x == 0.0) */
-.L0:
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- blr /* x = 0.0; */
-.L1:
- bge- cr6,.L0 /* if (x < 0.0) */
- fsub fp1,fp1,fp13 /* x-= TWO52; */
- fadd fp1,fp1,fp13 /* x+= TWO52; */
- fcmpu cr5,fp1,fp12 /* if (x > 0.0) */
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- fnabs fp1,fp1 /* if (x == 0.0) */
- blr /* x = -0.0; */
-
-/* The high double is > TWO52 so we need to round the low double and
- perhaps the high double. In this case we have to round the low
- double and handle any adjustment to the high double that may be
- caused by rounding (up). This is complicated by the fact that the
- high double may already be rounded and the low double may have the
- opposite sign to compensate.This gets a bit tricky so we use the
- following algorithm:
-
- tau = floor(x_high/TWO52);
- x0 = x_high - tau;
- x1 = x_low + tau;
- r1 = rint(x1);
- y_high = x0 + r1;
- y_low = x0 - y_high + r1;
- return y; */
-.L2:
- fcmpu cr7,fp9,fp13 /* if (|x_low| > TWO52) */
- fcmpu cr0,fp9,fp12 /* || (|x_low| == 0.0) */
- fcmpu cr5,fp2,fp12 /* if (x_low > 0.0) */
- bgelr- cr7 /* return x; */
- beqlr- cr0
- mtfsfi 7,2 /* Set rounding mode toward +inf. */
- fdiv fp8,fp1,fp13 /* x_high/TWO52 */
-
- bng- cr6,.L6 /* if (x > 0.0) */
- fctidz fp0,fp8
- fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */
- bng cr5,.L4 /* if (x_low > 0.0) */
- fmr fp3,fp1
- fmr fp4,fp2
- b .L5
-.L4: /* if (x_low < 0.0) */
- fsub fp3,fp1,fp8 /* x0 = x_high - tau; */
- fadd fp4,fp2,fp8 /* x1 = x_low + tau; */
-.L5:
- fadd fp5,fp4,fp13 /* r1 = r1 + TWO52; */
- fsub fp5,fp5,fp13 /* r1 = r1 - TWO52; */
- b .L9
-.L6: /* if (x < 0.0) */
- fctidz fp0,fp8
- fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */
- bnl cr5,.L7 /* if (x_low < 0.0) */
- fmr fp3,fp1
- fmr fp4,fp2
- b .L8
-.L7: /* if (x_low > 0.0) */
- fsub fp3,fp1,fp8 /* x0 = x_high - tau; */
- fadd fp4,fp2,fp8 /* x1 = x_low + tau; */
-.L8:
- fsub fp5,fp4,fp13 /* r1-= TWO52; */
- fadd fp5,fp5,fp13 /* r1+= TWO52; */
-.L9:
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- fadd fp1,fp3,fp5 /* y_high = x0 + r1; */
- fsub fp2,fp3,fp1 /* y_low = x0 - y_high + r1; */
- fadd fp2,fp2,fp5
- blr
-END (__ceill)
-
-long_double_symbol (libm, __ceill, ceill)
Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S
===================================================================
--- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/s_nearbyintl.S
+++ /dev/null
@@ -1,113 +0,0 @@
-/* nearbyint long double.
- IBM extended format long double version.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
- .section ".toc","aw"
-.LC0: /* 2**52 */
- .tc FD_43300000_0[TC],0x4330000000000000
- .section ".text"
-
-/* long double [fp1,fp2] nearbyintl (long double x [fp1,fp2])
- IEEE 1003.1 nearbyintl function. nearbyintl is similar to the rintl
- but does raise the "inexact" exception. This implementation is
- based on rintl but explicitly masks the inexact exception on entry
- and clears any pending inexact before restoring the exception mask
- on exit.
-
- PowerPC64 long double uses the IBM extended format which is
- represented two 64-floating point double values. The values are
- non-overlapping giving an effective precision of 106 bits. The first
- double contains the high order bits of mantissa and is always rounded
- to represent a normal rounding of long double to double. Since the
- long double value is sum of the high and low values, the low double
- normally has the opposite sign to compensate for the this rounding.
-
- For long double there are two cases:
- 1) |x| < 2**52, all the integer bits are in the high double.
- floor the high double and set the low double to -0.0.
- 2) |x| >= 2**52, Rounding involves both doubles.
- See the comment before label .L2 for details.
- */
-ENTRY (__nearbyintl)
- mffs fp11 /* Save current FPSCR. */
- lfd fp13,.LC0@toc(2)
- fabs fp0,fp1
- mtfsb0 28 /* Disable "inexact" exceptions. */
- fsub fp12,fp13,fp13 /* generate 0.0 */
- fabs fp9,fp2
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
- bnl- cr7,.L2
- fmr fp2,fp12
- bng- cr6,.L4
- fadd fp1,fp1,fp13 /* x+= TWO52; */
- fsub fp1,fp1,fp13 /* x-= TWO52; */
- b .L9
-.L4:
- bnl- cr6,.L9 /* if (x < 0.0) */
- fsub fp1,fp13,fp1 /* x = TWO52 - x; */
- fsub fp0,fp1,fp13 /* x = - (x - TWO52); */
- fneg fp1,fp0
-.L9:
- mtfsb0 6 /* Clear any pending "inexact" exceptions. */
- mtfsf 0x01,fp11 /* restore exception mask. */
- blr
-
-/* The high double is > TWO52 so we need to round the low double and
- perhaps the high double. This gets a bit tricky so we use the
- following algorithm:
-
- tau = floor(x_high/TWO52);
- x0 = x_high - tau;
- x1 = x_low + tau;
- r1 = nearbyint(x1);
- y_high = x0 + r1;
- y_low = r1 - tau;
- return y; */
-.L2:
- fcmpu cr7,fp9,fp13 /* if (|x_low| > TWO52) */
- fcmpu cr0,fp9,fp12 /* || (|x_low| == 0.0) */
- bge- cr7,.L9 /* return x; */
- beq- cr0,.L9
- fdiv fp8,fp1,fp13 /* x_high/TWO52 */
- fctidz fp0,fp8
- fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */
- fsub fp3,fp1,fp8 /* x0 = x_high - tau; */
- fadd fp4,fp2,fp8 /* x1 = x_low + tau; */
-
- fcmpu cr6,fp4,fp12 /* if (x1 > 0.0) */
- bng- cr6,.L8
- fadd fp5,fp4,fp13 /* r1 = x1 + TWO52; */
- fsub fp5,fp5,fp13 /* r1 = r1 - TWO52; */
- b .L6
-.L8:
- fmr fp5,fp4
- bge- cr6,.L6 /* if (x1 < 0.0) */
- fsub fp5,fp13,fp4 /* r1 = TWO52 - x1; */
- fsub fp0,fp5,fp13 /* r1 = - (r1 - TWO52); */
- fneg fp5,fp0
-.L6:
- fadd fp1,fp3,fp5 /* y_high = x0 + r1; */
- fsub fp2,fp5,fp8 /* y_low = r1 - tau; */
- b .L9
-END (__nearbyintl)
-
-long_double_symbol (libm, __nearbyintl, nearbyintl)
Index: glibc-2.19/sysdeps/powerpc/powerpc64/fpu/s_roundl.S
===================================================================
--- glibc-2.19.orig/sysdeps/powerpc/powerpc64/fpu/s_roundl.S
+++ /dev/null
@@ -1,132 +0,0 @@
-/* long double round function.
- IBM extended format long double version.
- Copyright (C) 2004-2014 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sysdep.h>
-#include <math_ldbl_opt.h>
-
- .section ".toc","aw"
-.LC0: /* 2**52 */
- .tc FD_43300000_0[TC],0x4330000000000000
-.LC1: /* 0.5 */
- .tc FD_3fe00000_0[TC],0x3fe0000000000000
- .section ".text"
-
-/* long double [fp1,fp2] roundl (long double x [fp1,fp2])
- IEEE 1003.1 round function. IEEE specifies "round to the nearest
- integer value, rounding halfway cases away from zero, regardless of
- the current rounding mode." However PowerPC Architecture defines
- "Round to Nearest" as "Choose the best approximation. In case of a
- tie, choose the one that is even (least significant bit o).".
- So we can't use the PowerPC "Round to Nearest" mode. Instead we set
- "Round toward Zero" mode and round by adding +-0.5 before rounding
- to the integer value. */
-
-ENTRY (__roundl)
- mffs fp11 /* Save current FPU rounding mode. */
- lfd fp13,.LC0@toc(2)
- fabs fp0,fp1
- fabs fp9,fp2
- fsub fp12,fp13,fp13 /* generate 0.0 */
- fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
- fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
- bnl- cr7,.L2
- mtfsfi 7,1 /* Set rounding mode toward 0. */
- lfd fp10,.LC1@toc(2)
- ble- cr6,.L1
- fneg fp2,fp12
- fadd fp1,fp1,fp10 /* x+= 0.5; */
- fadd fp1,fp1,fp13 /* x+= TWO52; */
- fsub fp1,fp1,fp13 /* x-= TWO52; */
- fabs fp1,fp1 /* if (x == 0.0) x = 0.0; */
-.L0:
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- blr
-.L1:
- fsub fp9,fp1,fp10 /* x-= 0.5; */
- fneg fp2,fp12
- bge- cr6,.L0 /* if (x < 0.0) */
- fsub fp1,fp9,fp13 /* x-= TWO52; */
- fadd fp1,fp1,fp13 /* x+= TWO52; */
- fnabs fp1,fp1 /* if (x == 0.0) x = -0.0; */
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- blr
-
-/* The high double is > TWO52 so we need to round the low double and
- perhaps the high double. In this case we have to round the low
- double and handle any adjustment to the high double that may be
- caused by rounding (up). This is complicated by the fact that the
- high double may already be rounded and the low double may have the
- opposite sign to compensate.This gets a bit tricky so we use the
- following algorithm:
-
- tau = floor(x_high/TWO52);
- x0 = x_high - tau;
- x1 = x_low + tau;
- r1 = rint(x1);
- y_high = x0 + r1;
- y_low = x0 - y_high + r1;
- return y; */
-.L2:
- fcmpu cr7,fp9,fp13 /* if (|x_low| > TWO52) */
- fcmpu cr0,fp9,fp12 /* || (|x_low| == 0.0) */
- fcmpu cr5,fp2,fp12 /* if (x_low > 0.0) */
- lfd fp10,.LC1@toc(2)
- bgelr- cr7 /* return x; */
- beqlr- cr0
- mtfsfi 7,1 /* Set rounding mode toward 0. */
- fdiv fp8,fp1,fp13 /* x_high/TWO52 */
-
- bng- cr6,.L6 /* if (x > 0.0) */
- fctidz fp0,fp8
- fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */
- bng cr5,.L4 /* if (x_low > 0.0) */
- fmr fp3,fp1
- fmr fp4,fp2
- b .L5
-.L4: /* if (x_low < 0.0) */
- fsub fp3,fp1,fp8 /* x0 = x_high - tau; */
- fadd fp4,fp2,fp8 /* x1 = x_low + tau; */
-.L5:
- fadd fp5,fp4,fp10 /* r1 = x1 + 0.5; */
- fadd fp5,fp5,fp13 /* r1 = r1 + TWO52; */
- fsub fp5,fp5,fp13 /* r1 = r1 - TWO52; */
- b .L9
-.L6: /* if (x < 0.0) */
- fctidz fp0,fp8
- fcfid fp8,fp0 /* tau = floor(x_high/TWO52); */
- bnl cr5,.L7 /* if (x_low < 0.0) */
- fmr fp3,fp1
- fmr fp4,fp2
- b .L8
-.L7: /* if (x_low > 0.0) */
- fsub fp3,fp1,fp8 /* x0 = x_high - tau; */
- fadd fp4,fp2,fp8 /* x1 = x_low + tau; */
-.L8:
- fsub fp5,fp4,fp10 /* r1 = x1 - 0.5; */
- fsub fp5,fp5,fp13 /* r1-= TWO52; */
- fadd fp5,fp5,fp13 /* r1+= TWO52; */
-.L9:
- mtfsf 0x01,fp11 /* restore previous rounding mode. */
- fadd fp1,fp3,fp5 /* y_high = x0 + r1; */
- fsub fp2,fp3,fp1 /* y_low = x0 - y_high + r1; */
- fadd fp2,fp2,fp5
- blr
-END (__roundl)
-
-long_double_symbol (libm, __roundl, roundl)
++++++ nscd.conf ++++++
--- /var/tmp/diff_new_pack.Q0Fckt/_old 2014-04-22 07:47:59.000000000 +0200
+++ /var/tmp/diff_new_pack.Q0Fckt/_new 2014-04-22 07:47:59.000000000 +0200
@@ -1 +1 @@
-d /var/run/nscd 0755 root root
+d /run/nscd 0755 root root
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org
1
0