%define _without_memusage 1
%endif
-%define new_target_cpu %(echo "%{_target_cpu}" | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/athlon/i386/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/)
# Define to build a biarch package
%global with_biarch 0
%build
basedir=$(pwd)
-# Prepare kernel headers
-_headers_dir=`pwd`/usr/include; export _headers_dir;
-(cd $_headers_dir && ln -s asm-%{new_target_cpu} asm)
BuildGlibc() {
arch="$1"
esac
# Library name
+ # Prepare kernel headers
+ _headers_dir=`pwd`/usr/include; export _headers_dir;
+ (cd $_headers_dir && rm asm)
+ (cd $_headers_dir && ln -s asm-`echo $arch | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/athlon/i386/ -e s/arm.*/arm/ -e s/sa110/arm/ -e s/s390x/s390/` asm)
+
glibc_cv_cc_64bit_output=no
if echo ".text" | $BuildCC -c -o test.o -xassembler -; then
case `/usr/bin/file test.o` in
#CFLAGS="-I $_headers_dir %{rpmcflags}"; export CFLAGS
../%configure \
CC="${BuildCC}" \
- CFLAGS="${BuildCCFlags}" \
+ --build=${arch}-%{_vendor}-%{_target_os} \
--libexecdir="%{_prefix}/$glibc_libname" \
--enable-add-ons=linuxthreads%{?with_idn:,libidn} \
--enable-kernel="%{min_kernel}" \
}
# Build main glibc
-BuildGlibc "%{new_target_cpu}"
-
%if %{with_biarch}
%ifarch x86_64
BuildGlibc "athlon"
%endif
+
+BuildGlibc "%{_target_cpu}"
%endif
%install
_headers_dir=`pwd`/usr/include; export _headers_dir;
-cd builddir-%{new_target_cpu}
+cd builddir-%{_target_cpu}
env LANGUAGE=C LC_ALL=C \
%{__make} install \