gcc.spec [handle different c++config.h files if c++ is built with multilib]

Jakub Bogusz qboosh w pld-linux.org
Nie, 31 Gru 2006, 19:03:08 CET


On Sun, Dec 31, 2006 at 06:56:19PM +0100, Paweł Sikora wrote:
> +# 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
> 
> czemu ma sluzyc ta zmiana? przeciez mulitlibowy g++ w zaleznosci
> od -m32/-m64 sam wybiera odpowiedni katalog z naglowkami.

który najpierw musi istnieć.

$ rpm -qpvl rpm/RPMS/libstdc++-devel-4.2.0-0.20061225r120195.2.1.sparc64.rpm |grep sparc-pld
$
Jest tylko katalog sparc64-pld-linux.

(tak samo w przypadku libstdc++32-devel przy schemacie z gcc-3.3, do
którego dobrze byłoby wrócić)

bits/c++config.h to jedyny plik różniący się między sparc a sparc64.


-- 
Jakub Bogusz    http://qboosh.pl/


Więcej informacji o liście dyskusyjnej pld-devel-pl