Accepting request 98702 from home:a_jaeger:my-factory-packages
Cleanup spec file. OBS-URL: https://build.opensuse.org/request/show/98702 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=149
This commit is contained in:
parent
e98a7887f7
commit
6ce42a1fac
12
glibc-strict-aliasing.diff
Normal file
12
glibc-strict-aliasing.diff
Normal file
@ -0,0 +1,12 @@
|
||||
Index: elf/Makefile
|
||||
===================================================================
|
||||
--- elf/Makefile.orig
|
||||
+++ elf/Makefile
|
||||
@@ -133,6 +133,7 @@ include ../Makeconfig
|
||||
ifeq ($(unwind-find-fde),yes)
|
||||
routines += unwind-dw2-fde-glibc
|
||||
shared-only-routines += unwind-dw2-fde-glibc
|
||||
+CFLAGS-unwind-dw2-fde-glibc.c = -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
before-compile = $(objpfx)trusted-dirs.h
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 19:42:17 UTC 2012 - aj@suse.de
|
||||
|
||||
- Compile unwind-dw2-fde-glibc.c with -fno-strict-aliasing
|
||||
(patch glibc-strict-aliasing.diff)
|
||||
- Build on i686 a separate library for usage under Xen.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 3 15:36:12 UTC 2012 - aj@suse.de
|
||||
|
||||
|
113
glibc.spec
113
glibc.spec
@ -160,6 +160,8 @@ Patch47: glibc-nscd-hconf.diff
|
||||
Patch49: glibc-fini-unwind.diff
|
||||
# PATCH-FIX-OPENSUSE bnc#657627
|
||||
Patch52: glibc-elf-localscope.diff
|
||||
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
|
||||
Patch58: glibc-strict-aliasing.diff
|
||||
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
||||
Patch65: glibc-fix-double-loopback.diff
|
||||
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
||||
@ -392,6 +394,7 @@ rm nscd/s-stamp
|
||||
%patch47 -p1
|
||||
%patch49
|
||||
%patch52
|
||||
%patch58
|
||||
%patch65 -p1
|
||||
%patch66 -p1
|
||||
%patch67 -p1
|
||||
@ -482,8 +485,9 @@ PARALLEL="%{?_smp_mflags}"
|
||||
%ifarch hppa
|
||||
BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing"
|
||||
%endif
|
||||
%ifarch %ix86
|
||||
%ifarch i386 i486 i586
|
||||
# Add this to avoid performance penalty on Xen for 32-bit x86
|
||||
# Note on i686 we build a special library
|
||||
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
|
||||
%endif
|
||||
# Add flags for all plattforms except AXP
|
||||
@ -544,6 +548,9 @@ configure_and_build_glibc() {
|
||||
# Build base glibc
|
||||
#
|
||||
configure_and_build_glibc base "$BuildFlags" "$add_ons"
|
||||
%ifarch i686
|
||||
configure_and_build_glibc nosegneg "$BuildFlags -mno-tls-direct-seg-refs" "$add_ons"
|
||||
%endif
|
||||
%else
|
||||
#
|
||||
# Build POWER-optimized glibc
|
||||
@ -657,45 +664,64 @@ touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
|
||||
# Do not install in parallel, timezone Makefile will fail
|
||||
make install_root=%{buildroot} install -C cc-base
|
||||
|
||||
install_optimized_variant() {
|
||||
local dirname="$1"; shift
|
||||
local subdir="$1"; shift
|
||||
local subdir_up="$1"; shift
|
||||
|
||||
cd "cc-$dirname"
|
||||
destdir=$RPM_BUILD_ROOT/%{_lib}/$subdir
|
||||
mkdir -p $destdir
|
||||
# Don't run a complete make install, we know which libraries
|
||||
# we want
|
||||
for lib in libc math/libm nptl/libpthread rt/librt nptl_db/libthread_db
|
||||
do
|
||||
libbase=${lib#*/}
|
||||
libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
|
||||
# Only install if different from base lib
|
||||
if cmp -s ${lib}.so ../cc-base/${lib}.so; then
|
||||
ln -sf $subdir_up/$libbaseso $destdir/$libbaseso
|
||||
else
|
||||
cp -a ${lib}.so $destdir/$libbaseso
|
||||
fi
|
||||
# Emulate ldconfig
|
||||
ln -sf $libbaseso $destdir/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
|
||||
done
|
||||
cd ..
|
||||
}
|
||||
# Install i686 glibc for Xen
|
||||
%ifarch i686
|
||||
install_optimized_variant nosegneg i686/nosegneg "../.."
|
||||
%endif
|
||||
|
||||
# Install power-optimized glibc
|
||||
%if %{optimize_power}
|
||||
# run ldconfig to create the library symlinks
|
||||
# do not use the new ldconfig from the build directory because
|
||||
# it may contain instructions not suitable for the cpu on the builhost
|
||||
my_ldconfig=/sbin/ldconfig
|
||||
for pcpu in \
|
||||
%if %{powerpc_optimize_cpu_power4}
|
||||
power4 \
|
||||
install_optimized_variant power4 power4 ".."
|
||||
%endif
|
||||
%if %{powerpc_optimize_cpu_power6}
|
||||
power6 \
|
||||
install_optimized_variant power6 power6 ".."
|
||||
%endif
|
||||
%if %{powerpc_optimize_cpu_power7}
|
||||
power7 \
|
||||
install_optimized_variant power7 power7 ".."
|
||||
%endif
|
||||
%if %{powerpc_optimize_cpu_cell}
|
||||
ppc-cell-be \
|
||||
install_optimized_variant ppc-cell-be ppc-cell-be ".."
|
||||
%endif
|
||||
; do
|
||||
make install_root=%{buildroot}/$pcpu install -C cc-$pcpu
|
||||
mkdir -p %{buildroot}/%{_lib}/$pcpu
|
||||
for i in libc-%{version} libm-%{version} libpthread-%{version} libthread_db-1.0 librt-%{version}; do
|
||||
mv %{buildroot}/$pcpu/%{_lib}/$i.so %{buildroot}/%{_lib}/$pcpu
|
||||
done
|
||||
$my_ldconfig -n %{buildroot}/%{_lib}/$pcpu/
|
||||
rm -rf %{buildroot}/$pcpu
|
||||
done
|
||||
%if %{powerpc_optimize_cpu_power6}
|
||||
# power6 is compatible with power6x
|
||||
# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir
|
||||
if test -d %{buildroot}/%{_lib}/power6; then
|
||||
mkdir -p %{buildroot}/%{_lib}/power6x
|
||||
for i in %{buildroot}/%{_lib}/power6/*.so; do
|
||||
b=`basename $i`
|
||||
ln -vs ../power6/$b %{buildroot}/%{_lib}/power6x/$b
|
||||
done
|
||||
$my_ldconfig -n %{buildroot}/%{_lib}/power6x/
|
||||
fi
|
||||
# power6 is compatible with power6x
|
||||
# doing a directory symlink doesnt work, ldconfig follows them and accepts only the first real dir
|
||||
if test -d %{buildroot}/%{_lib}/power6; then
|
||||
mkdir -p %{buildroot}/%{_lib}/power6x
|
||||
for i in %{buildroot}/%{_lib}/power6/*.so; do
|
||||
b=`basename $i`
|
||||
ln -vs ../power6/$b %{buildroot}/%{_lib}/power6x/$b
|
||||
libbase=${b%.so}
|
||||
libbaseso=$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}-*.so)
|
||||
# Emulate ldconfig
|
||||
ln -sf $libbaseso %{buildroot}/%{_lib}/power6x/$(basename $RPM_BUILD_ROOT/%{_lib}/${libbase}.so.*)
|
||||
done
|
||||
fi
|
||||
%endif
|
||||
%endif # optimize_power
|
||||
|
||||
@ -938,19 +964,24 @@ exit 0
|
||||
/%{_lib}/libthread_db.so.1
|
||||
/%{_lib}/libutil-%{version}.so
|
||||
/%{_lib}/libutil.so.1
|
||||
%define optimized_libs() \
|
||||
%dir %attr(0755,root,root) /%{_lib}/%1\
|
||||
/%{_lib}/%1/libc-%{version}.so\
|
||||
/%{_lib}/%1/libc.so.6*\
|
||||
/%{_lib}/%1/libm-%{version}.so\
|
||||
/%{_lib}/%1/libm.so.6*\
|
||||
/%{_lib}/%1/libpthread-%{version}.so\
|
||||
/%{_lib}/%1/libpthread.so.0\
|
||||
/%{_lib}/%1/librt-%{version}.so\
|
||||
/%{_lib}/%1/librt.so.1\
|
||||
/%{_lib}/%1/libthread_db-1.0.so\
|
||||
/%{_lib}/%1/libthread_db.so.1
|
||||
|
||||
%ifarch i686
|
||||
%dir %attr(0755,root,root) /%{_lib}/i686
|
||||
%{optimized_libs i686/nosegneg}
|
||||
%endif
|
||||
%if %{optimize_power}
|
||||
%define optimized_libs() \
|
||||
%dir %attr(0755,root,root) /%{_lib}/%1\
|
||||
/%{_lib}/%1/libc-%{version}.so\
|
||||
/%{_lib}/%1/libc.so.6*\
|
||||
/%{_lib}/%1/libm-%{version}.so\
|
||||
/%{_lib}/%1/libm.so.6*\
|
||||
/%{_lib}/%1/libpthread-%{version}.so\
|
||||
/%{_lib}/%1/libpthread.so.0\
|
||||
/%{_lib}/%1/librt-%{version}.so\
|
||||
/%{_lib}/%1/librt.so.1\
|
||||
/%{_lib}/%1/libthread_db-1.0.so\
|
||||
/%{_lib}/%1/libthread_db.so.1
|
||||
%if %{powerpc_optimize_cpu_power4}
|
||||
%{optimized_libs power4}
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user