CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
Revert "Revert gcc: Fixed build and removed not needed configure options"
[crossrootfs.git] / gcc / Pkgfile
index ffcb2e0dca170898ba12a1b862e617b0e25ba171..795910fa63ead0ebbe6e34660e4a2f793c467309 100644 (file)
@@ -1,26 +1,23 @@
 # Description: The GNU Compiler Collection
 # URL: http://gcc.gnu.org
 # Maintainer: CRUX System Team, core-ports at crux dot nu
-# Arch Maintainer: CRUX-ARM System Team, crux-arm at mikeux dot dyndns dot org
-# Depends on: libgmp libmpfr
+# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu
+# Depends on: zlib libmpc
 
 name=gcc
-version=4.4.2
+version=4.6.1
 release=1
 source=(ftp://sources.redhat.com/pub/gcc/releases/$name-$version/$name-{core,g++}-$version.tar.bz2
-        $name-nocheck-fixincludes.patch test-demangle.c.diff)
+        $name-$version-gnueabihf.patch)
 
 
 build() {
   cd $name-$version
   
-  patch -p1 -i $SRC/$name-nocheck-fixincludes.patch
-  patch -p0 -i $SRC/test-demangle.c.diff
+  patch -p1 -i $SRC/$name-$version-gnueabihf.patch
   sed -i 's|REVISION|REVISION " (CRUX)"|' $name/version.c
   # apply a sed substitutio that will suppress the installation of libiberty.a
   sed 's|install_to_$(INSTALL_DEST) ||' -i libiberty/Makefile.in
-  # avoid hardcodeds
-  sed 's|@have_mktemp_command@|yes|' -i gcc/gccbug.in
 
   mkdir $SRC/build
   cd $SRC/build
@@ -30,15 +27,19 @@ build() {
                               --host=$CTARGET \
                               --target=$CTARGET \
                               --prefix=/usr \
+                              --mandir=/usr/man \
                               --libexecdir=/usr/lib \
                               --enable-languages=c,c++ \
+                              --disable-libstdcxx-pch \
                               --enable-threads=posix \
-                              --enable-shared \
                               --enable-__cxa_atexit \
                               --enable-clocale=gnu \
+                              --enable-shared \
+                              --with-float=hard \
                               --disable-nls \
-                              --disable-libstdcxx-pch \
-                              --with-x=no
+                              --with-x=no \
+                              --with-system-zlib \
+                              --with-pkgversion="CRUX"
 
   # prevent GCC from looking in the wrong directories for headers and libraries
   sed "/^HOST_\(GMP\|PPL\|CLOOG\)\(LIBS\|INC\)/s:-[IL]/\(lib\|include\)::" -i Makefile
@@ -50,12 +51,12 @@ build() {
   ln -sf ../usr/bin/cpp $PKG/lib/cpp
   ln -sf gcc $PKG/usr/bin/cc
   ln -sf g++ $PKG/usr/bin/c++
+
   mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
-  rm -rf $PKG/usr/info $PKG/usr/lib/libiberty.a \
-         $PKG/usr/bin/*-linux-gnu-* \
-         $PKG/usr/lib/gcc/*/$version/install-tools \
-         $PKG/usr/lib/gcc/*/$version/include/README \
-         $PKG/usr/lib/gcc/*/$version/include-fixed
+
+  rm $PKG/usr/lib/libstdc++.so.6.0.16-gdb.py
+  rm -r $PKG/usr/share
+  rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
 
   sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib/{libstdc++.la,libsupc++.la}
 }