[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#827578: gcc-6: please support the tilegx architecture



Source: gcc-6
Version: 6.1.1-6
Severity: wishlist
Tags: patch
User: helmutg@debian.org
Usertags: rebootstrap

Hi Matthias,

can you add support for the tilegx architecture to gcc-6?

State of tilegx:
 * Waiting for inclusion into dpkg: #823167
 * Supported in linux-libc-dev: #824524 #823632
 * Two glibc patches pending submission
 * With all of the above, the cross toolchain can be bootstrapped.
 * In general, tilegx is supported upstream very well.

Changes needed in the gcc packaging:
 * The usual gcc-multiarch.diff hunk required for every single
   architecture.
 * Tell libgcc about the tilegx-specific header feedback.h.
 * Disable multilib to keep things simple. If someone really wants
   tilepro, we should add another architecture and use cross toolchains
   instead.

Thanks for considering

Helmut
diff --git a/debian/patches/gcc-multiarch.diff b/debian/patches/gcc-multiarch.diff
index 7e34ff6..6802a73 100644
--- a/debian/patches/gcc-multiarch.diff
+++ b/debian/patches/gcc-multiarch.diff
@@ -169,3 +169,14 @@ Index: b/src/gcc/config/mips/mips.h
  /* Load store bonding is not supported by micromips and fix_24k.  The
     performance can be degraded for those targets.  Hence, do not bond for
     micromips or fix_24k.  */
+--- a/src/gcc/config/tilegx/t-tilegx
++++ a/src/gcc/config/tilegx/t-tilegx
+@@ -1,6 +1,7 @@
+ MULTILIB_OPTIONS = m64/m32
+ MULTILIB_DIRNAMES = 64 32
+-MULTILIB_OSDIRNAMES = ../lib ../lib32
++MULTILIB_OSDIRNAMES = ../lib$(call if_multiarch,:tilegx-linux-gnu) ../lib32$(call if_multiarch,:tilegx32-linux-gnu)
++MULTIARCH_DIRNAME = $(call if_multiarch,tilegx-linux-gnu)
+
+ LIBGCC = stmp-multilib
+ INSTALL_LIBGCC = install-multilib
diff --git a/debian/rules.d/binary-libgcc.mk b/debian/rules.d/binary-libgcc.mk
index ce9a2bd..ca25058 100644
--- a/debian/rules.d/binary-libgcc.mk
+++ b/debian/rules.d/binary-libgcc.mk
@@ -96,6 +96,10 @@ ifeq ($(DEB_TARGET_ARCH),$(findstring $(DEB_TARGET_ARCH),powerpc ppc64 ppc64el p
     header_files += $(gcc_lib_dir)/include/{altivec.h,ppc-asm.h,spe.h}
 endif
 
+ifeq ($(DEB_TARGET_ARCH),tilegx)
+    header_files += $(gcc_lib_dir)/include/feedback.h
+endif
+
 p_lgcc		= libgcc$(GCC_SONAME)$(cross_lib_arch)
 p_lgccdbg	= libgcc$(GCC_SONAME)-dbg$(cross_lib_arch)
 p_lgccdev	= libgcc-$(BASE_VERSION)-dev$(cross_lib_arch)
diff --git a/debian/rules2 b/debian/rules2
index abe987b..0f3eddc 100644
--- a/debian/rules2
+++ b/debian/rules2
@@ -559,6 +559,10 @@ ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
   CONFARGS += --disable-multilib
 endif
 
+ifneq (,$(filter tilegx,$(DEB_TARGET_GNU_CPU)))
+  CONFARGS += --disable-multilib
+endif
+
 ifeq ($(derivative),Ubuntu)
   ifneq (,$(findstring s390x-linux,$(DEB_TARGET_GNU_TYPE)))
     CONFARGS += --with-arch=zEC12

Reply to: