Search
SailfishOS Open Build Service
>
Projects
>
home:LiuQian
>
cross-accel-mipsel
> cross-mipsel-gcc.spec
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File cross-mipsel-gcc.spec of Package cross-accel-mipsel
# Combined gcc / cross-armv*-gcc(-accel) specfile %ifarch x86_64 %define x64 x64 %endif Name: cross-mipsel-gcc-accel-%{!?x64:x86}%{?x64} # crossbuild / accelerator section # \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ %define crossbuild 0 %define accelerator_crossbuild 0 %if "%{name}" != "gcc" # this is the ix86 -> arm cross compiler (cross-armv*-gcc) # # cross arch retrieval %define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc/\\1/") # We set requires/provides by hand and disable post-build-checks. # Captain Trunk: Sledge, you cannot disarm that nuclear bomb! # Sledge Hammer: Trust me, I know what I'm doing. AutoReqProv: 0 AutoReq: false #!BuildIgnore: rpmlint-Moblin rpmlint-mini post-build-checks # cross platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # gcc_target_platform holds the host (executing the compiler) # cross_gcc_target_platform holds the target (for which the compiler is producing binaries) # prefix for cross compiler %define _prefix /opt/cross # strip of 'foreign arch' symbols fails %define __strip /bin/true # sysroot for cross-compiler %define crosssysroot %{_prefix}/%{cross_gcc_target_platform}/sys-root # flag %define crossbuild 1 %if "%{name}" == "cross-mipsel-gcc-accel-x86" BuildRequires: cross-mipsel-glibc cross-mipsel-glibc-devel cross-mipsel-glibc-headers BuildRequires: cross-mipsel-kernel-headers cross-mipsel-binutils %define crossextraconfig --with-float=softfp --with-fpu=vfpv3 --with-arch=armv7-a %endif # single target atm. ExclusiveArch: %ix86 x86_64 # # special handling for Tizen ARM build acceleration # cross-armv*-gcc-accel %if "%(echo %{name} | sed -e "s/cross-.*-gcc-\\(.*\\)-.*/\\1/")" == "accel" # cross architecture %define crossarch %(echo %{name} | sed -e "s/cross-\\(.*\\)-gcc-accel-.*/\\1/") # cross target platform %define cross_gcc_target_platform %{crossarch}-tizen-linux-gnueabi # prefix - as it's going to "replace" the original compiler ... %define _prefix /usr # cross-build sets sysroot as default , we need to override this a bit %define crosssysroot / # where to find the libs during the build %define crossbuildsysroot /opt/cross/%{cross_gcc_target_platform}/sys-root # flags %define crossbuild 1 %define accelerator_crossbuild 1 # where to find the libs at runtime %define newrpath /emul/ia32-linux/%{_lib}:/emul/ia32-linux/usr/%{_lib} %define _build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.dontuse.rpm %endif # end special accel %endif # /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ # end crossbuild / accelerator section %global gcc_version 4.6.4 %global gcc_release 2013.05 %global release_prefix %{gcc_release} %global _unpackaged_files_terminate_build 0 %ifarch %{arm} %global build_cloog 0 %else %if %{crossbuild} %global build_cloog 0 %else %global build_cloog 1 %endif %endif #global multilib_64_archs x86_64 %ifarch x86_64 %global multilib_32_arch i686 %endif %global gcc_version 4.6.4 %global gcc_release 1 %global _unpackaged_files_terminate_build 0 %global include_gappletviewer 0 %if !%{crossbuild} %ifnarch mips mipsel %global build_cloog 1 %else %global build_cloog 0 %endif %else %global build_cloog 0 %endif %global build_libstdcxx_docs 0 %global multilib_64_archs %{nil} %ifarch x86_64 %global multilib_32_arch i686 %endif %global build_64bit_multilib 0 %ifarch %{ix86} x86_64 %global build_libquadmath 1 %else %global build_libquadmath 0 %endif Summary: Various compilers (C, C++, Objective-C, Java, ...) Version: %{gcc_version} %if %{bootstrap} Release: 1.1.2 %else Release: 1.1.2 %endif License: GPLv3+, GPLv3+ with exceptions and GPLv2+ with exceptions Group: Development/Languages URL: http://launchpad.net/gcc-linaro Source0: https://launchpad.net/gcc-linaro/4.6/4.6-2013.05/+download/gcc-linaro-4.6-2013.05.tar.bz2 Source1: libgcc_post_upgrade.c Source2: README.libgcjwebplugin.so Source100: gcc-rpmlintrc Source200: baselibs.conf Source300: precheckin.sh Source301: aaa_README.PACKAGER BuildRequires: binutils >= 2.22 BuildRequires: glibc-static BuildRequires: zlib-devel, gettext, bison, flex, texinfo BuildRequires: mpc-devel BuildRequires: glibc-devel >= 2.4.90-13 BuildRequires: elfutils-devel >= 0.72 %if %{build_cloog} BuildRequires: ppl >= 0.10, ppl-devel >= 0.10, cloog-ppl >= 0.15, cloog-ppl-devel >= 0.15 %endif %if %{build_libstdcxx_docs} BuildRequires: doxygen BuildRequires: graphviz %endif %if !%{crossbuild} Requires: cpp = %{version}-%{release} Requires: libgcc >= %{version}-%{release} Requires: libgomp = %{version}-%{release} Requires: glibc-devel Requires: binutils >= 2.22 %endif %if !%{crossbuild} %if %{build_cloog} Requires: cloog-ppl >= 0.15 %endif %if %{build_64bit_multilib} Requires: glibc64bit-helper %endif Requires(post): /sbin/install-info Requires(preun): /sbin/install-info Obsoletes: gcc < %{version}-%{release} Obsoletes: gcc43 AutoReq: true # /!crossbuild %endif Patch0: gcc46-hack.patch Patch2: gcc46-c++-builtin-redecl.patch Patch4: gcc46-java-nomulti.patch Patch7: gcc46-rh330771.patch Patch8: gcc46-i386-libgomp.patch Patch10: gcc46-libgomp-omp_h-multilib.patch Patch11: gcc46-libtool-no-rpath.patch Patch12: gcc46-cloog-dl.patch Patch14: gcc46-pr38757.patch Patch15: gcc46-libstdc++-docs.patch Patch18: gcc46-ppl-0.10.patch Patch19: gcc46-pr47858.patch Patch20: gcc46-x86_64-nolib64.patch Patch40: gcc46-use-atom.patch Patch41: libgcc_post_upgrade.c.arm.patch Patch42: gcc46-libiberty-conftest.patch Patch44: gcc-hash-style-gnu.diff Patch45: gcc46-MIPS-boehm-gc-stack-qemu.patch Patch46: gcc-4.6.0-mips_fix-1.patch Patch47: gcc46-fuse-ld-gold.patch Patch50: fix-stable-debugtypes.patch Patch9999: gcc44-ARM-boehm-gc-stack-qemu.patch #We need -gnueabi indicator for ARM %ifnarch %{arm} %global _gnu %{nil} %endif %global gcc_target_platform %{_target_platform} %description The gcc package contains the GNU Compiler Collection version 4.5.0. Youll need this package in order to compile C code. %package -n libgcc Summary: GCC version 4.5.0 shared support library Group: System Environment/Libraries Obsoletes: libgcc < %{version}-%{release} Obsoletes: libgcc43 Autoreq: false %description -n libgcc This package contains GCC shared support library which is needed e.g. for exception handling support. %package c++ Summary: C++ support for GCC Group: Development/Languages Requires: gcc = %{version}-%{release} Requires: libstdc++ = %{version}-%{release} Requires: libstdc++-devel = %{version}-%{release} Obsoletes: gcc-c++ < %{version}-%{release} Obsoletes: gcc43-c++ Autoreq: true %description c++ This package adds C++ support to the GNU Compiler Collection. It includes support for most of the current C++ specification, including templates and exception handling. %package -n libstdc++ Summary: GNU Standard C++ Library Group: System Environment/Libraries Obsoletes: libstdc++ < %{version}-%{release} Obsoletes: libstdc++43 Obsoletes: libstdc++6 < %{version}-%{release} Autoreq: true Requires: eglibc %description -n libstdc++ The libstdc++ package contains a rewritten standard compliant GCC Standard C++ Library. %package -n libstdc++-devel Summary: Header files and libraries for C++ development Group: Development/Libraries Requires: libstdc++ = %{version}-%{release} Obsoletes: libstdc++-devel < %{version}-%{release} Obsoletes: libstdc++43-devel Autoreq: true %description -n libstdc++-devel This is the GNU implementation of the standard C++ libraries. This package includes the header files and libraries needed for C++ development. This includes rewritten implementation of STL. %package -n libstdc++-docs Summary: Documentation for the GNU standard C++ library Group: Development/Libraries Obsoletes: libstdc++-docs < %{version}-%{release} Obsoletes: libstdc++43-doc Autoreq: true %description -n libstdc++-docs Manual, doxygen generated API information and Frequently Asked Questions for the GNU standard C++ library. %package -n libgomp Summary: GCC OpenMP v3.0 shared support library Group: System Environment/Libraries Obsoletes: libgomp < %{version}-%{release} Obsoletes: libgomp43 %description -n libgomp This package contains GCC shared support library which is needed for OpenMP v3.0 support. %package -n libmudflap Summary: GCC mudflap shared support library Group: System Environment/Libraries %description -n libmudflap This package contains GCC shared support library which is needed for mudflap support. %package -n libmudflap-devel Summary: GCC mudflap support Group: Development/Libraries Requires: libmudflap = %{version}-%{release} Requires: gcc = %{version}-%{release} %description -n libmudflap-devel This package contains headers and static libraries for building mudflap-instrumented programs. To instrument a non-threaded program, add -fmudflap option to GCC and when linking add -lmudflap, for threaded programs also add -fmudflapth and -lmudflapth. %package -n cpp Summary: The C Preprocessor Group: Development/Languages Requires: mpc Obsoletes: cpp < %{version}-%{release} Obsoletes: cpp43 Autoreq: true %description -n cpp Cpp is the GNU C-Compatible Compiler Preprocessor. Cpp is a macro processor which is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define macros, abbreviations for longer constructs. The C preprocessor provides four separate functionalities: the inclusion of header files (files of declarations that can be substituted into your program); macro expansion (you can define macros, and the C preprocessor will replace the macros with their definitions throughout the program); conditional compilation (using special preprocessing directives, you can include or exclude parts of the program according to various conditions); and line control (if you use a program to combine or rearrange source files into an intermediate file which is then compiled, you can use line control to inform the compiler about where each source line originated). You should install this package if you are a C programmer and you use macros. %package -n gcc-multilib Summary: for 64bit multilib support Group: System Environment/Libraries Autoreq: true %description -n gcc-multilib This is one set of libraries which support 64bit multilib on top of 32bit enviroment from compiler side. %prep %setup -q -n gcc-linaro-4.6-%{gcc_release} %patch1000 -p1 echo '%{version}' >gcc/BASE-VER cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h ./contrib/gcc_update --touch LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi %build rm -fr obj-%{gcc_target_platform} mkdir obj-%{gcc_target_platform} cd obj-%{gcc_target_platform} CC=gcc OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'` OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'` %ifarch %{ix86} OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'` %endif OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'` case "$OPT_FLAGS" in *-fasynchronous-unwind-tables*) sed -i -e 's/-fno-exceptions /-fno-exceptions -fno-asynchronous-unwind-tables/' \ ../gcc/Makefile.in ;; esac # %ifarch %arm # # gcc 45 segfaults on O2g.gch generation. (cc1plus) # %define ARM_EXTRA_CONFIGURE --disable-libstdcxx-pch # # for armv7hl reset the gcc specs # %ifarch armv7hl # %define ARM_EXTRA_CONFIGURE --disable-libstdcxx-pch --with-float=hard --with-fpu=vfpv3-d16 --with-arch=armv7-a # %endif # # for armv7nhl reset the gcc specs # %ifarch armv7nhl # %define ARM_EXTRA_CONFIGURE --disable-libstdcxx-pch --with-float=hard --with-fpu=neon --with-arch=armv7-a # %endif # %endif %if %{crossbuild} # cross build export PATH=/opt/cross/bin:$PATH # strip all after -march . no arch specific options in cross-compiler build . # -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` %if %{accelerator_crossbuild} # adding -rpath to the special crosscompiler export OPT_FLAGS="$OPT_FLAGS -Wl,-rpath,/emul/ia32-linux/usr/%{_lib}:/emul/ia32-linux/%{_lib}:/usr/%{_lib}:/%{_lib}:/usr/lib:/lib" %endif %endif CC="$CC" CFLAGS="$OPT_FLAGS" CXXFLAGS="`echo $OPT_FLAGS | sed 's/ -Wall / /g'`" XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \ ../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} --libexecdir=%{_libexecdir} \ --enable-shared --enable-linker-build-id \ --build=%{gcc_target_platform} \ --host=%{gcc_target_platform} \ --target=%{cross_gcc_target_platform} \ --disable-checking \ --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \ --enable-gnu-unique-object --enable-lto \ --without-included-gettext \ --enable-threads=posix \ --enable-nls \ --disable-bootstrap \ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes \ --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold \ --enable-languages=c,c++ \ --disable-libgcj \ %{crossextraconfig} \ --program-transform-name='s/%{cross_gcc_target_platform}-//' \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_version} \ --with-build-sysroot=%{crossbuildsysroot} \ --with-sysroot=%{crosssysroot} #end for special cross-compiler make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" # Make generated man pages even if Pod::Man is not new enough perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl for i in ../gcc/doc/*.texi; do cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i done make -C gcc generated-manpages for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done cd .. %install rm -fr %{buildroot} cd obj-%{gcc_target_platform} # cross build export PATH=/opt/cross/bin:$PATH # strip all after -march . no arch specific options in cross-compiler build . # -march=core2 -mssse3 -mtune=atom -mfpmath=sse -fasynchronous-unwi export OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e "s#\-march=.*##g"` #echo "$OPT_FLAGS" #TARGET_PLATFORM=%{cross_gcc_target_platform} # There are some MP bugs in libstdc++ Makefiles #make -C %{cross_gcc_target_platform}/libstdc++-v3 make DESTDIR=%{buildroot} install #prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \ # infodir=%{buildroot}%{_infodir} install sed "s/@X86@/%{!?x64:x86}%{?x64}/g" -i %{_sourcedir}/baselibs.conf cd .. mkdir -p %{buildroot}%{_datadir}/license cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc cp gcc/COPYING %{buildroot}%{_datadir}/license/cpp cp gcc/COPYING %{buildroot}%{_datadir}/license/libgcc cp gcc/COPYING %{buildroot}%{_datadir}/license/gcc-c++ cp gcc/COPYING %{buildroot}%{_datadir}/license/libstdc++ cp gcc/COPYING %{buildroot}%{_datadir}/license/libgomp cp gcc/COPYING %{buildroot}%{_datadir}/license/libmudflap # checking and split packaging for native ... # native # \/\/\/ # For ARM port %files %manifest gcc.manifest %defattr(-,root,root,-) %{_prefix}