rpms/arm-gp2x-linux-gcc/F-7 README.fedora, NONE, 1.1 arm-gp2x-linux-gcc.spec, NONE, 1.1 arm-linux-soft-float.patch, NONE, 1.1 gcc40-cross-build-fixes.patch, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Sat Jul 28 21:14:14 UTC 2007


Author: jwrdegoede

Update of /cvs/extras/rpms/arm-gp2x-linux-gcc/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6628

Modified Files:
	.cvsignore sources 
Added Files:
	README.fedora arm-gp2x-linux-gcc.spec 
	arm-linux-soft-float.patch gcc40-cross-build-fixes.patch 
Log Message:
* Thu May 31 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 4.1.2-5
- Merge in avr-gcc cross compile changes



--- NEW FILE README.fedora ---
This package does not include the gnu texinfo documentation because this would
conflict with the native gcc. If you've installed the native gcc,
you can find the info documentation there, notice that this might be for a
different version though!


--- NEW FILE arm-gp2x-linux-gcc.spec ---
%define target arm-gp2x-linux
%define glibcversion 2.3.6
%define bootstrap 1

Name:           %{target}-gcc
Version:        4.1.2
Release:        5%{?dist}
Summary:        Cross Compiling GNU GCC targeted at %{target}
Group:          Development/Languages
License:        GPL
URL:            http://gcc.gnu.org/
Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-core-%{version}.tar.bz2
%if !%{bootstrap}
Source1:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-g++-%{version}.tar.bz2
%else
Source1:        ftp://ftp.gnu.org/gnu/glibc/glibc-%{glibcversion}.tar.bz2
Source2:        ftp://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-%{glibcversion}.tar.bz2
%endif
Source3:        README.fedora
Patch0:         arm-linux-soft-float.patch
Patch1:         gcc40-cross-build-fixes.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildRequires:  %{target}-binutils zlib-devel
Requires:       %{target}-binutils
%if %{bootstrap}
BuildRequires:  %{target}-kernel-headers
%else
BuildRequires:  %{target}-glibc
Requires:       %{target}-glibc
%endif

%description
This is a Cross Compiling version of GNU GCC, which can be used to
compile programs for the %{target} platform, instead of for the
native %{_arch} platform.


%if !%{bootstrap}

%package c++
Summary:        Cross Compiling GNU G++ targeted at %{target}
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}

%description c++
This package contains the Cross Compiling version of g++, which can be used to
compile c++ code for the %{target} platform, instead of for the
native %{_arch} platform.

%endif


%prep
%setup -q -c -a 1
cp -a %{SOURCE3} .
pushd gcc-%{version}
%patch0 -p1
%patch1 -p1
sed -i 's/VERSUFFIX ""/VERSUFFIX " (Fedora %{version}-%{release})"/' \
  gcc/version.c
contrib/gcc_update --touch
popd

# Extract %%__os_install_post into os_install_post~
cat << \EOF > os_install_post~
%__os_install_post
EOF

# Generate customized brp-*scripts
cat os_install_post~ | while read a x y; do
case $a in
# Prevent brp-strip* from trying to handle foreign binaries
*/brp-strip*)
  b=$(basename $a)
  sed -e 's,find $RPM_BUILD_ROOT,find $RPM_BUILD_ROOT%_bindir $RPM_BUILD_ROOT%_libexecdir,' $a > $b
  chmod a+x $b
  ;;
esac
done

sed -e 's,^[ ]*/usr/lib/rpm.*/brp-strip,./brp-strip,' \
< os_install_post~ > os_install_post 

# glibc headers
%if %{bootstrap}
pushd glibc-%{glibcversion}
tar -xf %{SOURCE2}
popd

# fix-includes doesn't like symlinks so copy the kernel headers over
mkdir -p %{_builddir}/%{name}-%{version}/sysroot/%{_includedir}
cp -a /usr/%{target}/include/asm /usr/%{target}/include/linux \
  %{_builddir}/%{name}-%{version}/sysroot/%{_includedir}

mkdir -p build-%{target}-glibc-headers
pushd build-%{target}-glibc-headers
../glibc-%{glibcversion}/configure \
  --prefix=%{_builddir}/%{name}-%{version}/sysroot/%{_prefix} \
  --with-headers=%{_builddir}/%{name}-%{version}/sysroot/%{_includedir} \
  --build=`uname -m` --host=%{target} --enable-add-ons=linuxthreads \
  --without-fp --disable-profile --without-selinux
make install-headers
popd
touch %{_builddir}/%{name}-%{version}/sysroot/%{_includedir}/gnu/stubs.h
cp build-%{target}-glibc-headers/bits/stdio_lim.h \
  %{_builddir}/%{name}-%{version}/sysroot/%{_includedir}/bits
%endif


%build
%if %{bootstrap}
%define languages 'c'
%else
%define languages 'c,c++'
%endif
mkdir -p build-%{target}-gcc
pushd build-%{target}-gcc
CC="%{__cc} ${RPM_OPT_FLAGS}" \
../gcc-%{version}/configure --prefix=%{_prefix} \
  --mandir=%{_mandir} --infodir=%{_infodir} \
%if %{bootstrap}
  --with-build-sysroot=%{_builddir}/%{name}-%{version}/sysroot \
%endif
  --target=%{target} --enable-languages=%{languages} --enable-threads=posix \
  --disable-libmudflap --disable-libssp --disable-multilib --disable-shared \
  --disable-nls --enable-long-long --enable-symvers=gnu --enable-c99 \
  --with-cpu=arm920t --enable-cxx-flags=-mcpu=arm920t --with-float=soft \
  --disable-libstdcxx-pch --enable-__cxa_atexit --with-system-zlib \
  --enable-version-specific-runtime-libs
# In general, building GCC is not smp-safe
make
popd


%install
rm -rf $RPM_BUILD_ROOT
pushd build-%{target}-gcc
make install DESTDIR=$RPM_BUILD_ROOT
popd
# we don't want these as we are a cross version
rm -r $RPM_BUILD_ROOT%{_infodir}
rm -r $RPM_BUILD_ROOT%{_mandir}/man7
rm    $RPM_BUILD_ROOT/usr/lib/libiberty.a
# and these aren't usefull for embedded targets
rm -r $RPM_BUILD_ROOT/usr/lib/gcc/%{target}/%{version}/install-tools
rm -r $RPM_BUILD_ROOT%{_libexecdir}/gcc/%{target}/%{version}/install-tools
%if !%{bootstrap}
rm    $RPM_BUILD_ROOT%{_prefix}/%{target}/lib/libiberty.a
rm    $RPM_BUILD_ROOT/usr/lib/gcc/%{target}/%{version}/*.la
%endif

%define __os_install_post . ./os_install_post


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc gcc-%{version}/COPYING gcc-%{version}/COPYING.LIB
%doc gcc-%{version}/README README.fedora
%{_bindir}/%{target}-*
%{_prefix}/lib/gcc/%{target}/
%{_libexecdir}/gcc/%{target}/
%{_mandir}/man1/%{target}-*.1.gz

%if !%{bootstrap}

%exclude %{_bindir}/%{target}-?++
%exclude /usr/lib/gcc/%{target}/%{version}/lib*c++.a
%exclude /usr/lib/gcc/%{target}/%{version}/include/c++
%exclude %{_libexecdir}/gcc/%{target}/%{version}/cc1plus
%exclude %{_mandir}/man1/%{target}-g++.1.gz


%files c++
%defattr(-,root,root,-)
%{_bindir}/%{target}-?++
/usr/lib/gcc/%{target}/%{version}/lib*c++.a
/usr/lib/gcc/%{target}/%{version}/include/c++
%{_libexecdir}/gcc/%{target}/%{version}/cc1plus
%{_mandir}/man1/%{target}-g++.1.gz

%endif


%changelog
* Thu May 31 2007 Hans de Goede <j.w.r.degoede at hhs.nl> 4.1.2-5
- Merge in avr-gcc cross compile changes

* Thu May 31 2007 Koos Termeulen koostermeulen at gmail.com 4.1.2-4
- Moved kernel-headers to separate package
- Added bootstrap option to define whether we want a bootstrapped gcc or not

* Thu May 10 2007 Koos Termeulen koostermeulen at gmail.com 4.1.2-3
- Added "linux-2.6.21-headers" and "glibc-2.3.5-headers" for bootstrapping gcc
- Glibc-2.3.5 is used because the arm is not supported in version 2.5

* Thu Apr 26 2007 Koos Termeulen koostermeulen at gmail.com 4.1.2-2
- Correction in description
- Changes in ./configure
- Don't remove the devel-files from package
- Removed CFLAGS because it didn't work properly

* Thu Apr 20 2007 Koos Termeulen koostermeulen at gmail.com 4.1.2-1
- Initial release

arm-linux-soft-float.patch:

--- NEW FILE arm-linux-soft-float.patch ---
diff -u -r gcc-4.0.2/gcc/config/arm/t-linux gcc-4.0.2/gcc/config/arm.new/t-linux
--- gcc-4.0.2/gcc/config/arm/t-linux	2005-10-18 22:04:44.000000000 +1000
+++ gcc-4.0.2/gcc/config/arm.new/t-linux	2005-10-18 22:05:03.000000000 +1000
@@ -4,7 +4,12 @@ TARGET_LIBGCC2_CFLAGS = -fomit-frame-poi
 LIBGCC2_DEBUG_CFLAGS = -g0
 
 LIB1ASMSRC = arm/lib1funcs.asm
-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+	_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+	_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+	_fixsfsi _fixunssfsi _floatdidf _floatdisf \
+	_bb_init_func _call_via_rX _interwork_call_via_rX \
+	_lshrdi3 _ashrdi3 _ashldi3
 
 # MULTILIB_OPTIONS = mhard-float/msoft-float
 # MULTILIB_DIRNAMES = hard-float soft-float


--- gcc-4.1.1/gcc/config/arm/linux-elf.h	2007-01-06 11:17:51.000000000 +0000
+++ gcc-4.1.1/gcc/config/arm/linux-elf-soft.h	2007-01-06 11:22:01.000000000 +0000
@@ -49,7 +49,7 @@
    %{shared:-lc} \
    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
 
-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
+/* #define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc" */
 
 #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.2"
 

gcc40-cross-build-fixes.patch:

--- NEW FILE gcc40-cross-build-fixes.patch ---
--- gcc-4.1.2/configure.cross-build-fixes	2007-01-25 16:47:43.000000000 +0100
+++ gcc-4.1.2/configure	2007-01-25 16:47:43.000000000 +0100
@@ -3260,7 +3260,13 @@ CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CF
 # being built; programs in there won't even run.
 if test "${build}" = "${host}" && test -d ${srcdir}/gcc; then
   # Search for pre-installed headers if nothing else fits.
-  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'
+  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/'
+  if test "${with_build_sysroot+set}" = set; then
+    sysroot_dir="$with_build_sysroot"
+  else
+    sysroot_dir='$(build_tooldir)/'
+  fi
+  FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET" -isystem $sysroot_dir/usr/include"
 fi
 
 if test "x${use_gnu_ld}" = x &&
--- gcc-4.1.2/gcc/mklibgcc.in.cross-build-fixes	2006-09-21 13:30:29.000000000 +0200
+++ gcc-4.1.2/gcc/mklibgcc.in	2007-01-25 16:47:43.000000000 +0100
@@ -196,7 +196,7 @@ for ml in $MULTILIBS; do
   shlib_slibdir_qual=
   libgcc_a=$dir/libgcc.a
   libgcov_a=$dir/libgcov.a
-  libgcc_eh_a=
+  libgcc_eh_a=$dir/libgcc_eh.a
   libgcc_s_so=
   libunwind_a=
   libunwind_so=
@@ -205,7 +205,6 @@ for ml in $MULTILIBS; do
     libunwind_a=$dir/libunwind.a
   fi
   if [ "$SHLIB_LINK" ]; then
-    libgcc_eh_a=$dir/libgcc_eh.a
     libgcc_s_so=$dir/libgcc_s${SHLIB_EXT}
     if [ "$LIBUNWIND" ]; then
       libunwind_so=$dir/libunwind${SHLIB_EXT}
@@ -868,12 +867,11 @@ for ml in $MULTILIBS; do
   echo '	$(INSTALL_DATA)' ${dir}/libgcov.a ${ldir}/
   echo '	chmod 644'  ${ldir}/libgcov.a
   echo '	$(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a
+  echo '	$(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
+  echo '	chmod 644'  ${ldir}/libgcc_eh.a
+  echo '	$(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
 
   if [ "$SHLIB_LINK" ]; then
-    echo '	$(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
-    echo '	chmod 644'  ${ldir}/libgcc_eh.a
-    echo '	$(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
-
     shlib_slibdir_qual=
     os_multilib_dir=`$GCC_FOR_TARGET $flags --print-multi-os-directory`
     if [ "$os_multilib_dir" != . ]; then


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/arm-gp2x-linux-gcc/F-7/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	28 Jul 2007 20:35:08 -0000	1.1
+++ .cvsignore	28 Jul 2007 21:13:42 -0000	1.2
@@ -0,0 +1,3 @@
+gcc-core-4.1.2.tar.bz2
+glibc-2.3.6.tar.bz2
+glibc-linuxthreads-2.3.6.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/arm-gp2x-linux-gcc/F-7/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	28 Jul 2007 20:35:08 -0000	1.1
+++ sources	28 Jul 2007 21:13:42 -0000	1.2
@@ -0,0 +1,3 @@
+2af3fb599635219171c6ae1f3034888a  gcc-core-4.1.2.tar.bz2
+bfdce99f82d6dbcb64b7f11c05d6bc96  glibc-2.3.6.tar.bz2
+d4eeda37472666a15cc1f407e9c987a9  glibc-linuxthreads-2.3.6.tar.bz2




More information about the scm-commits mailing list