Blame SPECS/compat-glibc.spec

b9ba6d
%define glibcsrcdir glibc-2.12-2-gc4ccff1
b9ba6d
%define glibcversion 2.12
b9ba6d
### glibc.spec.in follows:
b9ba6d
%define run_glibc_tests 1
b9ba6d
%define auxarches noarch
b9ba6d
%define xenarches noarch
b9ba6d
%define buildxen 0
b9ba6d
%define xenpackage 0
b9ba6d
%define buildpower6 0
b9ba6d
%define rtkaioarches noarch
b9ba6d
%define debuginfocommonarches noarch
b9ba6d
%define _unpackaged_files_terminate_build 0
b9ba6d
%undefine _enable_debug_packages
b9ba6d
# What's the right thing to do with these?
b9ba6d
# XXX
b9ba6d
%define biarcharches noarch
b9ba6d
%define multiarcharches noarch
b9ba6d
%define systemtaparches noarch
b9ba6d
# XXX
b9ba6d
b9ba6d
Summary: Compatibility C library
b9ba6d
Name: compat-glibc
b9ba6d
# XXX Should this bump?
b9ba6d
Epoch: 1
b9ba6d
Version: %{glibcversion}
8b7d6a
Release: 4%{?dist}
b9ba6d
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
b9ba6d
# Things that are linked directly into dynamically linked programs
b9ba6d
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
b9ba6d
# exception which allows linking it into any kind of programs or shared
b9ba6d
# libraries without restrictions.
b9ba6d
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
b9ba6d
Group: Development/Libraries
b9ba6d
URL: http://sources.redhat.com/glibc/
b9ba6d
Source0: %{?glibc_release_url}%{glibcsrcdir}.tar.bz2
b9ba6d
Source1: %{glibcsrcdir}-fedora.tar.bz2
b9ba6d
Source2: dummylib.sh
b9ba6d
Patch0: glibc-fedora.patch
b9ba6d
Patch1: glibc-ia64-lib64.patch
b9ba6d
Patch2: glibc-rh587360.patch
b9ba6d
Patch3: glibc-rh582738.patch
b9ba6d
Patch4: glibc-getlogin-r.patch
b9ba6d
Patch5: glibc-localedata.patch
b9ba6d
Patch6: glibc-rh593396.patch
b9ba6d
Patch7: glibc-recvmmsg.patch
b9ba6d
Patch8: glibc-aliasing.patch
b9ba6d
Patch9: glibc-rh593686.patch
b9ba6d
Patch10: glibc-rh607461.patch
b9ba6d
Patch11: glibc-rh621959.patch
b9ba6d
Patch12: glibc-rh607010.patch
b9ba6d
Patch13: glibc-rh630801.patch
b9ba6d
Patch14: glibc-rh631011.patch
b9ba6d
Patch15: glibc-rh641128.patch
b9ba6d
Patch16: glibc-rh642584.patch
b9ba6d
Patch17: glibc-rh643822.patch
b9ba6d
Patch18: glibc-rh645672.patch
b9ba6d
Patch19: glibc-rh580498.patch
b9ba6d
Patch20: glibc-rh615090.patch
b9ba6d
Patch21: glibc-rh623187.patch
b9ba6d
Patch22: glibc-rh646954.patch
b9ba6d
Patch23: glibc-rh647448.patch
b9ba6d
Patch24: glibc-rh615701.patch
b9ba6d
Patch25: glibc-rh652661.patch
b9ba6d
Patch26: glibc-rh656530.patch
b9ba6d
Patch27: glibc-rh656014.patch
b9ba6d
Patch28: glibc-rh661982.patch
b9ba6d
Patch29: glibc-rh601686.patch
b9ba6d
Patch30: glibc-rh676076.patch
b9ba6d
Patch31: glibc-rh667974.patch
b9ba6d
Patch32: glibc-rh625893.patch
b9ba6d
Patch33: glibc-rh681054.patch
b9ba6d
Patch34: glibc-rh689471.patch
b9ba6d
Patch35: glibc-rh692177.patch
b9ba6d
Patch36: glibc-rh692838.patch
b9ba6d
Patch37: glibc-rh703480.patch
b9ba6d
Patch38: glibc-rh705465.patch
b9ba6d
Patch39: glibc-rh703481.patch
b9ba6d
Patch40: glibc-rh694386.patch
b9ba6d
Patch41: glibc-rh676591.patch
b9ba6d
Patch42: glibc-rh711987.patch
b9ba6d
Patch43: glibc-rh695595.patch
b9ba6d
Patch45: glibc-rh695963.patch
b9ba6d
Patch46: glibc-rh713134.patch
b9ba6d
Patch47: glibc-rh714823.patch
b9ba6d
Patch48: glibc-rh718057.patch
b9ba6d
Patch49: glibc-rh688980.patch
b9ba6d
Patch50: glibc-rh712248.patch
b9ba6d
Patch51: glibc-rh731042.patch
b9ba6d
Patch52: glibc-rh730379.patch
b9ba6d
Patch53: glibc-rh700507.patch
b9ba6d
Patch54: glibc-rh699724.patch
b9ba6d
Patch55: glibc-rh736346.patch
b9ba6d
Patch56: glibc-rh737778.patch
b9ba6d
Patch57: glibc-rh738665.patch
b9ba6d
Patch58: glibc-rh738763.patch
b9ba6d
Patch59: glibc-rh739184.patch
b9ba6d
Patch60: glibc-rh711927.patch
b9ba6d
Patch61: glibc-rh688720.patch
b9ba6d
Patch62: glibc-rh726517.patch
b9ba6d
Patch63: glibc-rh752122.patch
b9ba6d
Patch64: glibc-rh739971.patch
b9ba6d
Patch65: glibc-rh751750.patch
b9ba6d
Patch66: glibc-rh740506.patch
b9ba6d
Patch67: glibc-rh757888.patch
b9ba6d
Patch68: glibc-rh750531.patch
b9ba6d
Patch69: glibc-rh749188.patch
b9ba6d
Patch70: glibc-rh767746.patch
b9ba6d
Patch72: glibc-rh767693.patch
b9ba6d
Patch73: glibc-rh740506-2.patch
b9ba6d
Patch74: glibc-rh696472.patch
b9ba6d
Patch75: glibc-rh771342.patch
b9ba6d
Patch76: glibc-rh657572.patch
b9ba6d
Patch77: glibc-rh767693-2.patch
b9ba6d
Patch78: glibc-rh782585.patch
b9ba6d
Patch79: glibc-rh784402.patch
b9ba6d
Patch80: glibc-rh697421.patch
b9ba6d
Patch81: glibc-rh785984.patch
b9ba6d
Patch82: glibc-rh767146.patch
b9ba6d
Patch83: glibc-rh766513.patch
b9ba6d
Patch84: glibc-rh789209.patch
b9ba6d
Patch85: glibc-rh788959.patch
b9ba6d
Patch86: glibc-rh789189.patch
b9ba6d
Patch88: glibc-rh789238.patch
b9ba6d
Patch89: glibc-rh794817.patch
b9ba6d
Patch90: glibc-rh797094-1.patch
b9ba6d
Patch91: glibc-rh797094-2.patch
b9ba6d
Patch92: glibc-rh789238-2.patch
b9ba6d
Patch93: glibc-rh795498.patch
b9ba6d
Patch94: glibc-rh794817-2.patch
b9ba6d
Patch95: glibc-rh804689.patch
b9ba6d
Patch96: glibc-rh809602.patch
b9ba6d
Patch97: glibc-rh808337.patch
b9ba6d
Patch98: glibc-rh804630.patch
b9ba6d
Patch99: glibc-rh788959-2.patch
b9ba6d
Patch100: glibc-rh808545.patch
b9ba6d
b9ba6d
Patch10000: glibc-fix-implicit-rule.patch
b9ba6d
Patch10001: glibc-gcc47-ctordtor.patch
b9ba6d
Patch10002: glibc-rh783979.patch
b9ba6d
b9ba6d
# I'm not sure why we didn't see strict aliasing warnings with RHEL 6 builds, perhaps
b9ba6d
# it's due to the newer compiler in RHEL 7.
b9ba6d
Patch10003: glibc-rh883974.patch
b9ba6d
b9ba6d
# GCC recently removed -mnew-mnemonics for PPC
b9ba6d
Patch10004: glibc-ppc-mnemonics.patch
b9ba6d
b9ba6d
# Disable -ftree-loop-distribute-patterns  which converts open code to
b9ba6d
# memset, memcpy, etc.  This can cause infinte loops when compiling those
b9ba6d
# routines in glibc.  Furthermore it can create calls through the PLT in 
b9ba6d
# the dynamic linker when the PLT hasn't been set up yet.
b9ba6d
Patch10005: glibc-rh911307.patch
b9ba6d
b9ba6d
# Newer compiler is also complaining about overflow problems
b9ba6d
Patch10006: glibc-rh883974-2.patch
b9ba6d
8b7d6a
# Fix namespace conflict with Altivec
8b7d6a
Patch10007: glibc-rh1048853.patch
8b7d6a
b9ba6d
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
b9ba6d
Autoreq: true
b9ba6d
Autoprov: false
b9ba6d
Requires: compat-glibc-headers = %{epoch}:%{version}-%{release}
b9ba6d
# This is for building auxiliary programs like memusage, nscd
b9ba6d
# For initial glibc bootstraps it can be commented out
b9ba6d
BuildRequires: gd-devel libpng-devel zlib-devel texinfo, libselinux-devel >= 1.33.4-3
b9ba6d
BuildRequires: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext, nss-devel
b9ba6d
BuildRequires: /bin/ps, /bin/kill, /bin/awk
b9ba6d
%ifarch %{systemtaparches}
b9ba6d
BuildRequires: systemtap-sdt-devel
b9ba6d
%endif
b9ba6d
# This is to ensure that __frame_state_for is exported by glibc
b9ba6d
# will be compatible with egcs 1.x.y
b9ba6d
BuildRequires: gcc >= 3.2
b9ba6d
%define enablekernel 2.6.18
b9ba6d
%ifarch i386
b9ba6d
%define nptl_target_cpu i486
b9ba6d
%else
b9ba6d
%define nptl_target_cpu %{_target_cpu}
b9ba6d
%endif
b9ba6d
%ifarch %{multiarcharches}
b9ba6d
# Need STT_IFUNC support
b9ba6d
%ifarch ppc ppc64
b9ba6d
BuildRequires: binutils >= 2.20.51.0.2
b9ba6d
Conflicts: binutils < 2.20.51.0.2
b9ba6d
%else
b9ba6d
BuildRequires: binutils >= 2.19.51.0.10
b9ba6d
Conflicts: binutils < 2.19.51.0.10
b9ba6d
%endif
b9ba6d
# Earlier releases have broken support for IRELATIVE relocations
b9ba6d
Conflicts: prelink < 0.4.2
b9ba6d
%else
b9ba6d
# Need AS_NEEDED directive
b9ba6d
# Need --hash-style=* support
b9ba6d
BuildRequires: binutils >= 2.17.50.0.2-5
b9ba6d
%endif
b9ba6d
BuildRequires: gcc >= 3.2.1-5
b9ba6d
%ifarch ppc s390 s390x
b9ba6d
BuildRequires: gcc >= 4.1.0-0.17
b9ba6d
%endif
b9ba6d
%if 0%{?_enable_debug_packages}
b9ba6d
BuildRequires: elfutils >= 0.72
b9ba6d
BuildRequires: rpm >= 4.2-0.56
b9ba6d
%endif
b9ba6d
%define __find_provides %{_builddir}/%{glibcsrcdir}/find_provides.sh
b9ba6d
%define _filter_GLIBC_PRIVATE 1
b9ba6d
b9ba6d
%description
b9ba6d
This package contains stub shared libraries and static libraries
97220b
from CentOS Linux 6.
b9ba6d
b9ba6d
To compile and link against these compatibility libraries, use
b9ba6d
gcc -fgnu89-inline \
b9ba6d
      -I %{_prefix}/lib/%{_target_cpu}-redhat-linux6E/include \
b9ba6d
      -B %{_prefix}/lib/%{_target_cpu}-redhat-linux6E/%{_lib}/
b9ba6d
b9ba6d
b9ba6d
%package headers
b9ba6d
Summary: Header files for development using standard C libraries.
b9ba6d
Group: Development/Libraries
b9ba6d
Provides: %{name}-headers(%{_target_cpu})
b9ba6d
Requires: compat-glibc = %{epoch}:%{version}-%{release}
b9ba6d
%ifarch x86_64
b9ba6d
# If both -m32 and -m64 is to be supported on AMD64, x86_64 glibc-headers
b9ba6d
# have to be installed, not i586 ones.
b9ba6d
Obsoletes: %{name}-headers(i586)
b9ba6d
Obsoletes: %{name}-headers(i686)
b9ba6d
%endif
b9ba6d
Requires(pre): kernel-headers
b9ba6d
Requires: kernel-headers >= 2.2.1
b9ba6d
Requires: %{name} = %{epoch}:%{version}-%{release}
b9ba6d
BuildRequires: kernel-headers >= 2.6.22
b9ba6d
b9ba6d
%description headers
b9ba6d
The compat-glibc-headers package contains the header files from
97220b
CentOS Linux 6
b9ba6d
b9ba6d
b9ba6d
%prep
b9ba6d
%setup -q -n %{glibcsrcdir} -b1
b9ba6d
%patch0 -E -p1
b9ba6d
%ifarch ia64
b9ba6d
%if "%{_lib}" == "lib64"
b9ba6d
%patch1 -p1
b9ba6d
%endif
b9ba6d
%endif
b9ba6d
%patch2 -p1
b9ba6d
%patch3 -p1
b9ba6d
%patch4 -p1
b9ba6d
%patch5 -p1
b9ba6d
%patch6 -p1
b9ba6d
%patch7 -p1
b9ba6d
%patch8 -p1
b9ba6d
%patch9 -p1
b9ba6d
%patch10 -p1
b9ba6d
%patch11 -p1
b9ba6d
%patch12 -p1
b9ba6d
%patch13 -p1
b9ba6d
%patch14 -p1
b9ba6d
%patch15 -p1
b9ba6d
%patch16 -p1
b9ba6d
%patch17 -p1
b9ba6d
%patch18 -p1
b9ba6d
%patch19 -p1
b9ba6d
%patch20 -p1
b9ba6d
%patch21 -p1
b9ba6d
%patch22 -p1
b9ba6d
%patch23 -p1
b9ba6d
%patch24 -p1
b9ba6d
%patch25 -p1
b9ba6d
%patch26 -p1
b9ba6d
%patch27 -p1
b9ba6d
%patch28 -p1
b9ba6d
%patch29 -p1
b9ba6d
%patch30 -p1
b9ba6d
%patch31 -p1
b9ba6d
%patch32 -p1
b9ba6d
%patch33 -p1
b9ba6d
%patch34 -p1
b9ba6d
%patch35 -p1
b9ba6d
%patch36 -p1
b9ba6d
%patch37 -p1
b9ba6d
%patch38 -p1
b9ba6d
%patch39 -p1
b9ba6d
%patch40 -p1
b9ba6d
%patch41 -p1
b9ba6d
%patch42 -p1
b9ba6d
%patch43 -p1
b9ba6d
%patch45 -p1
b9ba6d
%patch46 -p1
b9ba6d
%patch47 -p1
b9ba6d
%patch48 -p1
b9ba6d
%patch49 -p1
b9ba6d
%patch50 -p1
b9ba6d
%patch51 -p1
b9ba6d
%patch52 -p1
b9ba6d
%patch53 -p1
b9ba6d
%patch54 -p1
b9ba6d
%patch55 -p1
b9ba6d
%patch56 -p1
b9ba6d
%patch57 -p1
b9ba6d
%patch58 -p1
b9ba6d
%patch59 -p1
b9ba6d
%patch60 -p1
b9ba6d
%patch61 -p1
b9ba6d
%patch62 -p1
b9ba6d
%patch63 -p1
b9ba6d
%patch64 -p1
b9ba6d
%patch65 -p1
b9ba6d
%patch66 -p1
b9ba6d
%patch67 -p1
b9ba6d
%patch68 -p1
b9ba6d
%patch69 -p1
b9ba6d
%patch70 -p1
b9ba6d
%patch72 -p1
b9ba6d
%patch73 -p1
b9ba6d
%patch74 -p1
b9ba6d
%patch75 -p1
b9ba6d
%patch76 -p1
b9ba6d
%patch77 -p1
b9ba6d
%patch78 -p1
b9ba6d
%patch79 -p1
b9ba6d
%patch80 -p1
b9ba6d
%patch81 -p1
b9ba6d
%patch82 -p1
b9ba6d
%patch83 -p1
b9ba6d
%patch84 -p1
b9ba6d
%patch85 -p1
b9ba6d
%patch86 -p1
b9ba6d
%patch88 -p1
b9ba6d
%patch89 -p1
b9ba6d
%patch90 -p1
b9ba6d
%patch91 -p1
b9ba6d
%patch92 -p1
b9ba6d
%patch93 -p1
b9ba6d
%patch94 -p1
b9ba6d
%patch95 -p1
b9ba6d
%patch96 -p1
b9ba6d
%patch97 -p1
b9ba6d
%patch98 -p1
b9ba6d
%patch99 -p1
b9ba6d
%patch100 -p1
b9ba6d
b9ba6d
# These are compat-glibc specific changes necessary for the old glibc to
b9ba6d
# build with new compilers.
b9ba6d
%patch10000 -p1
b9ba6d
%patch10001 -p1
b9ba6d
%patch10002 -p1
b9ba6d
%patch10003 -p1
b9ba6d
%patch10004 -p1
b9ba6d
%patch10005 -p1
b9ba6d
%patch10006 -p1
8b7d6a
%patch10007 -p1
b9ba6d
b9ba6d
find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \;
b9ba6d
touch `find . -name configure`
b9ba6d
touch locale/programs/*-kw.h
b9ba6d
b9ba6d
%build
b9ba6d
GCC=gcc
b9ba6d
GXX=g++
b9ba6d
%ifarch %{ix86}
b9ba6d
BuildFlags="-march=%{nptl_target_cpu} -mtune=generic"
b9ba6d
%endif
b9ba6d
%ifarch i686
b9ba6d
BuildFlags="-march=i686 -mtune=generic"
b9ba6d
%endif
b9ba6d
%ifarch i386 i486 i586
b9ba6d
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
b9ba6d
%endif
b9ba6d
%ifarch x86_64
b9ba6d
BuildFlags="-mtune=generic"
b9ba6d
%endif
b9ba6d
%ifarch alphaev6
b9ba6d
BuildFlags="-mcpu=ev6"
b9ba6d
%endif
b9ba6d
%ifarch sparc
b9ba6d
BuildFlags="-fcall-used-g6"
b9ba6d
GCC="gcc -m32"
b9ba6d
GXX="g++ -m32"
b9ba6d
%endif
b9ba6d
%ifarch sparcv9
b9ba6d
BuildFlags="-mcpu=ultrasparc -fcall-used-g6"
b9ba6d
GCC="gcc -m32"
b9ba6d
GXX="g++ -m32"
b9ba6d
%endif
b9ba6d
%ifarch sparcv9v
b9ba6d
BuildFlags="-mcpu=niagara -fcall-used-g6"
b9ba6d
GCC="gcc -m32"
b9ba6d
GXX="g++ -m32"
b9ba6d
%endif
b9ba6d
%ifarch sparc64
b9ba6d
BuildFlags="-mcpu=ultrasparc -mvis -fcall-used-g6"
b9ba6d
GCC="gcc -m64"
b9ba6d
GXX="g++ -m64"
b9ba6d
%endif
b9ba6d
%ifarch sparc64v
b9ba6d
BuildFlags="-mcpu=niagara -mvis -fcall-used-g6"
b9ba6d
GCC="gcc -m64"
b9ba6d
GXX="g++ -m64"
b9ba6d
%endif
b9ba6d
%ifarch ppc64
b9ba6d
BuildFlags="-mno-minimal-toc"
b9ba6d
GCC="gcc -m64"
b9ba6d
GXX="g++ -m64"
b9ba6d
%endif
b9ba6d
b9ba6d
BuildFlags="$BuildFlags -fgnu89-inline"
b9ba6d
# Add -DNDEBUG unless using a prerelease
b9ba6d
case %{version} in
b9ba6d
  *.*.9[0-9]*) ;;
b9ba6d
  *)
b9ba6d
     BuildFlags="$BuildFlags -DNDEBUG"
b9ba6d
     ;;
b9ba6d
esac
b9ba6d
EnableKernel="--enable-kernel=%{enablekernel}"
b9ba6d
echo "$GCC" > Gcc
b9ba6d
AddOns=`echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|powerpc-cpu\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d'`
b9ba6d
%ifarch %{rtkaioarches}
b9ba6d
AddOns=,rtkaio$AddOns
b9ba6d
%endif
b9ba6d
b9ba6d
build_nptl()
b9ba6d
{
b9ba6d
builddir=build-%{nptl_target_cpu}-$1
b9ba6d
shift
b9ba6d
rm -rf $builddir
b9ba6d
mkdir $builddir ; cd $builddir
b9ba6d
build_CFLAGS="$BuildFlags -g -O3 $*"
b9ba6d
../configure CC="$GCC" CXX="$GXX" CFLAGS="$build_CFLAGS" \
b9ba6d
	--prefix=%{_prefix} \
b9ba6d
	--enable-add-ons=nptl$AddOns --without-cvs $EnableKernel \
b9ba6d
	--without-selinux \
b9ba6d
	--with-headers=%{_prefix}/include --enable-bind-now \
b9ba6d
	--with-tls --with-__thread --build %{nptl_target_cpu}-redhat-linux \
b9ba6d
	--host %{nptl_target_cpu}-redhat-linux \
b9ba6d
%ifarch %{multiarcharches}
b9ba6d
	--enable-multi-arch \
b9ba6d
%endif
b9ba6d
%ifarch %{systemtaparches}
b9ba6d
	--enable-systemtap \
b9ba6d
%endif
b9ba6d
	--disable-profile --enable-experimental-malloc --enable-nss-crypt
b9ba6d
b9ba6d
make %{?_smp_mflags} -r CFLAGS="$build_CFLAGS" PARALLELMFLAGS=-s
b9ba6d
b9ba6d
cd ..
b9ba6d
}
b9ba6d
b9ba6d
build_nptl linuxnptl
b9ba6d
b9ba6d
%install
b9ba6d
GCC=`cat Gcc`
b9ba6d
b9ba6d
rm -rf $RPM_BUILD_ROOT
b9ba6d
mkdir -p $RPM_BUILD_ROOT
b9ba6d
make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{nptl_target_cpu}-linuxnptl PARALLELMFLAGS=-s
b9ba6d
chmod +x $RPM_BUILD_ROOT%{_prefix}/libexec/pt_chown
b9ba6d
%ifnarch %{auxarches}
b9ba6d
cd build-%{nptl_target_cpu}-linuxnptl && \
b9ba6d
  make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd` && \
b9ba6d
  cd ..
b9ba6d
%endif
b9ba6d
b9ba6d
# Remove the files we don't want to distribute
b9ba6d
rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libNoVersion*
b9ba6d
rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion*
b9ba6d
rm -f $RPM_BUILD_ROOT{%{_prefix},}/%{_lib}/lib{NoVersion,nss,BrokenLocale}*
b9ba6d
b9ba6d
# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include
b9ba6d
# the generic one (#162634)
b9ba6d
cp -a bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h
b9ba6d
# And <bits/libc-lock.h> needs sanitizing as well.
b9ba6d
cp -a fedora/libc-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/libc-lock.h
b9ba6d
b9ba6d
ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libbsd.a
b9ba6d
b9ba6d
strip -g $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.o
b9ba6d
b9ba6d
# rquota.x and rquota.h are now provided by quota
b9ba6d
rm -f $RPM_BUILD_ROOT%{_prefix}/include/rpcsvc/rquota.[hx]
b9ba6d
b9ba6d
COMPATD=$RPM_BUILD_ROOT%{_prefix}/lib/%{_target_cpu}-redhat-linux6E
b9ba6d
b9ba6d
mkdir -p $COMPATD/%{_lib}
b9ba6d
b9ba6d
mv -f $RPM_BUILD_ROOT%{_prefix}/include $COMPATD/
b9ba6d
mv -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.[oa] $COMPATD/%{_lib}
b9ba6d
strip -R .comment -g $COMPATD/%{_lib}/*.a
b9ba6d
ln -sf libbsd-compat.a $COMPATD/%{_lib}/libbsd.a
b9ba6d
mkdir -p $RPM_BUILD_ROOT%{_prefix}/tmp
b9ba6d
cp -a $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.so $RPM_BUILD_ROOT%{_prefix}/tmp
b9ba6d
rm -f $RPM_BUILD_ROOT%{_prefix}/tmp/libc.so
b9ba6d
rm -f $RPM_BUILD_ROOT%{_prefix}/tmp/libpthread.so
b9ba6d
pushd $RPM_BUILD_ROOT%{_prefix}/tmp
b9ba6d
ln -sf ../../%{_lib}/libc.so.6* libc.so
b9ba6d
ln -sf ../../%{_lib}/libpthread.so.0* libpthread.so
b9ba6d
popd
b9ba6d
b9ba6d
cd build-%{nptl_target_cpu}-linuxnptl
b9ba6d
for libpath in $RPM_BUILD_ROOT%{_prefix}/tmp/*.so; do
b9ba6d
  lib=`basename $libpath .so`
b9ba6d
  sh %{SOURCE2} $libpath $COMPATD/%{_lib}/$lib.so $lib.map
b9ba6d
done
b9ba6d
b9ba6d
mv $COMPATD/%{_lib}/libc.so $COMPATD/%{_lib}/libc_real.so
b9ba6d
mv $COMPATD/%{_lib}/libpthread.so $COMPATD/%{_lib}/libpthread_real.so
b9ba6d
LDIR=%{_prefix}/lib/%{_target_cpu}-redhat-linux6E/%{_lib}
b9ba6d
sed 's~^GROUP.*$~GROUP ('$LDIR'/libc_real.so '$LDIR'/libc_nonshared.a )~' \
b9ba6d
  $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libc.so > $COMPATD/%{_lib}/libc.so
b9ba6d
sed 's~^GROUP.*$~GROUP ('$LDIR'/libpthread_real.so '$LDIR'/libpthread_nonshared.a )~' \
b9ba6d
  $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libpthread.so > $COMPATD/%{_lib}/libpthread.so
b9ba6d
b9ba6d
%clean
b9ba6d
rm -rf "$RPM_BUILD_ROOT"
b9ba6d
b9ba6d
%files 
b9ba6d
%defattr(-,root,root)
b9ba6d
%dir %{_prefix}/lib/%{_target_cpu}-redhat-linux6E
b9ba6d
%dir %{_prefix}/lib/%{_target_cpu}-redhat-linux6E/%{_lib}
b9ba6d
%{_prefix}/lib/%{_target_cpu}-redhat-linux6E/%{_lib}/*.[oa]
b9ba6d
%{_prefix}/lib/%{_target_cpu}-redhat-linux6E/%{_lib}/*.so
b9ba6d
b9ba6d
%files headers
b9ba6d
%defattr(-,root,root)
b9ba6d
%dir %{_prefix}/lib/%{_target_cpu}-redhat-linux6E
b9ba6d
%{_prefix}/lib/%{_target_cpu}-redhat-linux6E/include
b9ba6d
b9ba6d
b9ba6d
%changelog
97220b
* Fri Jun 27 2014 Johnny Hughes <johnny@centos.org> - 1:2.12-4.el7.centos
97220b
- Change Branding in the spec file
97220b
8b7d6a
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1:2.12-4
8b7d6a
- Mass rebuild 2014-01-24
8b7d6a
8b7d6a
* Tue Jan  7 2014 Siddhesh Poyarekar <siddhesh@redhat.com> - 1:2.12-3
8b7d6a
- Fix namespace conflict with Altivec (#1048853).
8b7d6a
8b7d6a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1:2.12-2
8b7d6a
- Mass rebuild 2013-12-27
8b7d6a
b9ba6d
* Fri Jul 19 2013 Jeff Law <law@redhat.com> - 1:2.12-1.80.5
b9ba6d
- Backport timezone/zic.c change to avoid overflow in oadd (#883974) 
b9ba6d
b9ba6d
* Tue May 28 2013 Jeff Law <law@redhat.com> - 1:2.12-1.80.4
b9ba6d
- Fix passing of -z execstack to the linker.
b9ba6d
- Remove -mnew-mnenomics from PPC build flags
b9ba6d
- Pull over patch for 911307 from Fedora
b9ba6d
b9ba6d
* Mon May 20 2013 Jeff Law <law@redhat.com> - 1:2.12-1.80.3
b9ba6d
- Add -z execstack to command line for building DSOs in
b9ba6d
  dummylib.sh (#883974)
b9ba6d
b9ba6d
* Wed Jan 2 2013 Jeff Law <law@redhat.com> - 1:2.12-1.80.2
b9ba6d
- Backport change to avoid strict-aliasing problems in 
b9ba6d
  md5.c (#883974)
b9ba6d
b9ba6d
* Wed Jun 13 2012 Daniel Mach <dmach@redhat.com> - 1:2.12-1.80.1
b9ba6d
- add missing epoch to Requires: in headers package
b9ba6d
b9ba6d
* Fri Jun 8 2012 Jeff Law <law@redhat.com> - 1:2.12-1.80
b9ba6d
- changed into compatibility package