aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/ada-crossbuild.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-09-06 11:24:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-09-10 09:12:29 +0000
commitea0af854b52e5d2b44e6af094572e6ae38d1ba5a (patch)
tree9980f07181336553da3ae7452b7a69a41750f5fe /main/gcc/ada-crossbuild.patch
parent6a32c55e54342aadd5b4d4319ab084d34913e16b (diff)
downloadaports-ea0af854b52e5d2b44e6af094572e6ae38d1ba5a.tar.bz2
aports-ea0af854b52e5d2b44e6af094572e6ae38d1ba5a.tar.xz
main/gcc: fixes, support crosscompiler creation
- implement cross compiler creation - fix musl build - fix cross-building - fix ada to default to shared linking - fix gcc-gnat dependencies
Diffstat (limited to 'main/gcc/ada-crossbuild.patch')
-rw-r--r--main/gcc/ada-crossbuild.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/main/gcc/ada-crossbuild.patch b/main/gcc/ada-crossbuild.patch
new file mode 100644
index 0000000000..d3d2280cb6
--- /dev/null
+++ b/main/gcc/ada-crossbuild.patch
@@ -0,0 +1,49 @@
+Based on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55946
+
+--- gcc-4.8.1/libada/configure.orig
++++ gcc-4.8.1/libada/configure
+@@ -2951,9 +2951,7 @@
+
+
+ # Determine what to build for 'gnatlib'
+-if test $build = $target \
+- && test ${enable_shared} = yes ; then
+- # Note that build=target is almost certainly the wrong test; FIXME
++if test ${enable_shared} = yes ; then
+ default_gnatlib_target="gnatlib-shared"
+ else
+ default_gnatlib_target="gnatlib-plain"
+--- gcc-4.8.1/gcc/ada/gcc-interface/Make-lang.in.orig
++++ gcc-4.8.1/gcc/ada/gcc-interface/Make-lang.in
+@@ -625,7 +625,7 @@
+ ada/doctools/xgnatugn$(build_exeext): ada/xgnatugn.adb
+ -$(MKDIR) ada/doctools
+ $(CP) $^ ada/doctools
+- cd ada/doctools && $(GNATMAKE) -q xgnatugn
++ cd ada/doctools && gnatmake -q xgnatugn
+
+ # Note that doc/gnat_ugn.texi and doc/projects.texi do not depend on
+ # xgnatugn being built so we can distribute a pregenerated doc/gnat_ugn.info
+--- gcc-4.8.1/gnattools/Makefile.in.orig
++++ gcc-4.8.1/gnattools/Makefile.in
+@@ -32,6 +32,8 @@
+ # Nonstandard autoconf-set variables.
+ LN_S=@LN_S@
+ target_noncanonical=@target_noncanonical@
++build=@build@
++host=@host@
+
+ # Variables for the user (or the top level) to override.
+ exeext = @EXEEXT@
+@@ -183,7 +185,11 @@
+ # put the host RTS dir first in the PATH to hide the default runtime
+ # files that are among the sources
+ # FIXME: This should be done in configure.
++ifeq ($(host), $(build))
+ RTS_DIR:=$(strip $(subst \,/,$(shell gnatls -v | grep adalib )))
++else
++RTS_DIR:=$(strip $(subst \,/,$(shell $(host)-gnatls -v | grep adalib )))
++endif
+ gnattools-cross: $(GCC_DIR)/stamp-tools
+ # gnattools1-re
+ $(MAKE) -C $(GCC_DIR)/ada/tools -f ../Makefile \