summaryrefslogtreecommitdiff
path: root/lang/gcc-aux
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2015-11-30 00:15:39 +0000
committerJohn Marino <marino@FreeBSD.org>2015-11-30 00:15:39 +0000
commit82cfb486dcace15703c07118ce15de0df97de7c6 (patch)
tree3f79e9eacef428835dfcecd5e6e8756fb8bb41df /lang/gcc-aux
parentNew Port: textproc/kibana43 (diff)
Add gnatdroid-x86 (3 new ports), X-compiler to Android-x86
Similar to lang/gnatdroid-armv7, lang/gnatdroid-x86 is a cross-compiler targetting Android. The former targets ARMv7 processors while the latter targets Android on x86 (32-bit). The latter also runs on Virtualbox as a bonus. The new ports are implemented as slaves to the ARMv7 versions. The GNAT ACATS were run, and it passed every test except CXG2024, "accuracy of multiplication and division of mixed decimal and binary fixed point numbers". subtest 13: expected -51.00 got 50.0 subtest 14: expected 51.0 got 50.0 This is probably a rounding error unique to 32-bit x86. Overall this version passed better than gnatdroid-armv7 because unwind is supported, enabling check check support. Also added: lang/gnatdroid-sysroot-x86 (KitKat and Lollipop API) lang/gnatdroid-binutils-x86 Despite the desciption, C++, Fortran and Objective-C should also work well (in addition to advertised C and Ada frontends). === The gnatdroid-x86 port builds a C/Ada cross-compiler based on GCC 4.9 that targets the Android operating system (up to version 5.0, API level 21) running on x86 or x86_64 architecture (version 7). This produces binaries that run natively on x86-based Android devices.
Notes
Notes: svn path=/head/; revision=402635
Diffstat (limited to 'lang/gcc-aux')
-rw-r--r--lang/gcc-aux/Makefile.version1
-rw-r--r--lang/gcc-aux/files/diff-ada70
-rw-r--r--lang/gcc-aux/files/diff-ada-testsuite6
-rw-r--r--lang/gcc-aux/files/diff-cxx23
-rw-r--r--lang/gcc-aux/files/patch-libstdc++-v3_config_os_bionic_ctype__base.h21
5 files changed, 81 insertions, 40 deletions
diff --git a/lang/gcc-aux/Makefile.version b/lang/gcc-aux/Makefile.version
index 277fede90eba..3ff1600d4fc4 100644
--- a/lang/gcc-aux/Makefile.version
+++ b/lang/gcc-aux/Makefile.version
@@ -7,6 +7,7 @@ SNAPSHOT= 20150626
MAIN_PR= 0
UTIL_PR= 0
ARMV7_PR= 1
+X86_PR= 0
# Snapshot naming pattern
#IDENTIFICATION= gcc-${GCC_BRANCH}-${SNAPSHOT}
diff --git a/lang/gcc-aux/files/diff-ada b/lang/gcc-aux/files/diff-ada
index aeeb2e3c8246..b2483b4b358c 100644
--- a/lang/gcc-aux/files/diff-ada
+++ b/lang/gcc-aux/files/diff-ada
@@ -2358,17 +2358,6 @@
/*---------------------- PPC AIX/PPC Lynx 178/Older Darwin ------------------*/
#elif ((defined (_POWER) && defined (_AIX)) || \
(defined (__powerpc__) && defined (__Lynx__) && !defined(__ELF__)) || \
---- gcc/ada/gcc-interface/Make-lang.in.orig
-+++ gcc/ada/gcc-interface/Make-lang.in
-@@ -584,7 +584,7 @@
- ada/widechar.o
-
- # Language-independent object files.
--ADA_BACKEND = $(BACKEND) attribs.o
-+ADA_BACKEND = $(BACKEND2) attribs.o
-
- # List of target dependent sources, overridden below as necessary
- TARGET_ADA_SRCS =
--- gcc/ada/gcc-interface/Makefile.in.orig
+++ gcc/ada/gcc-interface/Makefile.in
@@ -1044,6 +1044,7 @@
@@ -2410,7 +2399,47 @@
THREADSLIB = -lposix4 -lthread
MISCLIB = -lposix4 -lnsl -lsocket
SO_OPTS = -Wl,-h,
-@@ -1330,8 +1332,11 @@
+@@ -1266,6 +1268,39 @@
+ LIBRARY_VERSION := $(LIB_VERSION)
+ endif
+
++# x86 android
++ifeq ($(strip $(filter-out %86 linux-android,$(target_cpu) $(target_os))),)
++ LIBGNAT_TARGET_PAIRS = \
++ a-intnam.ads<a-intnam-linux.ads \
++ g-socthi.adb<g-socthi-bsd.adb \
++ s-inmaop.adb<s-inmaop-posix.adb \
++ s-intman.adb<s-intman-posix.adb \
++ s-linux.ads<s-linux-android.ads \
++ s-osinte.adb<s-osinte-android.adb \
++ s-osinte.ads<s-osinte-android.ads \
++ s-osprim.adb<s-osprim-posix.adb \
++ s-taprop.adb<s-taprop-posix.adb \
++ s-taspri.ads<s-taspri-posix.ads \
++ s-tpopsp.adb<s-tpopsp-posix-foreign.adb \
++ $(ATOMICS_TARGET_PAIRS) \
++ $(X86_TARGET_PAIRS) \
++ system.ads<system-linux-x86.ads
++
++ TOOLS_TARGET_PAIRS = \
++ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb \
++ indepsw.adb<indepsw-gnu.adb
++
++ EXTRA_LIBGNAT_OBJS=
++ EXTRA_GNATRTL_TASKING_OBJS=s-linux.o
++ EXTRA_GNATRTL_NONTASKING_OBJS=
++ EH_MECHANISM=-gcc
++ THREADSLIB=
++ MISCLIB=
++ GMEM_LIB=
++ GNATLIB_SHARED = gnatlib-shared-dual
++ LIBRARY_VERSION := $(LIB_VERSION)
++endif
++
+ # x86 kfreebsd
+ ifeq ($(strip $(filter-out %86 kfreebsd%,$(target_cpu) $(target_os))),)
+ LIBGNAT_TARGET_PAIRS = \
+@@ -1330,8 +1365,11 @@
ifeq ($(strip $(filter-out %86 freebsd%,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-freebsd.ads \
@@ -2422,7 +2451,7 @@
s-osinte.adb<s-osinte-freebsd.adb \
s-osinte.ads<s-osinte-freebsd.ads \
s-osprim.adb<s-osprim-posix.adb \
-@@ -1346,6 +1351,8 @@
+@@ -1346,6 +1384,8 @@
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
GNATLIB_SHARED = gnatlib-shared-dual
@@ -2431,7 +2460,7 @@
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
EH_MECHANISM=-gcc
-@@ -1359,8 +1366,11 @@
+@@ -1359,8 +1399,11 @@
ifeq ($(strip $(filter-out %86_64 freebsd%,$(target_cpu) $(target_os))),)
LIBGNAT_TARGET_PAIRS = \
a-intnam.ads<a-intnam-freebsd.ads \
@@ -2443,7 +2472,7 @@
s-osinte.adb<s-osinte-freebsd.adb \
s-osinte.ads<s-osinte-freebsd.ads \
s-osprim.adb<s-osprim-posix.adb \
-@@ -1375,6 +1385,181 @@
+@@ -1375,6 +1418,181 @@
mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb
GNATLIB_SHARED = gnatlib-shared-dual
@@ -2625,6 +2654,17 @@
EXTRA_GNATRTL_NONTASKING_OBJS=g-sse.o g-ssvety.o
EH_MECHANISM=-gcc
+--- gcc/ada/gcc-interface/Make-lang.in.orig
++++ gcc/ada/gcc-interface/Make-lang.in
+@@ -584,7 +584,7 @@
+ ada/widechar.o
+
+ # Language-independent object files.
+-ADA_BACKEND = $(BACKEND) attribs.o
++ADA_BACKEND = $(BACKEND2) attribs.o
+
+ # List of target dependent sources, overridden below as necessary
+ TARGET_ADA_SRCS =
--- gnattools/configure.ac.orig
+++ gnattools/configure.ac
@@ -79,11 +79,27 @@
diff --git a/lang/gcc-aux/files/diff-ada-testsuite b/lang/gcc-aux/files/diff-ada-testsuite
index c94e9a3e5764..722ddc4d963a 100644
--- a/lang/gcc-aux/files/diff-ada-testsuite
+++ b/lang/gcc-aux/files/diff-ada-testsuite
@@ -126,7 +126,7 @@
+gccflags="-O2"
+gnatflags="-gnatws"
+tabtarget="/data/local/testsuite"
-+STRIP="arm-aux-linux-androideabi-strip"
++STRIP="@REMOTE_TARGET@-strip"
+
+target_run () {
+ # Run on rooted tablet (port 22 vs port 2222)
@@ -180,8 +180,8 @@
+fi
+
+target_gnatmake () {
-+ echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\"
-+ gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC"
++ echo gnatmake-cross --GCC=\"$GCC\" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC=\"$GCC\" -fPIE -pie
++ gnatmake-cross --GCC="$GCC" $gnatflags $gccflags $* -largs $EXTERNAL_OBJECTS --GCC="$GCC" -fPIE -pie
+}
+
+target_gcc () {
diff --git a/lang/gcc-aux/files/diff-cxx b/lang/gcc-aux/files/diff-cxx
index 428975bd98ed..51aae24bdc6d 100644
--- a/lang/gcc-aux/files/diff-cxx
+++ b/lang/gcc-aux/files/diff-cxx
@@ -970,9 +970,30 @@
+ dragonfly*)
+ os_include_dir="os/bsd/dragonfly"
+ ;;
-+ linux-androideabi)
++ linux-android*)
+ os_include_dir="os/bionic"
+ ;;
bsd*)
# Plain BSD attempts to share FreeBSD files.
os_include_dir="os/bsd/freebsd"
+--- libstdc++-v3/config/os/bionic/ctype_base.h.orig
++++ libstdc++-v3/config/os/bionic/ctype_base.h
+@@ -40,6 +40,18 @@
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
++#ifdef _CTYPE_U
++#define _U _CTYPE_U
++#define _L _CTYPE_L
++#define _D _CTYPE_D
++#define _S _CTYPE_S
++#define _P _CTYPE_P
++#define _C _CTYPE_C
++#define _X _CTYPE_X
++#define _B _CTYPE_B
++#define _N _CTYPE_D
++#endif
++
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef char mask;
diff --git a/lang/gcc-aux/files/patch-libstdc++-v3_config_os_bionic_ctype__base.h b/lang/gcc-aux/files/patch-libstdc++-v3_config_os_bionic_ctype__base.h
deleted file mode 100644
index 531c67e6dfa1..000000000000
--- a/lang/gcc-aux/files/patch-libstdc++-v3_config_os_bionic_ctype__base.h
+++ /dev/null
@@ -1,21 +0,0 @@
---- libstdc++-v3/config/os/bionic/ctype_base.h.orig 2014-01-02 22:30:10 UTC
-+++ libstdc++-v3/config/os/bionic/ctype_base.h
-@@ -40,6 +40,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
- // Non-standard typedefs.
- typedef const int* __to_type;
-
-+#ifdef _CTYPE_U
-+#define _U _CTYPE_U
-+#define _L _CTYPE_L
-+#define _D _CTYPE_D
-+#define _S _CTYPE_S
-+#define _P _CTYPE_P
-+#define _C _CTYPE_C
-+#define _X _CTYPE_X
-+#define _B _CTYPE_B
-+#define _N _CTYPE_D
-+#endif
-+
- // NB: Offsets into ctype<char>::_M_table force a particular size
- // on the mask type. Because of this, we don't use an enum.
- typedef char mask;