The problem come from the p_gcc var in case og cross compiling, see in debian/rules2:
ifndef DEB_CROSS p_base = gcc$(pkg_ver)-base p_gcc = gcc$(pkg_ver) p_cpp = cpp$(pkg_ver) p_cppd = cpp$(pkg_ver)-doc p_cxx = g++$(pkg_ver) p_doc = gcc$(pkg_ver)-doc p_lgcc = libgcc$(GCC_SONAME) else # only triggered if DEB_CROSS_INDEPENDENT set p_base = gcc$(pkg_ver)$(cross_bin_arch)-base p_cpp = cpp$(pkg_ver)$(cross_bin_arch) p_gcc = gcc$(pkg_ver)$(cross_bin_arch) p_cxx = g++$(pkg_ver)$(cross_bin_arch) endif
Have to modify variable $(cross_bin_arch), then in debian/rules.defs
ifdef DEB_CROSS cross_bin_arch := -$(TARGET_ALIAS) cross_lib_arch := -$(DEB_TARGET_ARCH)-cross endif
For a first test I've just added two others tr on cross_bin_arch and cross_lib_arch, if works will at least modify consequently TARGET_ALIAS ifdef DEB_CROSS.
The problem come from the p_gcc var in case og cross compiling, see in debian/rules2:
ifndef DEB_CROSS INDEPENDENT set ver)$(cross_ bin_arch) -base ver)$(cross_ bin_arch) ver)$(cross_ bin_arch) ver)$(cross_ bin_arch)
p_base = gcc$(pkg_ver)-base
p_gcc = gcc$(pkg_ver)
p_cpp = cpp$(pkg_ver)
p_cppd = cpp$(pkg_ver)-doc
p_cxx = g++$(pkg_ver)
p_doc = gcc$(pkg_ver)-doc
p_lgcc = libgcc$(GCC_SONAME)
else
# only triggered if DEB_CROSS_
p_base = gcc$(pkg_
p_cpp = cpp$(pkg_
p_gcc = gcc$(pkg_
p_cxx = g++$(pkg_
endif
Have to modify variable $(cross_bin_arch), then in debian/rules.defs
ifdef DEB_CROSS TARGET_ ARCH)-cross
cross_bin_arch := -$(TARGET_ALIAS)
cross_lib_arch := -$(DEB_
endif
For a first test I've just added two others tr on cross_bin_arch and cross_lib_arch, if works will at least modify consequently TARGET_ALIAS ifdef DEB_CROSS.