Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 07 May 2011 09:08:29 +0300
From: Georgi Geshev <root@...k-labs.exploits-bg.com>
To: owl-dev@...ts.openwall.com
Subject: Re: gcc update

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On 5/6/2011 9:26 PM, Solar Designer wrote:
> Hi Georgi,
> 
> On Fri, May 06, 2011 at 03:32:14AM +0300, Georgi Geshev wrote:
>> I've built the GCC 4.6.0 (no patches applied), GMP 4.3.2 (appropriate
>> Fedora patches applied), MPFR 3.0.1 (no patches applied) and MPC 0.9 (no
>> patches applied) packages, though I still need to clean up and improve
>> the spec files.

I have also removed the Fedora GMP patches.

> 
> Great.  Please post your spec files in here - as they are, before you
> spend any more time on them.  I'd like to take a look, and others might
> provide helpful comments as well.
> 

Here are the spec files (loosely based on the appropriate Fedora
Project's RPM spec files), though they're still somewhat messy.

>> Here's the list of packages that initially failed to build with the new
>> compiler toolchain -
>>
>> cpio
>> elfutils-libelf
>> flex
>> glibc
>> kernel
>> libtool
>> mdadm
>> perl
>> shadow-utils
>> util-linux
>> vim
>>
>> I'll do my best to further resolve the build issues.
> 
> Before you do, please post excerpts from build logs showing just how
> these packages failed to build.
> 
> For others in here - Georgi only did this test on i686 so far (not
> x86_64 yet).  (That's fine, I merely want it mentioned.)
> 
> Thanks,
> 
> Alexander
> 

Regards,
Georgi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJNxOHbAAoJECp4GRJNSNT5VYsH/0vhEzrAcJMiKt54L7ZU4fhf
LmcKfRtxR+OV3aoYPRkDarpXn4E/Mv8bnrCxuBsc2FADDEkACIPefiPhojpUtha5
g/IoFD2asuD/C9XiBz4tyx3lbcsrLrqMU2pLIoDJjUNV5WUA50VbMMhvkPBTGDXh
P09pkYNMCmFflAGElbfNyXvRSSDU/ebuDPUukIuLpx4EaNgzEcNf8IxjvQBV8xfh
NrGUItlGFgLEu+6jmOx3+HPtRf2HBNxtOQRaaR0K8b0ftwd/T7msKJNb7/4ZPRN8
NRbZ1ZHGcXbtEg14XCo62Y5pcXDW5Ew7GxpFG7R+PzDDduONREV/zFXNydeKS10=
=QTb7
-----END PGP SIGNATURE-----

# $Owl: Owl/packages/gcc/gcc.spec Exp $

# The only supported frontend for now is GXX.
# Testsuite is not supported because of its requirement for additional
# packages to run (dejagnu, tcl, expect).
%define BUILD_GXX 1
%undefine _with_test

# If this variable is set to non-zero, then all support libraries
# will be placed into %_libdir/gcc/%_target_platform/%%version
# sub-directory (allowing to have several binary incompatible
# versions of compilers).
%define USE_VERSION_SPECIFIC_LIBS 0

Summary: C compiler from the GNU Compiler Collection.
Name: gcc
Version: 4.6.0
Release: owl1
Epoch: 1
License: GPLv3+
Group: Development/Languages
URL: http://gcc.gnu.org
Source0: gcc-core-%version.tar.bz2
# ftp://ftp.gnu.org/gnu/gcc/gcc-%version/gcc-core-%version.tar.bz2
%if %BUILD_GXX
Source2: gcc-g++-%version.tar.bz2
# ftp://ftp.gnu.org/gnu/gcc/gcc-%version/gcc-g++-%version.tar.bz2
%endif

%{?_with_test:Source6: ftp://ftp.gnu.org/gnu/gcc/gcc-%version/gcc-testsuite-%version.tar.bz2}

PreReq: /sbin/install-info
# XXX: the following line uses RPM4 syntax. I've commented it for now. -- (GM)
#Requires(post): sed
# This is the version of binutils we have tested this package with; older
# ones might work, but were not tested.
Requires: binutils >= 2.10.1.0.4
Requires: cpp = %epoch:%version-%release
Requires: libgcc >= %epoch:%version-%release
Obsoletes: egcs
BuildRequires: binutils, gettext, bison, flex, texinfo
BuildRoot: /override/%name-%version

%description
The gcc package contains C compiler from the GNU Compiler Collection,
as well as documentation which is not limited to just the C compiler.

%package -n cpp
Summary: GNU C preprocessor.
Group: Development/Languages
PreReq: /sbin/install-info

%description -n cpp
cpp (or cccp) is the GNU C Compatible Compiler Preprocessor.  cpp is a
macro processor which is used automatically by the C compiler to
transform program source before actual compilation.  cpp may also be
used independently from the C compiler and the C language.

%package -n libgcc
Summary: GCC shared support library
Group: System Environment/Libraries
PreReq: /sbin/ldconfig

%description -n libgcc
This package contains GCC shared support library which is needed
e.g. for exception handling support.

%if %BUILD_GXX
%package c++
Summary: C++ support for gcc.
Group: Development/Languages
Requires: gcc = %epoch:%version-%release, cpp = %epoch:%version-%release
Obsoletes: egcs-c++

%description c++
This package contains the C++ compiler from the GNU Compiler Collection.
It includes support for most of the current C++ specification, including
templates and exception handling.  It does include the static standard
C++ library and C++ header files.  The library for dynamically linking
programs is available as a separate binary package.

%package -n libstdc++
Summary: GNU C++ library.
Group: System Environment/Libraries
PreReq: /sbin/ldconfig
Requires: libgcc >= %epoch:%version-%release
Obsoletes: gcc-libstdc++

%description -n libstdc++
The libstdc++ package contains a snapshot of the GCC Standard C++
Library v3, an ongoing project to implement the ISO 14882 Standard C++
library.

%package -n libstdc++-devel
Summary: Header files and libraries for C++ development.
Group: Development/Libraries
Requires: libstdc++ = %epoch:%version-%release
Obsoletes: gcc-libstdc++-devel

%description -n libstdc++-devel
This is the GNU implementation of the standard C++ libraries.  This
package includes the header files and libraries needed for C++ development.
%endif

%if %USE_VERSION_SPECIFIC_LIBS
%define version_libdir %_libdir/gcc/%_target_platform/%version
%else
%define version_libdir %_libdir
%endif

%prep

%setup -q

%if %BUILD_GXX
%setup -q -T -D -b 2
%endif

%{?_with_test:%setup -q -T -D -b 6}

%build
# Rebuild configure(s) and Makefile(s) if templates are newer...
for f in */acinclude.m4; do
	pushd "${f%%/*}"
# Run aclocal & autoconf only if files aclocal.m4 and configure.in exist
# and acinclude.m4 is newer than aclocal.m4.
	if [ -f aclocal.m4 -a -f configure.in -a acinclude.m4 -nt aclocal.m4 ]
#	if [ -f aclocal.m4 -a acinclude.m4 -nt aclocal.m4 ]
	then
		aclocal
		autoconf
	fi
	popd
done
#for f in */configure.in; do
#	pushd "${f%%/*}"
#	[ configure.in -nt configure ] && autoconf && autoheader
#	popd
#done
for f in */Makefile.am; do
	pushd "${f%%/*}"
	[ Makefile.am -nt Makefile.in ] && automake
	popd
done

%ifarch sparcv9
%define _target_platform sparc-%_vendor-%_target_os
%endif
%ifarch sparc sparcv9
# pthreads are currently not supported on SPARC.
%define threads	single
%else
%define threads posix
%endif

# We will build this software outside source tree as recommended by INSTALL/*
rm -rf obj-%_target_platform
mkdir obj-%_target_platform
cd obj-%_target_platform

../configure \
	--prefix=%_prefix \
	--exec-prefix=%_exec_prefix \
	--bindir=%_bindir \
	--libdir=%_libdir \
	--libexecdir=%_libdir \
	--with-slib=/%_lib \
	--infodir=%_infodir \
	--mandir=%_mandir \
	--enable-shared \
	--enable-threads=%threads \
%if %USE_VERSION_SPECIFIC_LIBS
	--enable-version-specific-runtime-libs \
%if %BUILD_GXX
	--with-gxx-include-dir=%version_libdir/c++ \
%endif # BUILD_GXX
%else # USE_VERSION_SPECIFIC_LIBS
%if %BUILD_GXX
	--with-gxx-include-dir=%_includedir/c++/%version \
%endif # BUILD_GXX
%endif # USE_VERSION_SPECIFIC_LIBS
%if %BUILD_GXX
	--disable-libstdcxx-pch \
%endif # BUILD_GXX
	--disable-checking \
	--enable-nls \
	--enable-c-mbchar \
	--enable-long-long \
	--enable-__cxa_atexit \
	--disable-multilib \
	--host=%_target_platform \
	--build=%_target_platform \
	--target=%_target_platform

# (GM): Here comes some magic :)
# Although all previous releases of gcc correctly understand "gcc -E"
# CPP preprocessor mode and not issue warnings about deprecated options
# in the command line, from 3.4.3 release this was changed and configure's
# tests will be broken if we use deprecated option in the command line.
# Perhaps we have to avoid using deprecated options in our build environment,
# but it will be more correct to adjust autotools or patch gcc to avoid
# issuing of warning in case of CPP mode.
#
# Currently, we use only one deprecated option in our build environment.
# It's "-mcpu" and we change it to "-mtune" to save meaning, but avoid
# gcc's deprecation warning.

TARGET_OPT_FLAGS="%{expand:%{?optflags_bin:%optflags_bin}}%{!?optflags_bin:$RPM_OPT_FLAGS}"
TARGET_OPT_LIBFLAGS="%{expand:%{?optflags_lib:%optflags_lib}}%{!?optflags_lib:$RPM_OPT_FLAGS}"
#TARGET_OPT_FLAGS="${TARGET_OPT_FLAGS//-mcpu=/-mtune=}"
#TARGET_OPT_LIBFLAGS="${TARGET_OPT_LIBFLAGS//-mcpu=/-mtune=}"

# Let's compile the thing
# STAGE1_CFLAGS is used for stage1 compiler
# BOOT_FLAGS is used for stage2..n compiler
# ..._FOR_TARGET is used for final compiler

%__make bootstrap-lean \
	STAGE1_CFLAGS="-O -fomit-frame-pointer" \
	BOOT_CFLAGS="-O -fomit-frame-pointer" \
	CFLAGS_FOR_TARGET="$TARGET_OPT_FLAGS" \
	LIBCFLAGS_FOR_TARGET="$TARGET_OPT_LIBFLAGS" \
	CXXFLAGS_FOR_TARGET="${TARGET_OPT_FLAGS//-fno-rtti/} -D_GNU_SOURCE" \
	LIBCXXFLAGS_FOR_TARGET="${TARGET_OPT_LIBFLAGS//-fno-rtti/} -D_GNU_SOURCE"

# Copy various doc files here and there.

cd ..
mkdir -p rpm-doc/gcc
install -m 644 -p gcc/ChangeLog rpm-doc/gcc/
#install -m 644 -p BUGS COPYING* FAQ MAINTAINERS README* gcc/SERVICE rpm-doc/gcc/
install -m 644 -p COPYING* MAINTAINERS README* rpm-doc/gcc/

%if %BUILD_GXX
mkdir -p rpm-doc/g++
install -m 644 -p gcc/cp/{ChangeLog,NEWS} rpm-doc/g++/

mkdir -p rpm-doc/libstdc++
install -m 644 -p libstdc++-v3/{ChangeLog,README} rpm-doc/libstdc++/
%endif

find rpm-doc -type f \( -iname '*changelog*' -not -name '*.bz2' \) -print0 |
	xargs -r0 bzip2 -9 --

%install
rm -rf %buildroot

%__make -C obj-%_target_platform DESTDIR=%buildroot install

%if !%USE_VERSION_SPECIFIC_LIBS
# Relocate libgcc shared library from %_libdir/ to /%_lib/.
mkdir %buildroot/%_lib
mv %buildroot%_libdir/libgcc_s.so.1 %buildroot/%_lib/
ln -s ../../../../../%_lib/libgcc_s.so.1 \
	%buildroot%_libdir/gcc/%_target_platform/%version/libgcc_s.so
rm %buildroot%_libdir/libgcc_s.so
%endif

# Fix some things.
ln -s gcc %buildroot%_bindir/cc
echo ".so gcc.1" > %buildroot%_mandir/man1/cc.1

%if %BUILD_GXX
echo ".so g++.1" > %buildroot%_mandir/man1/c++.1
%endif

# Remove unpackaged files
rm %buildroot%_infodir/dir
rm %buildroot%_infodir/gccinstall.info*
rm %buildroot%_libdir/libiberty.a
#rm %buildroot%_bindir/%_target_platform-gcc-%version
#rm -rf %buildroot%_libdir/gcc/%_target_platform/%version/include/*
rm -f %buildroot%version_libdir/*.la

%post
/sbin/install-info --info-dir=%_infodir %_infodir/gcc.info
/sbin/install-info --info-dir=%_infodir %_infodir/gccint.info
%_libdir/gcc/%_target_platform/%version/install-tools/mkheaders
chmod -R go+rX %_libdir/gcc/%_target_platform/%version/include/*

%preun
if [ $1 -eq 0 ]; then
	/sbin/install-info --delete --info-dir=%_infodir %_infodir/gccint.info
	/sbin/install-info --delete --info-dir=%_infodir %_infodir/gcc.info
	if [ -d %_libdir/gcc/%_target_platform/%version/include ]; then
		rm -rf %_libdir/gcc/%_target_platform/%version/include/*
	fi
fi

%post -n libgcc -p /sbin/ldconfig
%postun -n libgcc -p /sbin/ldconfig

%post -n cpp
/sbin/install-info --info-dir=%_infodir %_infodir/cpp.info
/sbin/install-info --info-dir=%_infodir %_infodir/cppinternals.info

%preun -n cpp
if [ $1 -eq 0 ]; then
	/sbin/install-info --delete --info-dir=%_infodir %_infodir/cppinternals.info
	/sbin/install-info --delete --info-dir=%_infodir %_infodir/cpp.info
fi

%if %BUILD_GXX
%post -n libstdc++ -p /sbin/ldconfig
%postun -n libstdc++ -p /sbin/ldconfig
%endif

%files
%defattr(-,root,root)
%_bindir/cc
%_bindir/gcc
#%_bindir/gccbug
%_bindir/gcov
%_bindir/%_target_platform-gcc
%_infodir/gcc.info*
%_infodir/gccint.info*
%dir %_libdir/gcc
%dir %_libdir/gcc/%_target_platform
%dir %_libdir/gcc/%_target_platform/%version
%_libdir/gcc/%_target_platform/%version/cc1
%_libdir/gcc/%_target_platform/%version/collect2
%_libdir/gcc/%_target_platform/%version/crt*.o
%_libdir/gcc/%_target_platform/%version/libgcc*.a
%_libdir/gcc/%_target_platform/%version/libgcc*.so
%_libdir/gcc/%_target_platform/%version/libgcov*.a

#%_libdir/gcc/%_target_platform/%version/specs

#%dir %_libdir/gcc/%_target_platform/%version/include
%_libdir/gcc/%_target_platform/%version/include

%_libdir/gcc/%_target_platform/%version/include-fixed
%_libdir/gcc/%_target_platform/%version/install-tools

%_mandir/man1/cc.1*
%_mandir/man1/gcc.1*
%_mandir/man1/gcov.1*
%_mandir/man7/fsf-funding.7*
%_mandir/man7/gfdl.7*
%_mandir/man7/gpl.7*
%_datadir/locale/*/LC_MESSAGES/gcc.mo
%doc rpm-doc/gcc/*

%files -n cpp
%defattr(-,root,root)
%_bindir/cpp
%_infodir/cpp.info*
%_infodir/cppinternals.info*
%dir %_libdir/gcc
%dir %_libdir/gcc/%_target_platform
%dir %_libdir/gcc/%_target_platform/%version
%_mandir/man1/cpp.1*

%files -n libgcc
%defattr(-,root,root)
%if %USE_VERSION_SPECIFIC_LIBS
%dir %_libdir/gcc
%dir %_libdir/gcc/%_target_platform
%dir %_libdir/gcc/%_target_platform/%version
%_libdir/gcc/%_target_platform/%version/libgcc*.so.*
%else
/%_lib/libgcc*.so.*
%endif

%if %BUILD_GXX
%files c++
%defattr(-,root,root)
%_bindir/?++
%_bindir/%_target_platform-?++
%dir %_libdir/gcc
%dir %_libdir/gcc/%_target_platform
%dir %_libdir/gcc/%_target_platform/%version
%_libdir/gcc/%_target_platform/%version/cc1plus
%_mandir/man1/?++.1*
%doc rpm-doc/g++/*

%files -n libstdc++
%defattr(-,root,root)
%version_libdir/libstdc++.so.6*
%_datadir/locale/*/LC_MESSAGES/libstdc++.mo
%doc rpm-doc/libstdc++/*
#%doc libstdc++-v3/docs/html
%doc libstdc++-v3/doc/html


%files -n libstdc++-devel
%defattr(-,root,root)
%if %USE_VERSION_SPECIFIC_LIBS
%version_libdir/c++
%else
%_includedir/c++/%version
%endif
%version_libdir/libs*++.a
%version_libdir/libstdc++.so
%endif

%changelog
* Wed Dec 01 2010 Vasiliy Kulikov <segoon-at-owl.openwall.com> 1:3.4.5-owl5
- Fixed build bug with binutils 2.20.

* Fri Nov 20 2009 Solar Designer <solar-at-owl.openwall.com> 1:3.4.5-owl4
- Disabled building of V2 and V3 compat subpackages (gcc 2.x'ish libstdc++).

* Wed May 27 2009 Dmitry V. Levin <ldv-at-owl.openwall.com> 1:3.4.5-owl3
- Disabled unused libstdc++ precompiled header files.

* Fri Feb 03 2006 Dmitry V. Levin <ldv-at-owl.openwall.com> 1:3.4.5-owl2
- Dropped old ChangeLog files, compressed the remaining ChangeLog files.

* Wed Dec 21 2005 Dmitry V. Levin <ldv-at-owl.openwall.com> 1:3.4.5-owl1
- Updated to 3.4.5.
- Packaged libgcc shared library in separate subpackage.

* Tue Dec 13 2005 Dmitry V. Levin <ldv-at-owl.openwall.com> 1:3.4.3-owl5
- Corrected interpackage dependencies.

* Sun Oct 23 2005 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.4.3-owl4
- Added sed to Requires(post), since we are using sed in mkheaders;
commented out this Requires(post), since we will use this spec with RPM3.
- Added BuildRequires as suggested by kad@.
- Added a missing requirement for libstdc++ to libstdc++-devel.

* Fri Sep 23 2005 Michail Litvak <mci-at-owl.openwall.com> 1:3.4.3-owl3
- Don't package .la files.

* Wed Jan 19 2005 Solar Designer <solar-at-owl.openwall.com> 1:3.4.3-owl2
- Provide/obsolete libstdc++-compat in libstdc++-v3-compat.
- Restored the cc(1) and c++(1) man pages.

* Fri Jan 14 2005 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.4.3-owl1
- Reverted the change with removing symbolic links from gcc to cc.
- Fixed missed compile flags for target compiler.

* Thu Jan 06 2005 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.4.3-owl0
- Updated to 3.4.3.
- Enabled autotools magic, it works as expected.
- Added libstdc++ compatible libraries for glibc 3.2.2 based builds.
- Added BUILD_CXX_COMPAT_* macros to control building of compatibility
packages. I hope that after next release of Owl we will drop this crap.
- Spec was revised and cleaned up.

* Fri Jul 16 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.4.1-owl0
- Updated to 3.4.1.

* Thu Jun 04 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.4.0-owl0.2
- Updated to 3.4.0.
- Tested only C and C++ compilers, ObjC has compilation issues when using
Boehm GC, Ada unsupported by this build.

* Tue May 25 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.6
- Fixed a typo in spec file.

* Tue Apr 20 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.5
- Additional optimization fixes for build process (using STAGE1_CFLAGS and
BOOT_CFLAGS).
- Moved extraction of '-fno-rtti' to CXXFLAGS, because this is C++ options.

* Fri Apr 16 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.4
- Removed extra_c_flags and "XXX:" comment from spec file.
- Passing "-O -fomit-frame-pointers" in CFLAGS variable to improve build times.

* Thu Feb 26 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.3
- Removed wchar patch as we are building against glibc 2.3.2.

* Thu Feb 26 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.2
- Temporarily disabled regeneration of configure due to conflict with new
autotools.

* Mon Feb 23 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl1.1
- Fixed permission of %_libdir/gcc-lib/%_target_platform/%version/include/*
directories.
- Removed unpackaged files to make RPM4 happy. :)

* Thu Feb 05 2004 Solar Designer <solar-at-owl.openwall.com> 1:3.2.2-owl1
- Added libstdc++ compatibility libraries for gcc 2.95.3 as a separate
source tarball.

* Tue Feb 03 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl0.3
- Cleaned up the spec file (reordered scripts & files sections).
- Avoid using of subshells in build section to not mask possible errors.

* Mon Feb 02 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl0.2
- Added a patch to enable limited wchar support.

* Fri Jan 30 2004 (GalaxyMaster) <galaxy-at-owl.openwall.com> 1:3.2.2-owl0.1
- Updated to 3.2.2 version.

* Mon Aug 19 2002 Michail Litvak <mci-at-owl.openwall.com> 1:2.95.3-owl5
- Deal with info dir entries such that the menu looks pretty.

* Fri Jun 21 2002 Solar Designer <solar-at-owl.openwall.com>
- Provide a cc(1) man page.

* Tue May 28 2002 Solar Designer <solar-at-owl.openwall.com>
- Don't override the linker's default library path for elf32_sparc, place
/lib64 before /usr/lib64 in the path for elf64_sparc; this is needed to
support dynamic linking with libraries from packages which only place the
.so's in /lib (/lib64), not /usr/lib (/usr/lib64).

* Sat May 25 2002 Solar Designer <solar-at-owl.openwall.com>
- Do use some optimization when building the stage1 compiler to make our gcc
builds faster.

* Tue Jan 29 2002 Solar Designer <solar-at-owl.openwall.com>
- Enforce our new spec file conventions (but more cleanups are still needed).
- Dropped the 2.95.2-specific patches entirely.

* Sun Mar 18 2001 Solar Designer <solar-at-owl.openwall.com>
- Updated to 2.95.3.
- Dropped the duplicate_decls() patch (included in 2.95.3).
- Various spec file cleanups (use the ix86 macro, avoid subshells).

* Fri Nov 17 2000 Solar Designer <solar-at-owl.openwall.com>
- No pthreads on sparcv9, not just on plain sparc.
- Pass plain sparc- target to configure when building for sparcv9, to
allow for the use of sparcv9 optflags while not confusing configure.
- Check for __arch64__ rather than __sparc_v9__ in limits.h.
- %%defattr(-,root,root) for all architectures, not just x86 and alpha
(no idea why this was restricted).

* Wed Nov 08 2000 Solar Designer <solar-at-owl.openwall.com>
- Added a patch for copying of DECL_MODE in duplicate_decls(), by
Richard Henderson (http://gcc.gnu.org/ml/gcc-patches/1999-11/msg00087.html).

* Sun Oct 29 2000 Solar Designer <solar-at-owl.openwall.com>
- libstdc++-compat is for x86 only, corrected the %ifarch's.

* Sat Oct 21 2000 Alexandr D. Kanevskiy <kad-at-owl.openwall.com>
- texconfig bug hack

* Fri Oct 20 2000 Alexandr D. Kanevskiy <kad-at-owl.openwall.com>
- disable dvi generation

* Fri Aug 25 2000 Alexandr D. Kanevskiy <kad-at-owl.openwall.com>
- removed make -j

* Sat Jul 29 2000 Alexandr D. Kanevskiy <kad-at-owl.openwall.com>
- spec cleanup.
- duplicate file fix.

* Sun Jul 09 2000 Alexandr D. Kanevskiy <kad-at-owl.openwall.com>
- Imported from RH.

# $Owl: Owl/packages/gmp/gmp.spec Exp $

Summary: A GNU arbitrary precision library
Name: gmp
Version: 4.3.2
Release: owl1
Epoch: 1
License: LGPLv3+
Group: System Environment/Libraries
URL: http://gmplib.org/
Source0: gmp-%version.tar.bz2
# ftp://ftp.gnu.org/pub/gnu/gmp/gmp-%{version}.tar.bz2
BuildRequires: autoconf automake libtool
BuildRoot: /override/%name-%version

%description
The gmp package contains GNU MP, a library for arbitrary precision
arithmetic, signed integers operations, rational numbers and floating
point numbers. GNU MP is designed for speed, for both small and very
large operands. GNU MP is fast because it uses fullwords as the basic
arithmetic type, it uses fast algorithms, it carefully optimizes
assembly code for many CPUs' most common inner loops, and it generally
emphasizes speed over simplicity/elegance in its operations.

Install the gmp package if you need a fast arbitrary precision
library.

%package devel
Summary: Development tools for the GNU MP arbitrary precision library
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info

%description devel
The libraries, header files and documentation for using the GNU MP
arbitrary precision library in applications.

If you want to develop applications which will use the GNU MP library,
you'll need to install the gmp-devel package.  You'll also need to
install the gmp package.

%package static
Summary: Development tools for the GNU MP arbitrary precision library
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}

%description static
The static libraries for using the GNU MP arbitrary precision library
in applications.

%prep
%setup -q

%build
autoreconf -if
if as --help | grep -q execstack; then
  # the object files do not require an executable stack
  export CCAS="gcc -c -Wa,--noexecstack"
fi
mkdir base
cd base
ln -s ../configure .
./configure --build=%{_build} --host=%{_host} \
         --program-prefix=%{?_program_prefix} \
         --prefix=%{_prefix} \
         --exec-prefix=%{_exec_prefix} \
         --bindir=%{_bindir} \
         --sbindir=%{_sbindir} \
         --sysconfdir=%{_sysconfdir} \
         --datadir=%{_datadir} \
         --includedir=%{_includedir} \
         --libdir=%{_libdir} \
         --libexecdir=%{_libexecdir} \
         --localstatedir=%{_localstatedir} \
         --sharedstatedir=%{_sharedstatedir} \
         --mandir=%{_mandir} \
         --infodir=%{_infodir} \
         --enable-mpbsd --enable-cxx
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
export LD_LIBRARY_PATH=`pwd`/.libs
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
cd ..
%ifarch %{ix86}
mkdir build-sse2
cd build-sse2
ln -s ../configure .
CFLAGS="%{optflags} -march=pentium4"
./configure --build=%{_build} --host=%{_host} \
         --program-prefix=%{?_program_prefix} \
         --prefix=%{_prefix} \
         --exec-prefix=%{_exec_prefix} \
         --bindir=%{_bindir} \
         --sbindir=%{_sbindir} \
         --sysconfdir=%{_sysconfdir} \
         --datadir=%{_datadir} \
         --includedir=%{_includedir} \
         --libdir=%{_libdir} \
         --libexecdir=%{_libexecdir} \
         --localstatedir=%{_localstatedir} \
         --sharedstatedir=%{_sharedstatedir} \
         --mandir=%{_mandir} \
         --infodir=%{_infodir} \
         --enable-mpbsd --enable-cxx
perl -pi -e 's|hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=\"-L\\\$libdir\"|g;' libtool
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags}
unset CFLAGS
cd ..
%endif

%install
rm -rf $RPM_BUILD_ROOT
cd base
export LD_LIBRARY_PATH=`pwd`/.libs
make install DESTDIR=$RPM_BUILD_ROOT
install -m 644 gmp-mparam.h ${RPM_BUILD_ROOT}%{_includedir}
rm -f $RPM_BUILD_ROOT%{_libdir}/lib{gmp,mp,gmpxx}.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
/sbin/ldconfig -n $RPM_BUILD_ROOT%{_libdir}
ln -sf libgmpxx.so.4 $RPM_BUILD_ROOT%{_libdir}/libgmpxx.so
cd ..
%ifarch %{ix86}
cd build-sse2
export LD_LIBRARY_PATH=`pwd`/.libs
mkdir $RPM_BUILD_ROOT%{_libdir}/sse2
install -m 755 .libs/libgmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
cp -a .libs/libgmp.so.[^.]* $RPM_BUILD_ROOT%{_libdir}/sse2
chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmp.so.[^.]*
install -m 755 .libs/libgmpxx.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
cp -a .libs/libgmpxx.so.? $RPM_BUILD_ROOT%{_libdir}/sse2
chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libgmpxx.so.?
install -m 755 .libs/libmp.so.*.* $RPM_BUILD_ROOT%{_libdir}/sse2
cp -a .libs/libmp.so.? $RPM_BUILD_ROOT%{_libdir}/sse2
chmod 755 $RPM_BUILD_ROOT%{_libdir}/sse2/libmp.so.?
cd ..
%endif

# Rename gmp.h to gmp-<arch>.h and gmp-mparam.h to gmp-mparam-<arch>.h to
# avoid file conflicts on multilib systems and install wrapper include files
# gmp.h and gmp-mparam-<arch>.h
#basearch=%{_arch}
# always use i386 for iX86
#%ifarch %{ix86}
#basearch=i386
#%endif
# always use arm for arm*
#%ifarch %{arm}
#basearch=arm
#%endif
# superH architecture support
#%ifarch sh3 sh4
#basearch=sh
#%endif
# Rename files and install wrappers
#
#mv %{buildroot}/%{_includedir}/gmp.h %{buildroot}/%{_includedir}/gmp-${basearch}.h
#install -m644 %{SOURCE2} %{buildroot}/%{_includedir}/gmp.h
#mv %{buildroot}/%{_includedir}/gmp-mparam.h %{buildroot}/%{_includedir}/gmp-mparam-${basearch}.h
#install -m644 %{SOURCE3} %{buildroot}/%{_includedir}/gmp-mparam.h


%check
%ifnarch ppc
cd base
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags} check
cd ..
%endif
%ifarch %{ix86}
cd build-sse2
export LD_LIBRARY_PATH=`pwd`/.libs
make %{?_smp_mflags} check
cd ..
%endif

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
if [ -f %{_infodir}/gmp.info.gz ]; then
    /sbin/install-info %{_infodir}/gmp.info.gz %{_infodir}/dir || :
fi
exit 0

%preun devel
if [ $1 = 0 ]; then
    if [ -f %{_infodir}/gmp.info.gz ]; then
        /sbin/install-info --delete %{_infodir}/gmp.info.gz %{_infodir}/dir || :
    fi
fi
exit 0

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LIB NEWS README
%{_libdir}/libgmp.so.*
%{_libdir}/libmp.so.*
%{_libdir}/libgmpxx.so.*
%ifarch %{ix86}
%{_libdir}/sse2/*
%endif

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmp.so
%{_libdir}/libgmp.so
%{_libdir}/libgmpxx.so
%{_includedir}/*.h
%{_infodir}/gmp.info*

%files static
%defattr(-,root,root,-)
%{_libdir}/libmp.a
%{_libdir}/libgmp.a
%{_libdir}/libgmpxx.a


%changelog


# $Owl: Owl/packages/mpc/mpc.spec Exp $

Summary: C library for multiple precision complex arithmetic
Name: mpc
Version: 0.9
Release: owl1
Epoch: 1
License: LGPLv2+
Group: Development/Tools
URL: http://www.multiprecision.org/
Source0: mpc-%{version}.tar.gz
BuildRequires: gmp-devel >= 4.3.2
BuildRequires: mpfr-devel >= 2.4.2
BuildRequires: texinfo
BuildRoot: /override/%name-%version

%description
MPC is a C library for the arithmetic of complex numbers with
arbitrarily high precision and correct rounding of the result. It is
built upon and follows the same principles as Mpfr.

%package devel
Summary: Header and shared development libraries for MPC
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: mpfr-devel gmp-devel

%description devel
Header files and shared object symlinks for MPC is a C library.

%prep
%setup -q -n mpc-%{version}

%build
export CPPFLAGS="%{optflags} -std=gnu99"
export CFLAGS="%{optflags} -std=gnu99"
export EGREP=egrep
%configure
make %{?_smp_mflags}

%check
make check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT/%{_libdir}/libmpc.{l,}a
rm -f ${RPM_BUILD_ROOT}/%{_infodir}/dir

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%post devel
if [ -f %{_infodir}/mpc.info.gz ]; then # for --excludedocs
   /sbin/install-info %{_infodir}/mpc.info.gz %{_infodir}/dir || :
fi

%preun devel
if [ $1 = 0 ]; then
   if [ -f %{_infodir}/mpc.info.gz ]; then # for --excludedocs
      /sbin/install-info --delete %{_infodir}/mpc.info.gz %{_infodir}/dir || :
   fi
fi

%files
%defattr(-,root,root,-)
%doc README NEWS COPYING.LIB
%{_libdir}/libmpc.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmpc.so
%{_includedir}/mpc.h
%{_infodir}/*.info*

%changelog


# $Owl: Owl/packages/mpfr/mpfr.spec Exp $

Summary: A C library for multiple-precision floating-point computations
Name: mpfr
Version: 3.0.1
Release: owl1
Epoch: 1
License: LGPLv3+
Group: System Environment/Libraries
URL: http://www.mpfr.org/
Source0: mpfr-%version.tar.bz2
# http://www.mpfr.org/mpfr-current/%{name}-%{version}.tar.bz2
BuildRequires: autoconf libtool gmp-devel
BuildRoot: /override/%name-%version

%description
The MPFR library is a C library for multiple-precision floating-point
computations with "correct rounding". The MPFR is efficient and
also has a well-defined semantics. It copies the good ideas from the
ANSI/IEEE-754 standard for double-precision floating-point arithmetic
(53-bit mantissa). MPFR is based on the GMP multiple-precision library.

%package devel
Summary: Development tools A C library for mpfr library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
Requires: gmp-devel

%description devel
Header files and documentation for using the MPFR
multiple-precision floating-point library in applications.

If you want to develop applications which will use the MPFR library,
you'll need to install the mpfr-devel package.  You'll also need to
install the mpfr package.

%prep
%setup -q

%build

%configure --disable-assert
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
iconv  -f iso-8859-1 -t utf-8 mpfr.info >mpfr.info.aux
mv mpfr.info.aux mpfr.info
make install DESTDIR=$RPM_BUILD_ROOT
rm -f $RPM_BUILD_ROOT%{_libdir}/libmpfr.la
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
rm -f $RPM_BUILD_ROOT%{_libdir}/libmpfr.a
cd ..
mkdir $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}
mv $RPM_BUILD_ROOT/%{_docdir}/%{name}/ $RPM_BUILD_ROOT/%{_docdir}/%{name}-%{version}/
ln -s libmpfr.so.4.0.0 $RPM_BUILD_ROOT%{_libdir}/libmpfr.so.1
ln -s libmpfr.so.4.0.0 $RPM_BUILD_ROOT%{_libdir}/libmpfr.so.1.2.2


%check
make %{?_smp_mflags} check

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%post devel
if [ -f %{_infodir}/mpfr.info.gz ]; then
    /sbin/install-info %{_infodir}/mpfr.info.gz %{_infodir}/dir || :
fi

%preun devel
if [ "$1" = 0 ]; then
    if [ -f %{_infodir}/mpfr.info.gz ]; then
        /sbin/install-info --delete %{_infodir}/mpfr.info.gz %{_infodir}/dir || :
    fi
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc COPYING COPYING.LESSER NEWS README
%{_libdir}/libmpfr.so.*

%files devel
%defattr(-,root,root,-)
%{_libdir}/libmpfr.so
%{_includedir}/*.h
%{_infodir}/mpfr.info*

%changelog


Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ