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
|
Tue Jan 3 15:36:12 UTC 2012 - aj@suse.de
|
||||||
|
|
||||||
|
75
glibc.spec
75
glibc.spec
@ -160,6 +160,8 @@ Patch47: glibc-nscd-hconf.diff
|
|||||||
Patch49: glibc-fini-unwind.diff
|
Patch49: glibc-fini-unwind.diff
|
||||||
# PATCH-FIX-OPENSUSE bnc#657627
|
# PATCH-FIX-OPENSUSE bnc#657627
|
||||||
Patch52: glibc-elf-localscope.diff
|
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
|
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
|
||||||
Patch65: glibc-fix-double-loopback.diff
|
Patch65: glibc-fix-double-loopback.diff
|
||||||
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
|
||||||
@ -392,6 +394,7 @@ rm nscd/s-stamp
|
|||||||
%patch47 -p1
|
%patch47 -p1
|
||||||
%patch49
|
%patch49
|
||||||
%patch52
|
%patch52
|
||||||
|
%patch58
|
||||||
%patch65 -p1
|
%patch65 -p1
|
||||||
%patch66 -p1
|
%patch66 -p1
|
||||||
%patch67 -p1
|
%patch67 -p1
|
||||||
@ -482,8 +485,9 @@ PARALLEL="%{?_smp_mflags}"
|
|||||||
%ifarch hppa
|
%ifarch hppa
|
||||||
BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing"
|
BuildFlags="$BuildFlags -mpa-risc-1-1 -fstrict-aliasing"
|
||||||
%endif
|
%endif
|
||||||
%ifarch %ix86
|
%ifarch i386 i486 i586
|
||||||
# Add this to avoid performance penalty on Xen for 32-bit x86
|
# 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"
|
BuildFlags="$BuildFlags -mno-tls-direct-seg-refs"
|
||||||
%endif
|
%endif
|
||||||
# Add flags for all plattforms except AXP
|
# Add flags for all plattforms except AXP
|
||||||
@ -544,6 +548,9 @@ configure_and_build_glibc() {
|
|||||||
# Build base glibc
|
# Build base glibc
|
||||||
#
|
#
|
||||||
configure_and_build_glibc base "$BuildFlags" "$add_ons"
|
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
|
%else
|
||||||
#
|
#
|
||||||
# Build POWER-optimized glibc
|
# Build POWER-optimized glibc
|
||||||
@ -657,44 +664,63 @@ touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
|
|||||||
# Do not install in parallel, timezone Makefile will fail
|
# Do not install in parallel, timezone Makefile will fail
|
||||||
make install_root=%{buildroot} install -C cc-base
|
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
|
# Install power-optimized glibc
|
||||||
%if %{optimize_power}
|
%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}
|
%if %{powerpc_optimize_cpu_power4}
|
||||||
power4 \
|
install_optimized_variant power4 power4 ".."
|
||||||
%endif
|
%endif
|
||||||
%if %{powerpc_optimize_cpu_power6}
|
%if %{powerpc_optimize_cpu_power6}
|
||||||
power6 \
|
install_optimized_variant power6 power6 ".."
|
||||||
%endif
|
%endif
|
||||||
%if %{powerpc_optimize_cpu_power7}
|
%if %{powerpc_optimize_cpu_power7}
|
||||||
power7 \
|
install_optimized_variant power7 power7 ".."
|
||||||
%endif
|
%endif
|
||||||
%if %{powerpc_optimize_cpu_cell}
|
%if %{powerpc_optimize_cpu_cell}
|
||||||
ppc-cell-be \
|
install_optimized_variant ppc-cell-be ppc-cell-be ".."
|
||||||
%endif
|
%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}
|
%if %{powerpc_optimize_cpu_power6}
|
||||||
# power6 is compatible with power6x
|
# power6 is compatible with power6x
|
||||||
# doing a symlink doesnt work, ldconfig follows them and accepts only the first real dir
|
# doing a directory symlink doesnt work, ldconfig follows them and accepts only the first real dir
|
||||||
if test -d %{buildroot}/%{_lib}/power6; then
|
if test -d %{buildroot}/%{_lib}/power6; then
|
||||||
mkdir -p %{buildroot}/%{_lib}/power6x
|
mkdir -p %{buildroot}/%{_lib}/power6x
|
||||||
for i in %{buildroot}/%{_lib}/power6/*.so; do
|
for i in %{buildroot}/%{_lib}/power6/*.so; do
|
||||||
b=`basename $i`
|
b=`basename $i`
|
||||||
ln -vs ../power6/$b %{buildroot}/%{_lib}/power6x/$b
|
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
|
done
|
||||||
$my_ldconfig -n %{buildroot}/%{_lib}/power6x/
|
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
%endif # optimize_power
|
%endif # optimize_power
|
||||||
@ -938,7 +964,6 @@ exit 0
|
|||||||
/%{_lib}/libthread_db.so.1
|
/%{_lib}/libthread_db.so.1
|
||||||
/%{_lib}/libutil-%{version}.so
|
/%{_lib}/libutil-%{version}.so
|
||||||
/%{_lib}/libutil.so.1
|
/%{_lib}/libutil.so.1
|
||||||
%if %{optimize_power}
|
|
||||||
%define optimized_libs() \
|
%define optimized_libs() \
|
||||||
%dir %attr(0755,root,root) /%{_lib}/%1\
|
%dir %attr(0755,root,root) /%{_lib}/%1\
|
||||||
/%{_lib}/%1/libc-%{version}.so\
|
/%{_lib}/%1/libc-%{version}.so\
|
||||||
@ -951,6 +976,12 @@ exit 0
|
|||||||
/%{_lib}/%1/librt.so.1\
|
/%{_lib}/%1/librt.so.1\
|
||||||
/%{_lib}/%1/libthread_db-1.0.so\
|
/%{_lib}/%1/libthread_db-1.0.so\
|
||||||
/%{_lib}/%1/libthread_db.so.1
|
/%{_lib}/%1/libthread_db.so.1
|
||||||
|
|
||||||
|
%ifarch i686
|
||||||
|
%dir %attr(0755,root,root) /%{_lib}/i686
|
||||||
|
%{optimized_libs i686/nosegneg}
|
||||||
|
%endif
|
||||||
|
%if %{optimize_power}
|
||||||
%if %{powerpc_optimize_cpu_power4}
|
%if %{powerpc_optimize_cpu_power4}
|
||||||
%{optimized_libs power4}
|
%{optimized_libs power4}
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user