Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # SourcePath: gcc-4.1.2/20100125
- Summary: GNU Compiler Collection
- Name: sony-cross-gcc-for-dev
- %define pkgname %{sony_tool_triplet}-cross-gcc-for-dev
- Version: 4.1.2
- Release: 05000204
- License: GPL2 / LGPL2.1/ special exception
- Distribution: %{sony_distribution}
- Vendor: %{sony_vendor}
- Packager: %{sony_packager}
- Group: %{sony_group}
- URL: http://www.gnu.org/software/gcc
- Source0: gcc-%{version}.tar.bz2
- # patches from gcc bugzilla, carry over from gcc-4.1.1
- Patch001: gcc-4.1.1-pr28516.patch
- Patch002: gcc-4.1.1-pr29877.patch
- Patch003: gcc-4.1.1-pr30468.patch
- Patch004: gcc-4.1.1-pr31809.patch
- Patch005: gcc-4.1.1-pr33142.patch
- Patch006: gcc-4.1.2-pr29413.patch
- # patches from gcc bugzilla, from gcc-4.2.1 testsuite gcc.sum ICE
- Patch007: gcc-4.1.2-pr31632.patch
- Patch008: gcc-4.1.2-pr28905.patch
- Patch009: gcc-4.1.2-pr30433.patch
- Patch010: gcc-4.1.2-pr30984.patch
- Patch011: gcc-4.1.2-pr31448.patch
- Patch012: gcc-4.1.2-pr28935.patch
- Patch013: gcc-4.1.2-pr30045.patch
- Patch014: gcc-4.1.2-pr30189.patch
- Patch015: gcc-4.1.2-pr30473.patch
- # patches from gcc bugzilla, from gcc-4.2.1 testsuite g++.sum ICE
- Patch016: gcc-4.1.2-pr32109.patch
- Patch017: gcc-4.1.2-pr227376.patch
- Patch018: gcc-4.1.2-pr30221.patch
- Patch019: gcc-4.1.2-pr30168.patch
- Patch020: gcc-4.1.2-pr11468.patch
- Patch021: gcc-4.1.2-pr30847.patch
- Patch022: gcc-4.1.2-pr30895.patch
- Patch023: gcc-4.1.2-pr19606.patch
- Patch024: gcc-4.1.2-pr28011.patch
- Patch025: gcc41-pr27144.patch
- # ARM
- Patch100: gcc-4.1.0-arm-nolibfloat.patch
- Patch101: gcc-4.0.2-arm-lib1asm.patch
- Patch102: gcc-4.1.1-arm-type_info-comparison.patch
- Patch103: gcc-4.1.1-arm-incorrect-promotion-arguments.patch
- Patch104: gcc-4.1.1-arm-eabi-object-attribute.patch
- Patch105: gcc-4.1.1-arm__cxa_type_match.patch
- Patch106: gcc-4.1.1-arm-tls-debug-info.patch
- Patch107: gcc-4.1.1-arm-eabi-wchar_t-markings.patch
- Patch108: gcc-4.1.2-arm-eabi-destructor-type.patch
- Patch109: gcc-4.1-arm-fix__cxa_begin_cleanup.patch
- Patch110: gcc-4.1.2-arm-exchange_and_add-thread-safe.patch
- # PowerPC
- # soft-fp patch http://sourceware.org/bugzilla/show_bug.cgi?id=2749
- Patch200: gcc-41-20060515.patch
- Patch201: sfp-long-double-gcc412.patch
- Patch202: gcc-4.1.2-Power-object-attributes.patch
- # MIPS
- Patch300: gcc-4.1.1-mips-enable-vr5500-condmov.patch
- # compile MIPS crtstuff with -mxgot option, to support multigot
- Patch301: gcc-4.1.2-mips-crtstuff-mxgot.patch
- Patch302: gcc-4.1.2-MIPS-Add-new-cpu-names.patch
- Patch303: gcc-4.1.2-mips-libgcc-mxgot.patch
- Patch305: gcc-4.1.2-MIPS-object-attributes.patch
- # x86
- # other
- Patch500: gcc-4.1.2-adjust-ld-version.patch
- Patch501: gcc-gxx-sysroot.patch
- Patch502: gcc-4.1.2-pr19319.patch
- Patch503: gcc-4.1.2-mudflap-cpp-O0-test.patch
- # SSlibc
- # spec file specific
- BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
- Prefix: %{sony_cross_dir}
- BuildArch: %{sony_host_arch}
- BuildRequires: %{sony_tool_triplet}-cross-binutils
- %description
- This is the GNU C compiler, a fairly portable optimizing compiler which
- supports multiple languages. This package includes support for C. It also
- includes the GNU C preprocessor.
- %package -n %{pkgname}
- Summary: GNU Compiler Collection
- Group: %{sony_group}
- AutoReqProv: no
- Requires: %{sony_tool_triplet}-cross-binutils
- Conflicts: %{sony_tool_triplet}-cross-gcc-core
- %description -n %{pkgname}
- This is the GNU C compiler, a fairly portable optimizing compiler which
- supports multiple languages. This package includes support for C. It also
- includes the GNU C preprocessor.
- %prep
- %setup -q -n gcc-%{version}
- %patch001 -p0
- %patch002 -p2
- %patch003 -p1
- %patch004 -p2
- %patch005 -p1
- %patch006 -p1
- %patch007 -p2
- %patch008 -p1
- %patch009 -p2
- %patch010 -p2
- %patch011 -p2
- %patch012 -p1
- %patch013 -p2
- %patch014 -p2
- %patch015 -p2
- %patch016 -p2
- %patch017 -p2
- %patch018 -p2
- %patch019 -p2
- %patch020 -p1
- %patch021 -p2
- %patch022 -p2
- %patch023 -p1
- %patch024 -p1
- %patch025 -p0
- %patch100 -p1
- %patch101 -p1
- %patch102 -p0
- %patch103 -p1
- %patch104 -p0
- %patch105 -p0
- %patch106 -p0
- %patch107 -p0
- %patch108 -p1
- %patch109 -p0
- %patch110 -p1
- %patch200 -p1
- %patch201 -p1
- %patch202 -p1
- %patch300 -p1
- %if %{sony_target_cpu} == "mips"
- %patch301 -p1
- %endif
- %patch302 -p1
- %if %{sony_target_cpu} == "mips"
- %patch303 -p1
- %endif
- %patch305 -p1
- %patch500 -p1
- %patch501 -p1
- %patch502 -p1
- %patch503 -p1
- %build
- %sony_cross_dev_setup
- VERSION_SUFFIX=" `date +%Y%m%d` (Sony CE Linux %{sony_linux_release_version})"
- sed "s,define VERSUFFIX.*,define VERSUFFIX \"${VERSION_SUFFIX}\";," gcc/version.c > gcc/version.c-scel
- mv gcc/version.c{,-orig}
- mv gcc/version.c{-scel,}
- ( cd gcc && autoconf ) &&
- # automake 1.8.3 miss generates Makefile.in for arm-sony-linux.
- # ( cd libstdc++-v3 && autoconf && aclocal && automake ) &&
- ( cd libstdc++-v3 && autoconf && aclocal ) &&
- ( cd gcc && autoheader ) &&
- %sony_cross_dev_configure \
- --prefix=%{sony_cross_dev_dir} \
- --program-transform-name='s,^,%{sony_target_toolprefix},' \
- --enable-languages=c,c++ \
- %if "%{sony_target_cpu_id}" != "%%%{sony_target_cpu_id}"
- %if "%{sony_target_cpu}" == "arm"
- --with-cpu=arm926ej-s \
- %else
- --with-cpu=%{sony_target_cpu_id} \
- %endif
- %endif
- %if "%{sony_target_arch_id}" != "%%%{sony_target_arch_id}"
- --with-arch=%{sony_target_arch_id} \
- %endif
- %if "%{sony_target_tune_id}" != "%%%{sony_target_tune_id}"
- --with-tune=%{sony_target_tune_id} \
- %endif
- %if "%{sony_target_fpu}" == "no"
- --with-float=soft \
- %endif
- %if "%{sony_target_altivec}" == "yes"
- --enable-altivec \
- %else
- --disable-altivec \
- %endif
- --with-sysroot=%{sony_cross_dev_target_dir} \
- --enable-__cxa_atexit \
- --disable-multilib \
- --enable-threads=posix \
- --enable-shared \
- --with-gxx-include-dir=%{sony_target_rel_include_dir}/c++/%{version} &&
- make
- %install
- %sony_cross_dev_setup
- rm -rf %{buildroot}
- cd %{sony_objdir} &&
- make DESTDIR=%{buildroot} install-no-fixedincludes
- # libiberty.a is also included in binutils, and we use it.
- rm -f %{buildroot}%{sony_cross_dev_lib_dir}/libiberty.a
- rm -f %{buildroot}%{sony_cross_dev_dir}/%{sony_target_config}/lib/libiberty.a
- # move libgcc to target dir.
- %define _libgcc_dir %{sony_cross_target_dir}%{sony_target_dev_prefix}
- mkdir -p %{buildroot}%{_libgcc_dir}
- mv -f %{buildroot}%{sony_cross_dev_dir}/%{sony_target_config}/lib \
- %{buildroot}%{_libgcc_dir}
- rmdir %{buildroot}%{sony_cross_dev_dir}/%{sony_target_config}
- # move libgcc header to target dir.
- mkdir -p %{buildroot}%{sony_cross_target_dir}%{sony_target_dev_include_dir}
- mv -f %{buildroot}%{sony_cross_dev_dir}/include/* \
- %{buildroot}%{sony_cross_target_dir}%{sony_target_dev_include_dir}
- rm -rf %{buildroot}%{sony_cross_dev_dir}/include
- # move C++ headers to target dir.
- mkdir -p %{buildroot}%{sony_cross_target_dir}%{sony_target_dev_include_dir}
- mv -f %{buildroot}%{sony_target_rel_include_dir}/c++ \
- %{buildroot}%{sony_cross_target_dir}%{sony_target_dev_include_dir}
- rm -rf %{buildroot}%{sony_target_rel_include_dir}
- # replace dynamic linker in specs.
- %define _specs %{sony_cross_dev_lib_dir}/gcc/%{sony_target_config}/%{version}/specs
- %{buildroot}%{sony_cross_dev_bin_dir}/%{sony_target_toolprefix}gcc -dumpspecs \
- | sed -e \
- %if "%{sony_target_config}" == "arm-sony-linux-gnueabi"
- 's,\(/lib/ld-linux\.so\.3\),%{sony_target_dev_dir}\1,' \
- %endif
- %if "%{sony_target_cpu}" == "i386" || "%{sony_target_cpu}" == "i686"
- 's,\(/lib/ld-linux\.so\.2\),%{sony_target_dev_dir}\1,' \
- %endif
- %if "%{sony_target_cpu}" == "mips"
- 's,\(/lib/ld\.so\.1\),%{sony_target_dev_dir}\1,' \
- %endif
- %if "%{sony_target_cpu}" == "ppc"
- 's,\(/lib/ld\.so\.1\),%{sony_target_dev_dir}\1,' \
- %endif
- > %{buildroot}%{_specs}
- # remove gcc with versioned filename.
- rm -f %{buildroot}%{sony_cross_dev_bin_dir}/%{sony_target_toolprefix}gcc-%{version}
- # remove c++
- rm -f %{buildroot}%{sony_cross_dev_bin_dir}/%{sony_target_toolprefix}c++
- # create symbolic link c++ to g++.
- ln -s %{sony_target_toolprefix}g++ \
- %{buildroot}%{sony_cross_dev_bin_dir}/%{sony_target_toolprefix}c++
- # create symbolic links in sslibc tools directory.
- mkdir -p %{buildroot}%{sony_cross_bin_dir}
- for f in gccbug gcov
- do
- ln -s ../devel/bin/%{sony_target_toolprefix}$f %{buildroot}%{sony_cross_bin_dir}/
- done
- # Remove info/dir created by install-info.
- rm -f %{buildroot}%{sony_cross_dev_info_dir}/dir
- %demangle_libtool
- for la in `find %{buildroot}%{sony_cross_target_dir}/%{sony_target_dev_lib_dir} -name '*.la' -print`
- do
- grep -v libdir $la > $la.tmp
- echo "libdir=\$CROSS_COMPILE_PREFIX'/devel/usr/lib'" >> $la.tmp
- mv $la.tmp $la
- done
- %clean
- rm -rf %{buildroot}
- %files -n %{pkgname}
- %defattr(-,root,root,-)
- %{sony_cross_dir}
- %changelog
- * Mon Jan 25 2010 Sony Corporation
- - Add pr27144 fix patch.
- * Wed Mar 11 2009 Sony Corporation
- - MIPS and Power object attributes support is added.
- * Thu Jan 29 2009 Sony Corporation
- - Add pr19606, pr28011 fix patch.
- * Fri Jan 16 2009 Sony Corporation
- - MIPS: Add new cpu names.
- * Thu Jan 08 2009 Sony Corporation
- - MIPS build crtstuff with -mxgot option
- * Fri Sep 12 2008 Sony Corporation
- - ARM libstdc++ bugfix patch is added.
- * Mon Jun 9 2008 Sony Corporation
- - ARM __cxa_begin_cleanup bugfix for RVCT C++ EH.
- * Wed Apr 30 2008 Sony Corporation
- - Added i686 support
- * Fri Apr 25 2008 Sony Corporation
- - Version up to gcc-4.1.2
- * Thu Apr 10 2008 Sony Corporation
- - Add Sony CE Linux info into VERSUFFIX of version.c
- * Tue Oct 09 2007 Sony Corporation
- - Add Vr5500 conditional move support.
- * Wed Sep 19 2007 Sony Corporation
- - Add pr31809, pr33142 fix patch
- * Thu Sep 3 2007 Sony Corporation
- - Add ARM EABI wchar fix patch.
- * Thu Aug 1 2007 Sony Corporation
- - Add ARM tls debug info patch.
- * Thu Jul 17 2007 Sony Corporation
- - Add ARM __cxa_type_match fix patch.
- * Mon Jun 25 2007 Sony Corporation
- - Add binutils ld version adjust patch
- * Wed May 23 2007 Sony Corporation
- - Add ARM EABI destructor type fix patch.
- * Wed Mar 14 2007 Sony Corporation
- - Add ARM EABI attribute patch.
- * Wed Mar 14 2007 Sony Corporation
- - Add prfix backport from gcc-4.1.2
- * Wed Feb 7 2007 Sony Corporation
- - Changed program name
- * Wed Feb 5 2007 Sony Corporation
- - Add patch10[67].
- * Fri Feb 2 2007 Sony Corporation
- - Add patch105.
- * Sat Sep 21 2006 Sony Corporation
- - Initial build.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement