summaryrefslogtreecommitdiff
path: root/libre/xtensa-unknown-elf-gcc
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-07-04 13:35:28 -0300
committerAndré Fabian Silva Delgado <emulatorman@lavabit.com>2013-07-04 13:35:28 -0300
commit1b4d48a4e1adc646897e0de4a17b5d702656f9f9 (patch)
tree27ac732c1abc53fc31f0eaf56582d80781e3af7b /libre/xtensa-unknown-elf-gcc
parent0b8227cbc38c4bdad7b63290d0312eabf65b9b54 (diff)
xtensa-unknown-elf-gcc: fix issues on PKGBUILD
Diffstat (limited to 'libre/xtensa-unknown-elf-gcc')
-rw-r--r--libre/xtensa-unknown-elf-gcc/PKGBUILD73
1 files changed, 13 insertions, 60 deletions
diff --git a/libre/xtensa-unknown-elf-gcc/PKGBUILD b/libre/xtensa-unknown-elf-gcc/PKGBUILD
index 797f67f9e..1d81b0385 100644
--- a/libre/xtensa-unknown-elf-gcc/PKGBUILD
+++ b/libre/xtensa-unknown-elf-gcc/PKGBUILD
@@ -10,11 +10,11 @@ _sysroot="/usr/$CHOST/${_target}"
pkgname=${_target}-gcc
pkgver=4.8.1
pkgrel=1
-pkgdesc="The GNU Compiler Collection for Xtensa processors"
+pkgdesc="The GNU Compiler Collection for the Xtensa architecture"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
-makedepends=("binutils>=2.23" 'libmpc' 'cloog' 'gcc-ada' 'doxygen')
+makedepends=('binutils>=2.23' 'libmpc' 'cloog' 'gcc-ada' 'doxygen')
checkdepends=('dejagnu' 'inetutils')
options=('!libtool' '!emptydirs')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2)
@@ -33,13 +33,16 @@ prepare() {
echo ${pkgver} > gcc/BASE-VER
+ # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+
mkdir ${srcdir}/gcc-build
}
build() {
cd ${srcdir}/gcc-build
- ${srcdir}/${_basedir}/configure --prefix=/home/marcio/src/xtensa-elf/tools \
+ ${srcdir}/${_basedir}/configure --prefix=/usr \
--target=${_target} \
--disable-multilib \
--disable-nls \
@@ -48,9 +51,9 @@ build() {
--enable-languages=c \
--disable-libquadmath \
--disable-libssp \
- --with-newlib
-# --disable-werror \
-# --libdir=/usr/lib --libexecdir=/usr/lib \
+ --with-newlib \
+ --disable-werror \
+ --libdir=/usr/lib --libexecdir=/usr/lib
# --mandir=/usr/share/man --infodir=/usr/share/info \
# --with-bugurl=https://labs.parabola.nu/ \
# --disable-shared --enable-threads=posix \
@@ -64,15 +67,11 @@ build() {
# --with-linker-hash-style=gnu --disable-install-libiberty \
# --enable-checking=release \
make all-gcc
-
- # make documentation
- cd ${_target}/libstdc++-v3
- make doc-man-doxygen
}
package()
{
- pkgdesc="The GNU Compiler Collection"
+ pkgdesc="The GNU Compiler Collection for the Xtensa architecture"
depends=("gcc-libs=$pkgver-$pkgrel" 'binutils>=2.23' 'libmpc' 'cloog')
groups=("${_target}-devel")
install=${_target}-gcc.install
@@ -81,56 +80,10 @@ package()
make -j1 DESTDIR=${pkgdir} install-gcc
- install -d $pkgdir/usr/share/gdb/auto-load/usr/lib
- mv $pkgdir{,/usr/share/gdb/auto-load}/usr/lib/libstdc++.so.6.0.18-gdb.py
-
- # unfortunately it is much, much easier to install the lot and clean-up the mess...
- rm $pkgdir/usr/bin/{{${_target}-,}gfortran,{${_target}-,}gccgo,gnat*}
- rm $pkgdir/usr/lib/*.so*
- rm $pkgdir/usr/lib/lib{atomic,gfortran,go{,begin},iberty,objc}.a
- rm $pkgdir/usr/lib/libgfortran.spec
- rm -r $pkgdir/usr/lib/gcc/${_target}-/${pkgver}/{ada{include,lib},finclude,include/objc}
- rm $pkgdir/usr/lib/gcc/${_target}-/${pkgver}/{cc1obj{,plus},f951,gnat1,go1}
- rm $pkgdir/usr/lib/gcc/${_target}-/${pkgver}/{libcaf_single,libgfortranbegin}.a
- rm -r $pkgdir/usr/lib/go
- rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath,libitm}.info
- rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
- rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
-
# many packages expect this symlinks
ln -s ${_target}-gcc ${pkgdir}/usr/bin/${_target}-cc
- # POSIX conformance launcher scripts for c89 and c99
- cat > $pkgdir/usr/bin/${_target}-c89 <<"EOF"
-#!/bin/sh
-fl="-std=c89"
-for opt; do
- case "$opt" in
- -ansi|-std=c89|-std=iso9899:1990) fl="";;
- -std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
- exit 1;;
- esac
-done
-exec ${_target}-gcc $fl ${1+"$@"}
-EOF
-
- cat > $pkgdir/usr/bin/${_target}-c99 <<"EOF"
-#!/bin/sh
-fl="-std=c99"
-for opt; do
- case "$opt" in
- -std=c99|-std=iso9899:1999) fl="";;
- -std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
- exit 1;;
- esac
-done
-exec ${_target}-gcc $fl ${1+"$@"}
-EOF
-
- chmod 755 $pkgdir/usr/bin/${_target}-c{8,9}9
-
-
- # Install Runtime Library Exception
- install -Dm644 ${srcdir}/${_basedir}/COPYING.RUNTIME \
- ${pkgdir}/usr/share/licenses/${_target}/RUNTIME.LIBRARY.EXCEPTION
+ # Remove unnecessary files and folders
+ rm $pkgdir/usr/share/info/* && rmdir $pkgdir/usr/share/info
+ rm $pkgdir/man/man7/* && rmdir $pkgdir/man/man7
}