From ea0af854b52e5d2b44e6af094572e6ae38d1ba5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 6 Sep 2013 11:24:41 +0000 Subject: 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 --- main/gcc/ada-crossbuild.patch | 49 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 main/gcc/ada-crossbuild.patch (limited to 'main/gcc/ada-crossbuild.patch') 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 \ -- cgit v1.2.3