summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/gcc/PKGBUILD67
-rw-r--r--libre/kernel26-libre/Kbuild19
-rw-r--r--libre/kernel26-libre/Kbuild.platforms6
-rw-r--r--libre/kernel26-libre/PKGBUILD89
4 files changed, 124 insertions, 57 deletions
diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD
index 516fcb58c..b30aeeb2b 100644
--- a/core/gcc/PKGBUILD
+++ b/core/gcc/PKGBUILD
@@ -4,7 +4,7 @@
# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
# NOTE: libtool requires rebuilt with each new gcc version
-pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-go')
+pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc')
pkgver=4.6.0
pkgrel=3
_snapshot=4.6-20110415
@@ -17,8 +17,8 @@ url="http://gcc.gnu.org"
#makedepends=('binutils>=2.21' 'libmpc' 'cloog' 'ppl' 'gcc-ada' 'dejagnu')
makedepends=('binutils>=2.21' 'libmpc' 'cloog' 'ppl' 'dejagnu')
options=('!libtool' '!emptydirs')
-source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc,ada,go,testsuite}-${pkgver}.tar.bz2
- ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc,ada,go,testsuite}-${_snapshot}.tar.bz2
+source=(#ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-{core,g++,fortran,objc}-${pkgver}.tar.bz2
+ ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-{core,g++,fortran,objc}-${_snapshot}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/libstdc++/doxygen/libstdc++-api.${_libstdcppmanver}.man.tar.bz2
gcc_pure64.patch
gcc_mips64el_lib.patch
@@ -50,32 +50,33 @@ build() {
# Do not run fixincludes
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
- if [ "${CARCH}" = "x86_64" ]; then
- patch -Np1 -i ${srcdir}/gcc_pure64.patch
- elif [ "${CARCH}" = "mips64el" ]; then
- patch -Np0 -i ${srcdir}/gcc_mips64el_lib.patch
- fi
- patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
+ if [ "${CARCH}" = "x86_64" ]; then
+ patch -Np1 -i ${srcdir}/gcc_pure64.patch
+ elif [ "${CARCH}" = "mips64el" ]; then
+ patch -Np0 -i ${srcdir}/gcc_mips64el_lib.patch
+ fi
+ patch -Np0 -i ${srcdir}/gcc-hash-style-both.patch
echo ${pkgver} > gcc/BASE-VER
cd ${srcdir}
- mkdir gcc-build && cd gcc-build
-
- ${_basedir}/configure --prefix=/usr \
- --libdir=/usr/lib --libexecdir=/usr/lib \
- --mandir=/usr/share/man --infodir=/usr/share/info \
- --with-bugurl=https://bugs.parabolagnulinux.org/ \
- --enable-languages=c,c++,fortran,lto,objc,obj-c++ \
- --enable-shared --enable-threads=posix \
- --with-system-zlib --enable-__cxa_atexit \
- --disable-libunwind-exceptions --enable-clocale=gnu \
- --enable-gnu-unique-object --enable-linker-build-id \
- --with-ppl --enable-cloog-backend=isl \
- --enable-lto --enable-gold --enable-ld=default \
- --enable-plugin --with-plugin-ld=ld.gold \
- --disable-multilib --disable-libstdcxx-pch \
- --enable-checking=release
+ mkdir gcc-build
+ cd gcc-build
+
+ ${_basedir}/configure --prefix=/usr \
+ --libdir=/usr/lib --libexecdir=/usr/lib \
+ --mandir=/usr/share/man --infodir=/usr/share/info \
+ --with-bugurl=https://bugs.parabolagnulinux.org/ \
+ --enable-languages=c,c++,fortran,lto,objc,obj-c++ \
+ --enable-shared --enable-threads=posix \
+ --with-system-zlib --enable-__cxa_atexit \
+ --disable-libunwind-exceptions --enable-clocale=gnu \
+ --enable-gnu-unique-object --enable-linker-build-id \
+ --with-ppl --enable-cloog-backend=isl \
+ --enable-lto --enable-gold --enable-ld=default \
+ --enable-plugin --with-plugin-ld=ld.gold \
+ --disable-multilib --disable-libstdcxx-pch \
+ --enable-checking=release
make
}
@@ -132,18 +133,13 @@ package_gcc()
# unfortunately it is much, much easier to install the lot and clean-up the mess...
make -j1 DESTDIR=${pkgdir} install
- rm $pkgdir/usr/bin/{{$CHOST-,}gfortran,{$CHOST-,}gccgo,gnat*}
+ rm $pkgdir/usr/bin/{$CHOST-,}gfortran
rm $pkgdir/usr/lib/*.so*
- rm $pkgdir/usr/lib/lib{ffi,gfortran,go{,begin},objc,quadmath}.a
+ rm $pkgdir/usr/lib/lib{gfortran,objc}.a
rm $pkgdir/usr/lib/libgfortran.spec
- rm -r $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{finclude,include/objc}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/include/{ffi{,target}.h,quadmath{,_weak}.h}
- rm $pkgdir/usr/lib/gcc/$CHOST/${pkgver}/{cc1obj{,plus},f951,gnat1,go1,libgfortranbegin.a}
- rm -r $pkgdir/usr/lib/go
- rm $pkgdir/usr/share/info/{gccgo,gfortran,gnat*,libgomp,libquadmath}.info
+ rm $pkgdir/usr/share/info/libgomp.info
rm $pkgdir/usr/share/locale/{de,fr}/LC_MESSAGES/libstdc++.mo
- rm $pkgdir/usr/share/man/man1/{gccgo,gfortran}.1
- rm $pkgdir/usr/share/man/man3/ffi*
+ rm $pkgdir/usr/share/man/man1/gfortran.1
# many packages require these symlinks
install -dm755 ${pkgdir}/lib
@@ -203,8 +199,7 @@ package_gcc-fortran()
install -Dm755 gcc/f951 $pkgdir/usr/lib/gcc/$CHOST/$pkgver/f951
# remove libraries included in gcc-libs
- rm ${pkgdir}/usr/lib/lib{gfortran,quadmath}.so*
- rm ${pkgdir}/usr/share/info/libquadmath.info
+ rm ${pkgdir}/usr/lib/libgfortran.so*
# Install Runtime Library Exception
install -Dm644 ${_basedir}/COPYING.RUNTIME \
diff --git a/libre/kernel26-libre/Kbuild b/libre/kernel26-libre/Kbuild
new file mode 100644
index 000000000..8a9d7dceb
--- /dev/null
+++ b/libre/kernel26-libre/Kbuild
@@ -0,0 +1,19 @@
+# Fail on warnings - also for files referenced in subdirs
+# -Werror can be disabled for specific files using:
+# CFLAGS_<file.o> := -Wno-error
+subdir-ccflags-y := -Wno-error
+
+# platform specific definitions
+include arch/mips/Kbuild.platforms
+obj-y := $(platform-y)
+
+# make clean traverses $(obj-) without having included .config, so
+# everything ends up here
+obj- := $(platform-)
+
+# mips object files
+# The object files are linked as core-y files would be linked
+
+obj-y += kernel/
+obj-y += mm/
+obj-y += math-emu/
diff --git a/libre/kernel26-libre/Kbuild.platforms b/libre/kernel26-libre/Kbuild.platforms
new file mode 100644
index 000000000..90a226888
--- /dev/null
+++ b/libre/kernel26-libre/Kbuild.platforms
@@ -0,0 +1,6 @@
+# All platforms listed in alphabetic order
+
+platforms += loongson
+
+# include the platform specific files
+include $(patsubst %, $(srctree)/arch/mips/%/Platform, $(platforms))
diff --git a/libre/kernel26-libre/PKGBUILD b/libre/kernel26-libre/PKGBUILD
index 64375751f..31dca52b0 100644
--- a/libre/kernel26-libre/PKGBUILD
+++ b/libre/kernel26-libre/PKGBUILD
@@ -10,25 +10,51 @@ pkgver=${_basekernel}.4
pkgrel=1
makedepends=('xmlto' 'docbook-xsl')
_patchname="patch-${pkgver}-${pkgrel}-LIBRE"
-arch=(i686 x86_64 'mips64el')
+arch=(i686 x86_64 mips64el)
license=('GPL2')
url="http://linux-libre.fsfla.org/"
options=(!strip)
source=(http://linux-libre.fsfla.org/pub/linux-libre/releases/${pkgver}-libre/linux-${pkgver}-libre.tar.bz2
+ http://linux-libre.fsfla.org/pub/linux-libre/lemote/gnewsense/pool/linux-patches-${pkgver}-libre-lemote_0lxo_mipsel.tar.bz2
http://repo.parabolagnulinux.org/other/kernel26/${_patchname}.bz2
# the main kernel config files
config.i686 config.x86_64
# standard config files for mkinitcpio ramdisk
kernel26.preset
- kernel26.install)
+ kernel26.install
+ Kbuild
+ Kbuild.platforms)
+md5sums=('0f1a5d184d4029c9d9b38a4b9407c392'
+ 'bff27ebb220bd720d622047174511d94'
+ '8395aac2f31718b45afe57794c21ab81'
+ 'a6b673aead69b12f50b8ca53d1f14b14'
+ 'fa7d6abea1e2163b1ab2b1acfe117f51'
+ '25584700a0a679542929c4bed31433b6'
+ '2d68b4cf4caedd1f0188f4877eca1d43'
+ '2967cecc3af9f954ccc822fd63dca6ff'
+ '8267264d9a8966e57fdacd1fa1fc65c4')
build() {
cd ${srcdir}/linux-$pkgver
# Add -LIBRE patches
# See http://projects.parabolagnulinux.org/linux-libre-2.6-LIBRE.git/
- patch -Np1 -i ${srcdir}/${_patchname} || return 1
+ patch -Np1 -i ${srcdir}/${_patchname}
+ sed -i "s|^EXTRAVERSION.*|EXTRAVERSION = .${pkgver##*.}-libre|" Makefile
+
+ if [ "$CARCH" == "mips64el" ]; then
+ msg2 "Adding loongson-community patches"
+ patch -Np1 -i ${srcdir}/$pkgver-*-loongson-community.patch
+ patch -Np0 -i ${srcdir}/lxo-config.patch
- cat $srcdir/config.$CARCH > ./.config # simpler
+# ensure N32
+ sed -i "s|CONFIG_MIPS32_O32=.*|# CONFIG_MIPS32_O32 is not set|g" ./.config
+ sed -i "s|CONFIG_MIPS32_N32=.*|CONFIG_MIPS32_N32=y|g" ./.config
+
+# build with -Wno-error
+ cp --remove-destination ${srcdir}/Kbuild arch/mips/
+ else
+ cat $srcdir/config.$CARCH > ./.config # simpler
+ fi
for this_doesnt_build in CONFIG_WLAGS49_H2 CONFIG_WLAGS49_H25; do
sed -i "s|^${this_doesnt_build}=.*|# ${this_doesnt_build} is not set|g" ./.config
@@ -58,7 +84,11 @@ build() {
####################
yes "" | make config
# build!
- make ${MAKEFLAGS} bzImage modules
+ if [ "$CARCH" == "mips64el" ]; then
+ make ${MAKEFLAGS} vmlinuz modules
+ else
+ make ${MAKEFLAGS} bzImage modules
+ fi
}
package_kernel26-libre() {
@@ -80,13 +110,20 @@ package_kernel26-libre() {
optdepends=('crda: to set the correct wireless channels of your country')
KARCH=x86
+ [[ $CARCH = "mips64el" ]] && KARCH=mips
cd ${srcdir}/linux-$pkgver
# get kernel version
_kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/{lib/modules,lib/firmware,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install
cp System.map ${pkgdir}/boot/System.map26${_kernelname}
- cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
+
+ if [ "$CARCH" == "mips64el" ]; then
+ cp vmlinuz ${pkgdir}/boot/vmlinuz26${_kernelname}
+ else
+ cp arch/$KARCH/boot/bzImage ${pkgdir}/boot/vmlinuz26${_kernelname}
+ install -m644 -D vmlinux.32 ${pkgdir}/usr/src/linux-${_kernver}/vmlinux32
+ fi
# # add vmlinux
install -m644 -D vmlinux ${pkgdir}/usr/src/linux-${_kernver}/vmlinux
@@ -118,6 +155,9 @@ package_kernel26-libre-headers() {
replaces=('kernel26-headers')
conflicts=('kernel26-headers')
KARCH=x86
+ [[ $CARCH = "mips64el" ]] && KARCH=mips
+ cd ${srcdir}/linux-$pkgver
+ _kernver="$(make kernelrelease)"
mkdir -p ${pkgdir}/lib/modules/${_kernver}
cd ${pkgdir}/lib/modules/${_kernver}
ln -sf ../../../usr/src/linux-${_kernver} build
@@ -130,14 +170,18 @@ package_kernel26-libre-headers() {
${pkgdir}/usr/src/linux-${_kernver}/.config
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include
- for i in acpi asm-generic config crypto drm generated linux math-emu \
- media net pcmcia scsi sound trace video xen; do
+ for i in acpi asm-generic config crypto drm generated linux math-emu media net pcmcia scsi sound trace video xen; do
cp -a include/$i ${pkgdir}/usr/src/linux-${_kernver}/include/
done
# copy arch includes for external modules
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
- cp -a arch/x86/include ${pkgdir}/usr/src/linux-${_kernver}/arch/x86/
+ mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH
+ cp -a arch/$KARCH/include ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
+ if [ "$CARCH" = "mips64el" ]; then
+ cp -a arch/$KARCH/Kbuild ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
+ cp -a arch/$KARCH/loongson ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
+ cp -a $srcdir/Kbuild.platforms ${pkgdir}/usr/src/linux-${_kernver}/arch/$KARCH/
+ fi
# copy files necessary for later builds, like nvidia and vmware
cp Module.symvers ${pkgdir}/usr/src/linux-${_kernver}
@@ -161,8 +205,10 @@ package_kernel26-libre-headers() {
mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
cp -a drivers/media/video/$i/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/media/video/$i
done
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
- cp -a drivers/staging/usbvideo/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
+ if [ "$CARCH" != "mips64el" ]; then
+ mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
+ cp -a drivers/staging/usbvideo/*.h ${pkgdir}/usr/src/linux-${_kernver}/drivers/staging/usbvideo/
+ fi
# add docbook makefile
install -D -m644 Documentation/DocBook/Makefile \
${pkgdir}/usr/src/linux-${_kernver}/Documentation/DocBook/Makefile
@@ -183,8 +229,10 @@ package_kernel26-libre-headers() {
# add dvb headers for external modules
# in reference to:
# http://bugs.archlinux.org/task/11194
- mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
- cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
+ if [ "$CARCH" != "mips64el" ]; then
+ mkdir -p ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
+ cp include/config/dvb/*.h ${pkgdir}/usr/src/linux-${_kernver}/include/config/dvb/
+ fi
# add dvb headers for http://mcentral.de/hg/~mrec/em28xx-new
# in reference to:
# http://bugs.archlinux.org/task/13146
@@ -224,7 +272,12 @@ package_kernel26-libre-headers() {
esac
done
# remove unneeded architectures
- rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,mips,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
+ rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/{alpha,arm,arm26,avr32,blackfin,cris,frv,h8300,ia64,m32r,m68k,m68knommu,microblaze,mn10300,parisc,powerpc,ppc,s390,sh,sh64,sparc,sparc64,um,v850,xtensa}
+ if [ "$CARCH" = "mips64el" ]; then
+ rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/x86
+ else
+ rm -rf ${pkgdir}/usr/src/linux-${_kernver}/arch/mips
+ fi
}
package_kernel26-libre-docs() {
@@ -241,9 +294,3 @@ find $pkgdir -type d -exec chmod 755 {} \;
# remove a file already in kernel26 package
rm -f $pkgdir/usr/src/linux-$_kernver/Documentation/DocBook/Makefile
}
-md5sums=('0f1a5d184d4029c9d9b38a4b9407c392'
- '8395aac2f31718b45afe57794c21ab81'
- 'a6b673aead69b12f50b8ca53d1f14b14'
- 'fa7d6abea1e2163b1ab2b1acfe117f51'
- '25584700a0a679542929c4bed31433b6'
- '2d68b4cf4caedd1f0188f4877eca1d43')