SPECS (LINUX_2_6_22): uClibc.spec - pass TARGET_ARCH to makefile, ...

glen glen at pld-linux.org
Thu Apr 3 18:52:10 CEST 2008


Author: glen                         Date: Thu Apr  3 16:52:10 2008 GMT
Module: SPECS                         Tag: LINUX_2_6_22
---- Log message:
- pass TARGET_ARCH to makefile, as makefile has some chicken-egg issue resulting 64bit ldso name; rel 13

---- Files affected:
SPECS:
   uClibc.spec (1.153.2.11 -> 1.153.2.12) 

---- Diffs:

================================================================
Index: SPECS/uClibc.spec
diff -u SPECS/uClibc.spec:1.153.2.11 SPECS/uClibc.spec:1.153.2.12
--- SPECS/uClibc.spec:1.153.2.11	Thu Apr  3 17:20:25 2008
+++ SPECS/uClibc.spec	Thu Apr  3 18:52:05 2008
@@ -12,7 +12,7 @@
 Summary(pl.UTF-8):	Biblioteka C zoptymalizowana na rozmiar
 Name:		uClibc
 Version:	0.9.29
-Release:	12
+Release:	13
 Epoch:		2
 License:	LGPL v2.1
 Group:		Libraries
@@ -147,6 +147,7 @@
 EOF
 
 %build
+
 # NOTE: 'defconfig' and 'all' must be run in separate make process because of macros
 %{__make} defconfig \
 	%{?with_verbose:VERBOSE=1} \
@@ -157,9 +158,16 @@
 	CC="%{__cc}" \
 	OPTIMIZATION="%{rpmcflags} -Os"
 
+# The Makefile includes .config and later tries to assign same variable,
+# eventually it gets lost and sets wrong value for TARGET_ARCH and bad value
+# for UCLIBC_LDSO in extra/gcc-uClibc.
+# So we pass it as make arg to be sure it's proper!
+target_arch=$(grep -s '^TARGET_ARCH' .config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g')
+
 %{__make} \
 	%{?with_verbose:VERBOSE=1} \
 	TARGET_CPU="%{_target_cpu}" \
+	TARGET_ARCH=$target_arch \
 	GCC_BIN=%{_host_cpu}-%{_vendor}-%{_os}-gcc \
 	HOSTCC="%{__cc}" \
 	HOSTCFLAGS="%{rpmcflags} %{rpmldflags}" \
@@ -181,7 +189,7 @@
 
 %if %{with shared}
 mv -f $RPM_BUILD_ROOT%{uclibc_root}/usr/lib/{libpthread-uclibc,libpthread}.so
-ln -sf libpthread-0.9.29.so $RPM_BUILD_ROOT%{uclibc_root}/lib/libpthread.so.0
+ln -sf libpthread-%{version}.so $RPM_BUILD_ROOT%{uclibc_root}/lib/libpthread.so.0
 chmod a+rx $RPM_BUILD_ROOT%{uclibc_root}/lib/*.so
 %endif
 
@@ -315,6 +323,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.153.2.12  2008-04-03 16:52:05  glen
+- pass TARGET_ARCH to makefile, as makefile has some chicken-egg issue resulting 64bit ldso name; rel 13
+
 Revision 1.153.2.11  2008-04-03 15:20:25  glen
 - release 12
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/uClibc.spec?r1=1.153.2.11&r2=1.153.2.12&f=u



More information about the pld-cvs-commit mailing list