Tags: patch
Hello,
In Ubuntu is a patch to fix multiarch already. I'm attaching it. Please
consider apply it.
--
Pozdrawiam / Kind regards,
Artur Rona
diff -u ghdl-0.29+gcc4.3.4+dfsg/debian/rules
ghdl-0.29+gcc4.3.4+dfsg/debian/rules
--- ghdl-0.29+gcc4.3.4+dfsg/debian/rules
+++ ghdl-0.29+gcc4.3.4+dfsg/debian/rules
@@ -31,19 +31,19 @@
touch setup-stamp
configure: configure-stamp
-configure-stamp: setup
+configure-stamp: setup-stamp
dh_testdir
(cd gcc/build && CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="" LDFLAGS=""
FFLAGS="" CXXFLAGS="" ../configure $(GCC_CONFIGURE_OPTS))
touch configure-stamp
build: build-stamp
-build-stamp: configure
+build-stamp: configure-stamp
dh_testdir
CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="" LDFLAGS="" FFLAGS=""
CXXFLAGS="" $(MAKE) -C gcc/build
touch build-stamp
install: install-stamp
-install-stamp: build
+install-stamp: build-stamp
dh_testdir
dh_testroot
dh_prep
diff -u ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/Makefile.in
ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/Makefile.in
--- ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/Makefile.in
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/Makefile.in
@@ -281,6 +281,8 @@
GMPLIBS = @GMPLIBS@
GMPINC = @GMPINC@
+with_float = @with_float@
+
CPPLIB = ../libcpp/libcpp.a
CPPINC = -I$(srcdir)/../libcpp/include
@@ -1667,10 +1669,11 @@
"$(MULTILIB_EXTRA_OPTS)" \
"$(MULTILIB_EXCLUSIONS)" \
"$(MULTILIB_OSDIRNAMES)" \
+ "$(MULTIARCH_DIRNAME)" \
"@enable_multilib@" \
> tmp-mlib.h; \
else \
- $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' no \
+ $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' ''
"$(MULTIARCH_DIRNAME)" no \
> tmp-mlib.h; \
fi
$(SHELL) $(srcdir)/../move-if-change tmp-mlib.h multilib.h
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/common.opt
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/common.opt
@@ -1275,6 +1275,10 @@
Common JoinedOrMissing Negative(gcoff)
Generate debug information in extended XCOFF format
+imultiarch
+Common Joined Separate RejectDriver Var(imultiarch) Init(0)
+-imultiarch <dir> Set <dir> to be the multiarch include subdirectory
+
o
Common Joined Separate
-o <file> Place output into <file>
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/c-incpath.c
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/c-incpath.c
@@ -148,8 +148,14 @@
if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
{
char *str = concat (iprefix, p->fname + len, NULL);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ if (!imultiarch)
+ continue;
+ str = concat (str, dir_separator_str, imultiarch, NULL);
+ }
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
@@ -193,8 +199,14 @@
else
str = update_path (p->fname, p->component);
- if (p->multilib && imultilib)
+ if (p->multilib == 1 && imultilib)
str = concat (str, dir_separator_str, imultilib, NULL);
+ else if (p->multilib == 2)
+ {
+ if (!imultiarch)
+ continue;
+ str = concat (str, dir_separator_str, imultiarch, NULL);
+ }
add_path (str, SYSTEM, p->cxx_aware, false);
}
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/cppdefault.h
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/cppdefault.h
@@ -43,9 +43,11 @@
C++. */
const char add_sysroot; /* FNAME should be prefixed by
cpp_SYSROOT. */
- const char multilib; /* FNAME should have the multilib path
- specified with -imultilib
- appended. */
+ const char multilib; /* FNAME should have appended
+ - the multilib path specified with -imultilib
+ when 1 is passed,
+ - the multiarch path specified with
+ -imultiarch, when 2 is passed. */
};
extern const struct default_include cpp_include_defaults[];
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/genmultilib
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/genmultilib
@@ -73,6 +73,8 @@
# the os directory names are used exclusively. Use the mapping when
# there is no one-to-one equivalence between GCC levels and the OS.
+# The optional eight argument is the multiarch name.
+
# The last option should be "yes" if multilibs are enabled. If it is not
# "yes", all GCC multilib dir names will be ".".
@@ -121,7 +123,8 @@
extra=$5
exclusions=$6
osdirnames=$7
-enable_multilib=$8
+multiarch=$8
+enable_multilib=$9
echo "static const char *const multilib_raw[] = {"
@@ -222,6 +225,9 @@
# names.
toosdirnames=
defaultosdirname=
+if [ -n "${multiarch}" ]; then
+ defaultosdirname=:.:${multiarch}
+fi
if [ -n "${osdirnames}" ]; then
set x ${osdirnames}
shift
@@ -229,6 +235,9 @@
case "$1" in
.=*)
defaultosdirname=`echo $1 | sed 's|^.=|:|'`
+ if [ -n "${multiarch}" ]; then
+ defaultosdirname=${defaultosdirname}:${multiarch}
+ fi
shift
;;
*=*)
@@ -314,13 +323,13 @@
dirout=`echo ${combo} | sed -e 's/=/-/g'`
fi
# Remove the leading and trailing slashes.
- dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/$||g'`
+ dirout=`echo ${dirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
# Use the OS directory names rather than the option names.
if [ -n "${toosdirnames}" ]; then
osdirout=`echo ${combo} | sed ${toosdirnames}`
# Remove the leading and trailing slashes.
- osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/$||g'`
+ osdirout=`echo ${osdirout} | sed -e 's|^/||' -e 's|/*:/*|:|' -e 's|/$||g'`
if [ "x${enable_multilib}" != xyes ]; then
dirout=".:${osdirout}"
disable_multilib=yes
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/gcc.c
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/gcc.c
@@ -160,6 +160,11 @@
static int print_multi_os_directory;
+/* Flag saying to print the relative path we'd use to
+ find multiarch libraries given the current compiler flags. */
+
+static int print_multiarch;
+
/* Flag saying to print the list of subdirectories and
compiler flags used to select them in a standard form. */
@@ -1149,6 +1154,7 @@
{"--print-multi-lib", "-print-multi-lib", 0},
{"--print-multi-directory", "-print-multi-directory", 0},
{"--print-multi-os-directory", "-print-multi-os-directory", 0},
+ {"--print-multiarch", "-print-multiarch", 0},
{"--print-prog-name", "-print-prog-name=", "aj"},
{"--print-sysroot-headers-suffix", "-print-sysroot-headers-suffix", 0},
{"--profile", "-p", 0},
@@ -1538,6 +1544,11 @@
set_multilib_dir based on the compilation options. */
static const char *multilib_os_dir;
+
+/* Subdirectory to use for locating libraries in multiarch conventions. Set by
+ set_multilib_dir based on the compilation options. */
+
+static const char *multiarch_dir;
/* Structure to keep track of the specs that have been defined so far.
These are accessed using %(specname) or %[specname] in a compiler
@@ -2434,6 +2445,7 @@
struct prefix_list *pl;
const char *multi_dir = NULL;
const char *multi_os_dir = NULL;
+ const char *multiarch_suffix = NULL;
const char *multi_suffix;
const char *just_multi_suffix;
char *path = NULL;
@@ -2451,11 +2463,14 @@
}
if (do_multi && multilib_os_dir && strcmp (multilib_os_dir, ".") != 0)
multi_os_dir = concat (multilib_os_dir, dir_separator_str, NULL);
+ if (multiarch_dir)
+ multiarch_suffix = concat (multiarch_dir, dir_separator_str, NULL);
while (1)
{
size_t multi_dir_len = 0;
size_t multi_os_dir_len = 0;
+ size_t multiarch_len = 0;
size_t suffix_len;
size_t just_suffix_len;
size_t len;
@@ -2464,16 +2479,15 @@
multi_dir_len = strlen (multi_dir);
if (multi_os_dir)
multi_os_dir_len = strlen (multi_os_dir);
+ if (multiarch_suffix)
+ multiarch_len = strlen (multiarch_suffix);
suffix_len = strlen (multi_suffix);
just_suffix_len = strlen (just_multi_suffix);
if (path == NULL)
{
len = paths->max_len + extra_space + 1;
- if (suffix_len > multi_os_dir_len)
- len += suffix_len;
- else
- len += multi_os_dir_len;
+ len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
path = XNEWVEC (char, len);
}
@@ -2502,6 +2516,16 @@
break;
}
+ /* Now try the multiarch path. */
+ if (!skip_multi_dir
+ && !pl->require_machine_suffix && multiarch_dir)
+ {
+ memcpy (path + len, multiarch_suffix, multiarch_len + 1);
+ ret = callback (path, callback_info);
+ if (ret)
+ break;
+ }
+
/* Now try the base path. */
if (!pl->require_machine_suffix
&& !(pl->os_multilib ? skip_multi_os_dir : skip_multi_dir))
@@ -3670,6 +3694,8 @@
print_multi_directory = 1;
else if (! strcmp (argv[i], "-print-multi-os-directory"))
print_multi_os_directory = 1;
+ else if (! strcmp (argv[i], "-print-multiarch"))
+ print_multiarch = 1;
else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
print_sysroot_headers_suffix = 1;
else if (! strncmp (argv[i], "-Wa,", 4))
@@ -4101,6 +4127,8 @@
;
else if (! strcmp (argv[i], "-print-multi-os-directory"))
;
+ else if (! strcmp (argv[i], "-print-multiarch"))
+ ;
else if (! strcmp (argv[i], "-print-sysroot-headers-suffix"))
;
else if (! strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")))
@@ -4963,6 +4991,15 @@
do_spec_1 (" ", 0, NULL);
}
+ if (multiarch_dir)
+ {
+ do_spec_1 ("-imultiarch", 1, NULL);
+ /* Make this a separate argument. */
+ do_spec_1 (" ", 0, NULL);
+ do_spec_1 (multiarch_dir, 1, NULL);
+ do_spec_1 (" ", 0, NULL);
+ }
+
if (gcc_exec_prefix)
{
do_spec_1 ("-iprefix", 1, NULL);
@@ -6464,6 +6501,15 @@
return (0);
}
+ if (print_multiarch)
+ {
+ if (multiarch_dir == NULL)
+ printf ("\n");
+ else
+ printf ("%s\n", multiarch_dir);
+ return (0);
+ }
+
if (print_sysroot_headers_suffix)
{
if (*sysroot_hdrs_suffix_spec)
@@ -7442,10 +7488,26 @@
q++;
if (q < end)
{
- char *new_multilib_os_dir = XNEWVEC (char, end - q);
+ const char *q2 = q + 1;
+ char *new_multilib_os_dir;
+
+ while (q2 < end && *q2 != ':')
+ q2++;
+ if (*q2 == ':')
+ end = q2;
+ new_multilib_os_dir = XNEWVEC (char, end - q);
memcpy (new_multilib_os_dir, q + 1, end - q - 1);
new_multilib_os_dir[end - q - 1] = '\0';
multilib_os_dir = new_multilib_os_dir;
+
+ end = this_path + this_path_len;
+ if (q2 < end && *q2 == ':')
+ {
+ char *new_multiarch_dir = XNEWVEC (char, end - q2);
+ memcpy (new_multiarch_dir, q2 + 1, end - q2 - 1);
+ new_multiarch_dir[end - q2 - 1] = '\0';
+ multiarch_dir = new_multiarch_dir;
+ }
break;
}
}
@@ -7507,7 +7569,7 @@
/* When --disable-multilib was used but target defines
MULTILIB_OSDIRNAMES, entries starting with .: are there just
to find multilib_os_dir, so skip them from output. */
- if (this_path[0] == '.' && this_path[1] == ':')
+ if (this_path[0] == '.' && this_path[1] == ':' && this_path[2] != '.' &&
this_path[3] != ':')
skip = 1;
/* Check for matches with the multilib_exclusions. We don't bother
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/configure.ac
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/configure.ac
@@ -582,6 +582,9 @@
[], [enable_multilib=yes])
AC_SUBST(enable_multilib)
+# needed for ARM multiarch name
+AC_SUBST(with_float)
+
# Enable __cxa_atexit for C++.
AC_ARG_ENABLE(__cxa_atexit,
[ --enable-__cxa_atexit enable __cxa_atexit for C++],
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/cppdefault.c
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/cppdefault.c
@@ -60,6 +60,7 @@
#endif
#ifdef LOCAL_INCLUDE_DIR
/* /usr/local/include comes before the fixincluded header files. */
+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },
{ LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
#endif
#ifdef PREFIX_INCLUDE_DIR
@@ -95,6 +96,7 @@
#endif
#ifdef STANDARD_INCLUDE_DIR
/* /usr/include comes dead last. */
+ { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 2 },
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1, 0 },
#endif
{ 0, 0, 0, 0, 0, 0 }
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config.gcc
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config.gcc
@@ -1178,10 +1178,14 @@
esac
else
tm_file="${tm_file} i386/linux.h"
+ tmake_file="${tmake_file} i386/t-linux"
fi
;;
i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h
knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
- i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h
kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
+ i[34567]86-*-kfreebsd*-gnu)
+ tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h
i386/kfreebsd-gnu.h"
+ tmake_file="${tmake_file} i386/t-kfreebsd"
+ ;;
esac
tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm
t-dfprules"
;;
@@ -1981,6 +1985,7 @@
;;
*)
tm_file="${tm_file} rs6000/linux.h"
+ tmake_file="$tmake_file rs6000/t-linux"
;;
esac
tmake_file="${tmake_file} rs6000/t-fprules-softfp soft-fp/t-softfp"
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/s390/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/s390/t-linux
@@ -1,3 +1,5 @@
# Override t-slibgcc-elf-ver to export some libgcc symbols with
# the symbol versions that glibc used.
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
$(srcdir)/config/s390/libgcc-glibc.ver
+
+MULTIARCH_DIRNAME = s390-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/s390/t-linux64
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/s390/t-linux64
@@ -1,6 +1,7 @@
MULTILIB_OPTIONS = m64/m31
MULTILIB_DIRNAMES = 64 32
MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64:s390x-linux-gnu ../lib:s390-linux-gnu
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/pa/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/pa/t-linux
@@ -16,3 +16,5 @@
# Compile crtbeginS.o and crtendS.o as PIC.
CRTSTUFF_T_CFLAGS_S = -fPIC
+
+MULTIARCH_DIRNAME = hppa-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/rs6000/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/rs6000/t-linux
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = powerpc-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/rs6000/t-spe
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/rs6000/t-spe
@@ -66,3 +66,5 @@
mabi=altivec/mlittle \
maltivec/mlittle \
maltivec/mabi=altivec/mlittle
+
+MULTILIB_OSDIRNAMES = powerpc-linux-gnuspe:powerpc-linux-gnuspe
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/rs6000/t-linux64
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/rs6000/t-linux64
@@ -19,7 +19,7 @@
MULTILIB_EXTRA_OPTS = fPIC mstrict-align
MULTILIB_EXCEPTIONS = m64/msoft-float
MULTILIB_EXCLUSIONS = m64/!m32/msoft-float
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo
$(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib) nof
+MULTILIB_OSDIRNAMES = ../lib64:powerpc64-linux-gnu $(if $(wildcard $(shell
echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib):powerpc-linux-gnu
nof
MULTILIB_MATCHES = $(MULTILIB_MATCHES_FLOAT)
softfp_wrap_start := '\#ifndef __powerpc64__'
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/mips/t-linux64
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/mips/t-linux64
@@ -1,6 +1,10 @@
MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
MULTILIB_DIRNAMES = n32 32 64
-MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
+MIPS_EL = $(if $(filter %el, $(firstword $(subst -, ,$(target)))),el)
+MULTILIB_OSDIRNAMES = \
+ ../lib32:mips64$(MIPS_EL)-linux-gnuabin32 \
+ ../lib:mips$(MIPS_EL)-linux-gnu \
+ ../lib64:mips64$(MIPS_EL)-linux-gnuabi64
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/sparc/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/sparc/t-linux
@@ -3,3 +3,5 @@
# Avoid the t-linux version file.
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
$(srcdir)/config/sparc/libgcc-sparc-glibc.ver
+
+MULTIARCH_DIRNAME = sparc-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/sparc/t-linux64
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/sparc/t-linux64
@@ -1,6 +1,6 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 ../lib
+MULTILIB_OSDIRNAMES = ../lib64:sparc64-linux-gnu ../lib:sparc-linux-gnu
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/sh/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/sh/t-linux
@@ -7,3 +7,5 @@
MULTILIB_EXCEPTIONS=
EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+
+MULTILIB_OSDIRNAMES = sh4-linux-gnu:sh4-linux-gnu
sh4_nofpu-linux-gnu:sh4-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/ia64/t-glibc
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/ia64/t-glibc
@@ -1,3 +1,7 @@
# Use system libunwind library on IA-64 GLIBC based system.
LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
$(srcdir)/unwind-compat.c
+
+ifneq (,$(findstring linux, $(target)))
+MULTIARCH_DIRNAME = ia64-linux-gnu
+endif
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/alpha/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/alpha/t-linux
@@ -1 +1,3 @@
SHLIB_MAPFILES += $(srcdir)/config/alpha/libgcc-alpha-ldbl.ver
+
+MULTIARCH_DIRNAME = alpha-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/arm/t-linux-eabi
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/arm/t-linux-eabi
@@ -1,6 +1,8 @@
# These functions are included in shared libraries.
TARGET_LIBGCC2_CFLAGS = -fPIC
+MULTIARCH_DIRNAME = arm-linux-gnueabi$(if $(filter hard,$(with_float)),hf)
+
# We do not build a Thumb multilib for Linux because the definition of
# CLEAR_INSN_CACHE in linux-gas.h does not work in Thumb mode.
MULTILIB_OPTIONS =
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/i386/t-linux
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/i386/t-linux
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = i386-linux-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/i386/t-gnu
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/i386/t-gnu
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = i386-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/i386/t-kfreebsd
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/i386/t-kfreebsd
@@ -0,0 +1 @@
+MULTIARCH_DIRNAME = i386-kfreebsd-gnu
only in patch2:
unchanged:
--- ghdl-0.29+gcc4.3.4+dfsg.orig/gcc/gcc/config/i386/t-linux64
+++ ghdl-0.29+gcc4.3.4+dfsg/gcc/gcc/config/i386/t-linux64
@@ -13,7 +13,11 @@
MULTILIB_OPTIONS = m64/m32
MULTILIB_DIRNAMES = 64 32
-MULTILIB_OSDIRNAMES = ../lib64 $(if $(wildcard $(shell echo
$(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)
+MULTILIB_OSDIRNAMES = ../lib64:x86_64-linux-gnu $(if $(wildcard $(shell echo
$(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib):i386-linux-gnu
+
+ifneq (,$(findstring kfreebsd, $(target)))
+ MULTILIB_OSDIRNAMES := $(subst linux,kfreebsd,$(MULTILIB_OSDIRNAMES))
+endif
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib