1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-26 09:46:09 +00:00

- Update to 20120301 (corresponding to gcc 4.6.3)

PR:		ports/166719
Submitted by:	John Marino <draco@marino.st> (maintainer)
This commit is contained in:
Frederic Culot 2012-04-23 14:27:21 +00:00
parent 1482838e4b
commit e41d19c5e2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=295317
9 changed files with 99 additions and 231 deletions

View File

@ -6,53 +6,59 @@
#
PORTNAME= armv5
PORTVERSION= 20110627
PORTREVISION= 1
PORTVERSION= ${SNAPSHOT}
CATEGORIES= lang
MASTER_SITES= http://downloads.dragonlace.net/src/ \
http://dragonlace.mirrors.ada.cx/src/
MASTER_SITES= ${MASTER_SITE_GCC}
MASTER_SITE_SUBDIR= releases/gcc-${GCC_VERSION}
PKGNAMEPREFIX= gnatdroid-
DISTNAME= arm-gnat-${PORTVERSION}
DISTFILES= gcc-core-${GCC_VERSION}.tar.bz2 \
gcc-ada-${GCC_VERSION}.tar.bz2 \
gcc-testsuite-${GCC_VERSION}.tar.bz2
MAINTAINER= draco@marino.st
COMMENT= C/Ada cross-compiler, target: Android ARMv5
BUILD_DEPENDS= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \
gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils \
${LOCALBASE}/lib/libgmp.so:${PORTSDIR}/math/gmp \
${LOCALBASE}/lib/libmpfr.so:${PORTSDIR}/math/mpfr \
${LOCALBASE}/lib/libmpc.so:${PORTSDIR}/math/mpc
RUN_DEPENDS:= ${BUILD_DEPENDS}
BUILD_DEPENDS+= gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux
gnat-aux>=20110325:${PORTSDIR}/lang/gnat-aux
RUN_DEPENDS:= gnatdroid-sysroot>=9:${PORTSDIR}/lang/gnatdroid-sysroot \
gnatdroid-binutils>=2.21:${PORTSDIR}/lang/gnatdroid-binutils
USE_BZIP2= YES
USE_GMAKE= YES
HAS_CONFIGURE= YES
USE_ICONV= YES
USE_BISON= build
ALL_TARGET= default
.include "${.CURDIR}/../gnat-aux/Makefile.common"
LANGS= c ada
APPLY_DIFFS= core ada ada-testsuite gcc-testsuite
NO_MTREE= YES
MAKE_JOBS_SAFE= YES
# Disable C++ until arm.cc/no-rtti issue resolved for libsupc++
#OPTIONS+= CXX "Also build C++ language" off
OPTIONS+= FORT "Also build Fortran language" off
OPTIONS+= OBJC "Also build Objective-C language" off
DROID_TARGET= arm-android-eabi
DROID_ARCH= armv5te
ARMVERSION= ARMv5
FPU= vfp
GCC_BRANCH= 4.6
GCC_VERSION= 4.6.1
WRKSRC= ${WRKDIR}/gcc-${GCC_BRANCH}-${PORTVERSION}
WRKSRC= ${WRKDIR}/gcc-${GCC_VERSION}
BUILDDIR= ${WRKDIR}/build
FILESDIR= ${.CURDIR}/../gnat-aux/files
CFG_SCRIPT= ${WRKSRC}/configure
REVFILE= ${WRKSRC}/gcc/REVISION
SRPREFIX= ${LOCALBASE}/android9
PREFIX= ${SRPREFIX}/${ARMVERSION}
FULL_GNATGCC= ${LOCALBASE}/bin/gnatgcc
INSTALLDIRS= lib/gcc libexec/gcc share
INSTALLDIRS+= ${DROID_TARGET}/lib/armv7-a
INSTALLDIRS+= ${DROID_TARGET}/lib/thumb
PLIST_SUB+= TARGET="${DROID_TARGET}"
PLIST_SUB+= GCCVERS="${GCC_VERSION}"
ADA_CONFIGURE_ENV= CC=${FULL_GNATGCC}
.include <bsd.port.pre.mk>
.include <bsd.port.options.mk>
.if ${ARCH} == "amd64"
OS_LABEL4VERS= "[FreeBSD64 x Android ${ARMVERSION}]"
@ -60,7 +66,43 @@ OS_LABEL4VERS= "[FreeBSD64 x Android ${ARMVERSION}]"
OS_LABEL4VERS= "[FreeBSD32 x Android ${ARMVERSION}]"
.endif
CONFIGURE_ARGS= --enable-languages=c,ada
###########
## C++ ##
###########
.if defined(WITH_CXX)
LANGS+= c++
APPLY_DIFFS+= cxx cxx-testsuite
DISTFILES+= gcc-g++-${GCC_VERSION}.tar.bz2
INSTALLDIRS+= include/c++/${GCC_VERSION}
PLIST_SUB+= CXX=""
.else
PLIST_SUB+= CXX="@comment "
.endif
###############
## Fortran ##
###############
.if defined(WITH_FORT)
LANGS+= fortran
APPLY_DIFFS+= fortran
DISTFILES+= gcc-fortran-${GCC_VERSION}.tar.bz2
PLIST_SUB+= FRT=""
.else
PLIST_SUB+= FRT="@comment "
.endif
###################
## Objective-C ##
###################
.if defined(WITH_OBJC)
LANGS+= objc
DISTFILES+= gcc-objc-${GCC_VERSION}.tar.bz2
.endif
CONFIGURE_ARGS= --enable-languages=${LANGS:Q}
CONFIGURE_ARGS+= --target=${DROID_TARGET}
CONFIGURE_ARGS+= --program-prefix=${DROID_TARGET}-
CONFIGURE_ARGS+= --prefix=${PREFIX}
@ -81,7 +123,7 @@ CONFIGURE_ARGS+= --disable-libssp
CONFIGURE_ARGS+= --disable-libgomp
CONFIGURE_ARGS+= --disable-libmudflap
CONFIGURE_ARGS+= --disable-libquadmath
CONFIGURE_ARGS+= --disable-libstdcxx-pch
CONFIGURE_ARGS+= --disable-sjlj-exceptions
CONFIGURE_ARGS+= --disable-tls
CONFIGURE_ARGS+= --disable-nls
@ -89,6 +131,18 @@ post-extract:
# Personalize GNAT for each different machine
@${ECHO} "-=> GNAT AUX ${OS_LABEL4VERS}" > ${REVFILE}
# Create new directories in preparation of applying diff files
.if defined(WITH_CXX)
${MKDIR} ${WRKSRC}/libstdc++-v3/config/locale/dragonfly
${MKDIR} ${WRKSRC}/libstdc++-v3/config/os/bsd/dragonfly
.endif
# Apply required composite diff files
.for suffix in ${APPLY_DIFFS}
@${ECHO} "Applying composite patch diff-${suffix}"
@${PATCH} -d ${WRKSRC} -s -E < ${FILESDIR}/diff-${suffix}
.endfor
do-configure:
${MKDIR} ${BUILDDIR}
cd ${BUILDDIR} && ${SETENV} ${ADA_CONFIGURE_ENV} \
@ -103,9 +157,15 @@ do-install:
${PREFIX}/bin/${DROID_TARGET}-gnatgcc
${MV} ${PREFIX}/${DROID_TARGET}/bin/gcc \
${PREFIX}/${DROID_TARGET}/bin/gnatgcc
.if defined(WITH_FORT)
${MV} ${PREFIX}/bin/${DROID_TARGET}-gfortran \
${PREFIX}/bin/${DROID_TARGET}-gnatgfortran
${MV} ${PREFIX}/${DROID_TARGET}/bin/gfortran \
${PREFIX}/${DROID_TARGET}/bin/gnatgfortran
.endif
post-install:
.for d in lib/gcc libexec/gcc share
.for d in ${INSTALLDIRS}
cd ${PREFIX}; ${FIND} $d \( -type f -or -type l \) | ${SORT} >> ${TMPPLIST}
cd ${PREFIX}; ${FIND} $d -type d | ${SORT} -dr | \
${SED} -e 's/^/@dirrm /g' >> ${TMPPLIST}

View File

@ -1,2 +1,12 @@
SHA256 (arm-gnat-20110627.tar.bz2) = 3698806aabc63ab93a23e57c2fc4065f41f788e2ac9cff4a05ae501723e7499f
SIZE (arm-gnat-20110627.tar.bz2) = 19133878
SHA256 (gcc-core-4.6.3.tar.bz2) = 283e00881c0de258fafc5170843e4d9b14ee2a7dc4426f0d426e6be0400251c1
SIZE (gcc-core-4.6.3.tar.bz2) = 30305971
SHA256 (gcc-ada-4.6.3.tar.bz2) = 7bb213ec3948646df72720580fcba3489c84aa452bd0e4238712607ef83cbdf6
SIZE (gcc-ada-4.6.3.tar.bz2) = 6092418
SHA256 (gcc-g++-4.6.3.tar.bz2) = b3e0c733e900e99096b0c5480f57e22e3e583ec3d83596cc2cb9986bd64b29e8
SIZE (gcc-g++-4.6.3.tar.bz2) = 6928430
SHA256 (gcc-fortran-4.6.3.tar.bz2) = fe1bdf3485f33e6d0a998ff7bcb42526fbf3083dbfc107c3d95a88c00739eadb
SIZE (gcc-fortran-4.6.3.tar.bz2) = 1676490
SHA256 (gcc-objc-4.6.3.tar.bz2) = 4c193397ce0b8b7b3a6b090078f7228e22999edb14a53480ac709f7f165a4ca3
SIZE (gcc-objc-4.6.3.tar.bz2) = 342441
SHA256 (gcc-testsuite-4.6.3.tar.bz2) = a3448d09e5e8ce6baee4080981efc85e6af1621b66a68258dd645c04ae381bed
SIZE (gcc-testsuite-4.6.3.tar.bz2) = 6354781

View File

@ -1,11 +0,0 @@
--- configure.orig 2011-07-18 00:12:43.000000000 +0200
+++ configure 2011-07-18 00:13:35.000000000 +0200
@@ -3233,7 +3233,7 @@
libgloss_dir=arm
;;
arm-*-elf* | strongarm-*-elf* | xscale-*-elf* | arm*-*-eabi* )
- noconfigdirs="$noconfigdirs target-libffi target-qthreads"
+ noconfigdirs="$noconfigdirs target-libffi target-qthreads target-libstdc++-v3"
libgloss_dir=arm
;;
arm*-*-linux-gnueabi)

View File

@ -1,27 +0,0 @@
--- gcc/Makefile.in.orig 2011-01-09 00:44:20.000000000 +0100
+++ gcc/Makefile.in 2011-01-09 00:53:28.000000000 +0100
@@ -306,11 +306,11 @@
# This is where we get zlib from. zlibdir is -L../zlib and zlibinc is
# -I../zlib, unless we were configured with --with-system-zlib, in which
# case both are empty.
-ZLIB = @zlibdir@ -lz
+ZLIB = -Wl,-Bstatic @zlibdir@ -lz -Wl,-Bdynamic
ZLIBINC = @zlibinc@
# How to find GMP
-GMPLIBS = @GMPLIBS@
+GMPLIBS = -Wl,-Bstatic @GMPLIBS@ -Wl,-Bdynamic
GMPINC = @GMPINC@
# How to find PPL
@@ -626,8 +626,8 @@
LIBINTL_DEP = @LIBINTL_DEP@
# Character encoding conversion library.
-LIBICONV = @LIBICONV@
-LIBICONV_DEP = @LIBICONV_DEP@
+LIBICONV = -Wl,-Bstatic -L/usr/local/lib -liconv -Wl,-Bdynamic
+LIBICONV_DEP =
# The GC method to be used on this system.
GGC=@GGC@.o

View File

@ -1,50 +0,0 @@
--- gcc/ada/adaint.c.orig 2011-04-16 05:34:37.000000000 -0500
+++ gcc/ada/adaint.c 2011-08-19 23:28:10.000000000 -0500
@@ -1201,6 +1201,47 @@
free (pname);
}
+#elif defined (__ANDROID__)
+
+ /*
+ * ext2 /ext3/ext4/fat16/fat32 have no path limits
+ * /data/local/tmp normally requires rooted devices, if it even exists
+ * /sdcard is the standard location for external storage. Nativeactivity
+ * manifest needs to authorize its use, otherwise it might not have the
+ * proper permissions.
+ */
+
+ int testfd;
+ char *datadir = getenv ("ANDROID_DATA");
+
+ if (datadir == NULL)
+ strcpy (tmp_filename, "/data/local/tmp/gnat-XXXXXX");
+ else
+ sprintf (tmp_filename, "%s/local/tmp/gnat-XXXXXX", datadir);
+
+ testfd = mkstemp (tmp_filename);
+ if (testfd != -1)
+ {
+ close (testfd);
+ return;
+ }
+
+ char *sdcard = getenv ("EXTERNAL_STORAGE");
+
+ if (sdcard == NULL)
+ strcpy (tmp_filename, "/sdcard/gnat-XXXXXX");
+ else
+ sprintf (tmp_filename, "%s/gnat-XXXXXX", sdcard);
+
+ testfd = mkstemp (tmp_filename);
+ if (testfd != -1)
+ {
+ close (testfd);
+ return;
+ }
+
+ tmpnam (tmp_filename);
+
#elif defined (linux) || defined (__FreeBSD__) || defined (__NetBSD__) \
|| defined (__DragonFly__) \
|| defined (__OpenBSD__) || defined(__GLIBC__)

View File

@ -1,83 +0,0 @@
--- gcc/ada/gcc-interface/Makefile.in.orig 2011-09-07 16:11:58.000000000 -0500
+++ gcc/ada/gcc-interface/Makefile.in 2011-09-07 16:16:29.000000000 -0500
@@ -1184,6 +1184,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-freebsd.adb \
@@ -1219,6 +1221,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-freebsd.adb \
@@ -1253,6 +1257,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-dragonfly.adb \
@@ -1288,6 +1294,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-dragonfly.adb \
@@ -1322,6 +1330,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-openbsd.adb \
@@ -1357,6 +1367,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-bsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-openbsd.adb \
@@ -1391,6 +1403,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-netbsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-netbsd.adb \
@@ -1435,6 +1449,8 @@
a-numaux.ads<a-numaux-x86.ads \
g-bytswa.adb<g-bytswa-x86.adb \
g-socthi.adb<g-socthi-netbsd.adb \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-osinte.adb<s-osinte-netbsd.adb \
@@ -1472,6 +1488,8 @@
ifeq ($(strip $(filter-out arm% android eabi,$(targ))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-linux.ads \
+ g-trasym.ads<g-trasym-unimplemented.ads \
+ g-trasym.adb<g-trasym-unimplemented.adb \
s-inmaop.adb<s-inmaop-posix.adb \
s-intman.adb<s-intman-posix.adb \
s-linux.ads<s-linux.ads \

View File

@ -1,15 +0,0 @@
--- libiberty/getpagesize.c.orig 2011-01-29 06:55:10 +0100
+++ libiberty/getpagesize.c 2011-01-29 07:07:40 +0100
@@ -20,6 +20,7 @@
*/
+#ifndef __ANDROID__
#ifndef VMS
#include "config.h"
@@ -88,3 +89,4 @@
}
#endif /* VMS */
+#endif /* __ANDROID__ */

View File

@ -1,14 +0,0 @@
--- libiberty/setproctitle.c.orig 2011-01-29 07:11:03 +0100
+++ libiberty/setproctitle.c 2011-01-29 07:28:55 +0100
@@ -40,9 +40,11 @@
void
setproctitle (const char *name ATTRIBUTE_UNUSED, ...)
{
+#ifndef __ANDROID__
#ifdef PR_SET_NAME
/* On Linux this sets the top visible "comm", but not necessarily
the name visible in ps. */
prctl (PR_SET_NAME, name);
#endif
+#endif
}

View File

@ -14,6 +14,7 @@ bin/%%TARGET%%-gcov
bin/%%TARGET%%-cpp
bin/%%TARGET%%-gnatgcc
bin/%%TARGET%%-gcc-%%GCCVERS%%
%%FRT%%bin/%%TARGET%%-gnatgfortran
lib/libiberty.a
%%TARGET%%/bin/gnatbind
%%TARGET%%/bin/gnatchop
@ -24,10 +25,7 @@ lib/libiberty.a
%%TARGET%%/bin/gnatmake
%%TARGET%%/bin/gnatprep
%%TARGET%%/bin/gnatgcc
%%TARGET%%/lib/armv7-a/thumb/libiberty.a
%%TARGET%%/lib/armv7-a/libiberty.a
%%TARGET%%/lib/thumb/libiberty.a
%%TARGET%%/lib/libiberty.a
@dirrm %%TARGET%%/lib/armv7-a/thumb
@dirrm %%TARGET%%/lib/armv7-a
@dirrm %%TARGET%%/lib/thumb
%%FRT%%%%TARGET%%/bin/gnatgfortran
%%FRT%%%%TARGET%%/lib/libgfortran.a
%%FRT%%%%TARGET%%/lib/libgfortran.la
%%FRT%%%%TARGET%%/lib/libgfortran.spec