gcc48: initial commit

This commit is contained in:
Danny Rawlins 2016-02-25 19:21:55 +11:00
parent 63fb978e0a
commit fccf54e3a4
5 changed files with 1171 additions and 0 deletions

1065
gcc48/.footprint Normal file

File diff suppressed because it is too large Load Diff

3
gcc48/.md5sum Normal file
View File

@ -0,0 +1,3 @@
61a057afa31006764b957a483ba90b9d gcc-4.7.3-multilib-dirs.patch
80d2c2982a3392bb0b89673ff136e223 gcc-4.8.5.tar.bz2
7c9128522053af79791bcfdd55834c2a gcc-nocheck-fixincludes.patch

66
gcc48/Pkgfile Normal file
View File

@ -0,0 +1,66 @@
# URL: http://gcc.gnu.org/
# Description: The GNU Compiler Collection.
# Maintainer: Danny Rawlins, crux at romster dot me
name=gcc48
version=4.8.5
release=1
source=(http://ftp.gnu.org/gnu/gcc/gcc-$version/gcc-$version.tar.bz2
gcc-nocheck-fixincludes.patch gcc-4.7.3-multilib-dirs.patch)
build() {
patch -d gcc-$version -p 1 -i $SRC/gcc-nocheck-fixincludes.patch
patch -d gcc-$version -p 1 -i $SRC/gcc-4.7.3-multilib-dirs.patch
local SUFFIX=-${version%.*}
mkdir build
cd build
../gcc-$version/configure \
--prefix=/usr \
--libexecdir=/usr/lib \
--program-suffix=$SUFFIX \
--enable-languages=c,c++,objc \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--enable-shared \
--disable-nls \
--with-x=no \
--with-system-zlib \
--enable-multilib \
--with-pkgversion="CRUX"
if [ -n "$(pkginfo -i | grep '^ccache ')" ]; then
make STAGE_CC_WRAPPER='/usr/bin/ccache' BOOT_CFLAGS="$CFLAGS" bootstrap
else
make BOOT_CFLAGS="$CFLAGS" bootstrap
fi
make -j 1 DESTDIR=$PKG install
install -d $PKG/lib
ln -sf ../usr/bin/cpp$SUFFIX $PKG/lib/cpp$SUFFIX
ln -sf gcc$SUFFIX $PKG/usr/bin/cc$SUFFIX
ln -sf g++$SUFFIX $PKG/usr/bin/c++$SUFFIX
mv $PKG/usr/lib/gcc/*/$version/include-fixed/{limits.h,syslimits.h} $PKG/usr/lib/gcc/*/$version/include/
sed -i "s|-L$SRC[^ ]* ||g" $PKG/usr/lib{,32}/{libstdc++.la,libsupc++.la}
# remove files already on the system out of the port
for i in $(pkginfo -l gcc | sed -e "s|^|/|") $(pkginfo -l binutils | sed -e "s|^|/|"); do
if [ -e "$i" ] && [ ! -d "$i" ]; then
if [ -e "$PKG$i" ]; then
rm "$PKG$i"
fi
# check for compressed manpages
if [ -e "$PKG${i%%.gz}" ]; then
rm "$PKG${i%%.gz}"
fi
fi
done
rm -f $PKG/usr/lib{,32}/{libiberty.a,libstdc++.so.6.0.19-gdb.py}
rm -r $PKG/usr/share/{info,gcc-$version}
rm -r $PKG/usr/bin/*-linux-gnu-*
rm -r $PKG/usr/lib/gcc/*/$version/{install-tools,include-fixed}
}

View File

@ -0,0 +1,23 @@
diff -Nru gcc-4.7.3.orig/gcc/config/i386/linux64.h gcc-4.7.3/gcc/config/i386/linux64.h
--- gcc-4.7.3.orig/gcc/config/i386/linux64.h 2013-04-13 18:33:41.015109554 +0200
+++ gcc-4.7.3/gcc/config/i386/linux64.h 2013-04-13 18:34:01.147713013 +0200
@@ -28,6 +28,6 @@
#define GNU_USER_LINK_EMULATION64 "elf_x86_64"
#define GNU_USER_LINK_EMULATIONX32 "elf32_x86_64"
-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
-#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
#define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
diff -Nru gcc-4.7.3.orig/gcc/config/i386/t-linux64 gcc-4.7.3/gcc/config/i386/t-linux64
--- gcc-4.7.3.orig/gcc/config/i386/t-linux64 2013-04-13 18:33:41.015109554 +0200
+++ gcc-4.7.3/gcc/config/i386/t-linux64 2013-04-13 18:39:13.269752565 +0200
@@ -34,6 +34,6 @@
comma=,
MULTILIB_OPTIONS = $(subst $(comma),/,$(TM_MULTILIB_CONFIG))
MULTILIB_DIRNAMES = $(patsubst m%, %, $(subst /, ,$(MULTILIB_OPTIONS)))
-MULTILIB_OSDIRNAMES = m64=../lib64$(call if_multiarch,:x86_64-linux-gnu)
+MULTILIB_OSDIRNAMES = m64=../lib$(call if_multiarch,:x86_64-linux-gnu)
MULTILIB_OSDIRNAMES+= m32=$(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:i386-linux-gnu)
MULTILIB_OSDIRNAMES+= mx32=../libx32$(call if_multiarch,:x86_64-linux-gnux32)

View File

@ -0,0 +1,14 @@
diff -Nru gcc-4.7.3.orig/fixincludes/Makefile.in gcc-4.7.3/fixincludes/Makefile.in
--- gcc-4.7.3.orig/fixincludes/Makefile.in 2013-04-13 18:33:41.098439867 +0200
+++ gcc-4.7.3/fixincludes/Makefile.in 2013-04-13 18:41:29.354868695 +0200
@@ -173,9 +173,7 @@
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
check : all
- autogen -T $(srcdir)/check.tpl $(srcdir)/inclhack.def
- $(SHELL) ./check.sh $(srcdir)/tests/base
- @rm -f ./check.sh
+ echo "No check here.."
install : all
-rm -rf $(DESTDIR)$(itoolsdir)