SPECS: gcc.spec - sparc64->sparc hardlinks only if built with mult...

qboosh qboosh at pld-linux.org
Sun Dec 31 00:59:26 CET 2006


Author: qboosh                       Date: Sat Dec 30 23:59:25 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- sparc64->sparc hardlinks only if built with multilib
- handle different c++config.h files if c++ is built with multilib

---- Files affected:
SPECS:
   gcc.spec (1.443 -> 1.444) 

---- Diffs:

================================================================
Index: SPECS/gcc.spec
diff -u SPECS/gcc.spec:1.443 SPECS/gcc.spec:1.444
--- SPECS/gcc.spec:1.443	Sun Dec 31 00:47:49 2006
+++ SPECS/gcc.spec	Sun Dec 31 00:59:20 2006
@@ -921,6 +921,8 @@
 
 install gcc/specs $RPM_BUILD_ROOT%{_libdir}/gcc/%{_target_platform}/%{version}
 
+%if %{with multilib}
+# create links
 %ifarch sparc64
 ln -f $RPM_BUILD_ROOT%{_bindir}/sparc64-pld-linux-gcc \
 	$RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc
@@ -938,6 +940,26 @@
 %endif
 %endif
 
+# this file differ (at least sparc/sparc64)
+%if %{with cxx}
+spath=builddir/%{_target_platform}
+sfile=libstdc++-v3/include/%{_target_platform}/bits/c++config.h
+dpath=$RPM_BUILD_ROOT%{_includedir}/c++/%{version}/%{_target_platform}/bits
+if ! cmp $spath/$sfile $spath/32/$sfile > /dev/null ; then
+       cp -f $spath/$sfile $dpath/c++config64.h
+       cp -f $spath/32/$sfile $dpath/c++config32.h
+       cat > $dpath/c++config.h <<EOF
+#include <bits/wordsize.h>
+#if __WORDSIZE == 32
+#include <bits/c++config32.h>
+#else
+#include <bits/c++config64.h>
+#endif
+EOF
+fi
+%endif
+%endif
+
 ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp
 ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
 echo ".so gcc.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
@@ -1492,6 +1514,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.444  2006/12/30 23:59:20  qboosh
+- sparc64->sparc hardlinks only if built with multilib
+- handle different c++config.h files if c++ is built with multilib
+
 Revision 1.443  2006/12/30 23:47:49  qboosh
 - more sparc64->sparc hardlinks (merged from AC-branch)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/gcc.spec?r1=1.443&r2=1.444&f=u



More information about the pld-cvs-commit mailing list