diff --git a/glibc-2.5-ppc-llrintl.diff b/glibc-2.5-ppc-llrintl.diff new file mode 100644 index 0000000..3a65665 --- /dev/null +++ b/glibc-2.5-ppc-llrintl.diff @@ -0,0 +1,19 @@ +Index: powerpc-cpu/sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S +=================================================================== +--- powerpc-cpu/sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S.orig ++++ powerpc-cpu/sysdeps/powerpc/powerpc32/powerpc64/fpu/s_llrint.S +@@ -18,6 +18,7 @@ + 02110-1301 USA. */ + + #include ++#include + + /* long long int[r3, r4] __llrint (double x[fp1]) */ + ENTRY (__llrint) +@@ -41,3 +42,6 @@ weak_alias (__llrint, llrint) + strong_alias (__llrint, __llrintl) + weak_alias (__llrint, llrintl) + #endif ++#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) ++compat_symbol (libm, __llrint, llrintl, GLIBC_2_1) ++#endif diff --git a/glibc.changes b/glibc.changes index 20c8e7d..545a3b6 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 22 08:30:50 CEST 2010 - meissner@suse.de + +- for powerpc32 build a generic library and also a power4 library + to allow older 32bit powerpc to work. bnc#596271 + ------------------------------------------------------------------- Tue Apr 20 13:15:19 CEST 2010 - pbaudis@suse.cz diff --git a/glibc.spec b/glibc.spec index 41721df..1518127 100644 --- a/glibc.spec +++ b/glibc.spec @@ -28,8 +28,15 @@ BuildRequires: libselinux-devel %define enable_stackguard_randomization 1 %ifarch ppc ppc64 %define optimize_power 1 + %ifarch ppc + %define powerpc_optimize_base power3 + %define powerpc_optimize_tune power3 + %define powerpc_optimize_cpu_power4 1 + %else %define powerpc_optimize_base power4 %define powerpc_optimize_tune power5 + %define powerpc_optimize_cpu_power4 0 + %endif # We are not building Power CPU specific optimizations for openSUSE. %define powerpc_optimize_cpu_power6 0 %define powerpc_optimize_cpu_power7 0 @@ -37,6 +44,7 @@ BuildRequires: libselinux-devel %else %define optimize_power 0 %define powerpc_optimize_base 0 + %define powerpc_optimize_cpu_power4 0 %define powerpc_optimize_cpu_power6 0 %define powerpc_optimize_cpu_power7 0 %define powerpc_optimize_cpu_cell 0 @@ -498,9 +506,17 @@ configure_and_build_glibc() { # # First, base build: pBuildFlags="$BuildFlags -mcpu=%{powerpc_optimize_base} -mtune=%{powerpc_optimize_tune}" + %if %{powerpc_optimize_base} != "power3" configure_and_build_glibc base "$pBuildFlags" "$add_ons" --with-cpu=%{powerpc_optimize_base} + %else + # Use no default CPU + configure_and_build_glibc base "$pBuildFlags" "$add_ons" + %endif # Then other power variants: for pcpu in \ + %if %{powerpc_optimize_cpu_power4} + power4 \ + %endif %if %{powerpc_optimize_cpu_power6} power6 \ %endif @@ -527,8 +543,11 @@ make -C cc-base html # $BuildCC -static -Os -g $RPM_SOURCE_DIR/glibc_post_upgrade.c -o glibc_post_upgrade \ -Lcc-base -Bcc-base/csu \ - '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER4' '-DREMOVE_PPC_OPTIMIZE_POWER5' \ + '-DREMOVE_TLS_DIRS' '-DREMOVE_PPC_OPTIMIZE_POWER5' \ %ifarch ppc ppc64 + %if !%{powerpc_optimize_cpu_power4} + '-DREMOVE_PPC_OPTIMIZE_POWER4' \ + %endif %if !%{powerpc_optimize_cpu_power6} '-DREMOVE_PPC_OPTIMIZE_POWER6' \ %endif @@ -598,6 +617,9 @@ make install_root=$RPM_BUILD_ROOT install -C cc-base # 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 \ + %endif %if %{powerpc_optimize_cpu_power6} power6 \ %endif @@ -889,6 +911,9 @@ exit 0 /%{_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 %if %{powerpc_optimize_cpu_power6} %{optimized_libs power6} %{optimized_libs power6x} diff --git a/powerpc-cpu.tar.bz2 b/powerpc-cpu.tar.bz2 new file mode 100644 index 0000000..715978c --- /dev/null +++ b/powerpc-cpu.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c59f80e38c9f6ad339d72bbfbc454364659686567b7689d33483b9cb4a12bf2a +size 36248