]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc.spec
- small mistake fixed
[packages/glibc.git] / glibc.spec
index a1389ec733ebc61714d1d3a529b2152395925cca..7988f9b87f828fa82d99337d99097ab01b940704 100644 (file)
@@ -116,7 +116,6 @@ Conflicts:  rpm < 4.1
 %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
@@ -810,9 +809,6 @@ touch libidn/libidn.texi
 
 %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"
@@ -835,6 +831,11 @@ BuildGlibc() {
   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
@@ -862,7 +863,7 @@ BuildGlibc() {
   #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}" \
@@ -884,12 +885,12 @@ BuildGlibc() {
 }
 
 # Build main glibc
-BuildGlibc "%{new_target_cpu}"
-
 %if %{with_biarch}
 %ifarch x86_64
 BuildGlibc "athlon"
 %endif
+
+BuildGlibc "%{_target_cpu}"
 %endif
 
 %install
@@ -899,7 +900,7 @@ install -d $RPM_BUILD_ROOT{/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_mandir}/m
 
 _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 \
This page took 0.044166 seconds and 4 git commands to generate.