Re: Bug#708143: mips64(el) and mipsn32(el) support with multilib
YunQiang Su <[email protected]>
| Newsgroups | gmane.linux.debian.ports.mips |
|---|---|
| Message-ID | <CAKcpw6WoyL8+f6jg9huZsS3QqfHp+uhkQByqCH7oSp9CfCO_Fg@mail.gmail.com> |
On Wed, Aug 21, 2013 at 8:55 PM, Matthias Klose <[email protected]> wrote: > Am 03.08.2013 08:58, schrieb YunQiang Su: >> Hi, I refresh this patch to 4.8.1-8 >> >> On Fri, Jul 12, 2013 at 11:52 PM, YunQiang Su <[email protected]> wrote: >>> I refresh this patch with 4.8.1-6 >>> >>> This version patch add multilib support. > > fixed some chunks and removed some chunks from the patch. You removed the lib32loc chunks, while they may be needed. As there is something special for mips*: They asked to put o32 libraries to /lib, and n32 in /lib32, n64 in /lib64 if not multiarched on any platform So on mips64(el) platform, lib32 is used by n32 abi, while /lib is for o32. I have to do it like this. > > the patch was never tested on amd64. It's amd64, not x86_64. > > why are the configured_libdir changes necessary? left them out for now. same for > the changes in debian/rules.d/* It was my fault. > > please check the version in the vcs. I have read it and add some more fix. The attachment is the diff of it with the svn r6944 I am testing it on cross mips64el on amd64 amd64 native and mips64el native build. > > are there test summaries available for the current builds? > > please make sure that the changed multiarch definitions are applied upstream. > > Matthias > -- YunQiang Su
mips64el.diff
(application/octet-stream, 6.6 KB)
diff --git a/debian/control.m4 b/debian/control.m4
index c7d5bd6..6b3ef0e 100644
--- a/debian/control.m4
+++ b/debian/control.m4
@@ -61,9 +61,7 @@ Build-Depends: debhelper (>= 5.0.62),
bison (>= 1:2.3), flex, realpath (>= 1.9.12), lsb-release, quilt
',`dnl native
Build-Depends: debhelper (>= 5.0.62), GCC_MULTILIB_BUILD_DEP
- LIBC_BUILD_DEP,
- LIBC_BIARCH_BUILD_DEP
- LIBC_DBG_DEP
+ LIBC_BUILD_DEP, LIBC_BIARCH_BUILD_DEP LIBC_DBG_DEP
kfreebsd-kernel-headers (>= 0.84) [kfreebsd-any],
AUTO_BUILD_DEP AUTOGEN_BUILD_DEP
libunwind7-dev (>= 0.98.5-6) [ia64], libatomic-ops-dev [ia64],
diff --git a/debian/rules.conf b/debian/rules.conf
index 6bda579..947fb9b 100644
--- a/debian/rules.conf
+++ b/debian/rules.conf
@@ -72,6 +72,8 @@ define gen_multilib_deps
ifeq ($$(biarchn32),yes)
ifeq ($$(biarch64),yes)
lib$1biarch$2 := $$(lib$1biarch64$2), $$(lib$1biarchn32$2)
+ else ifeq ($$(biarch32),yes)
+ lib$1biarch$2 := $$(lib$1biarch32$2), $$(lib$1biarchn32$2)
else
lib$1biarch$2 := $$(lib$1biarchn32$2)
endif
@@ -314,8 +316,8 @@ ifneq ($(DEB_CROSS),yes)
ifeq (,$(filter $(distrelease),lenny etch squeeze dapper hardy jaunty karmic lucid maverick natty oneiric))
LIBC_BUILD_DEP += , libc6-dev (>= 2.13-31) [armel armhf]
endif
- LIBC_BIARCH_BUILD_DEP = libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-sparc [sparc64], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 s390x sparc64 x32], libn32gcc1 [mips mipsel], lib64gcc1 [i386 mips mipsel powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel], libc6-dev-mipsn32 [mips mipsel],
-ifneq (,$(findstring amd64,$(biarchx32archs)))
+ LIBC_BIARCH_BUILD_DEP = libc6-dev-amd64 [i386 x32], libc6-dev-sparc64 [sparc], libc6-dev-sparc [sparc64], libc6-dev-s390 [s390x], libc6-dev-s390x [s390], libc6-dev-i386 [amd64 x32], libc6-dev-powerpc [ppc64], libc6-dev-ppc64 [powerpc], libc0.1-dev-i386 [kfreebsd-amd64], lib32gcc1 [amd64 ppc64 kfreebsd-amd64 mipsn32 mipsn32el mips64 mips64el s390x sparc64 x32], libn32gcc1 [mips mipsel mips64 mips64el], lib64gcc1 [i386 mips mipsel mipsn32 mipsn32el powerpc sparc s390 x32], libc6-dev-mips64 [mips mipsel mipsn32 mipsn32el], libc6-dev-mipsn32 [mips mipsel mips64 mips64el], libc6-dev-mips32 [mipsn32 mipsn32el mips64 mips64el],
+ ifneq (,$(findstring amd64,$(biarchx32archs)))
LIBC_BIARCH_BUILD_DEP += libc6-dev-x32 [amd64 i386], libx32gcc1 [amd64 i386],
endif
ifneq (,$(findstring armel,$(biarchhfarchs)))
@@ -599,11 +601,11 @@ ctrl_flags += \
ifeq ($(DEB_CROSS),yes)
ctrl_flags += \
- -DTARGET=$(DEB_TARGET_ARCH) \
-DLIBUNWIND_BUILD_DEP="$(LIBUNWIND_BUILD_DEP)" \
-DLIBATOMIC_OPS_BUILD_DEP="$(LIBATOMIC_OPS_BUILD_DEP)"
ifeq ($(with_deps_on_target_arch_pkgs),yes)
- ctrl_flags += -DCROSS_ARCH=$(DEB_TARGET_ARCH)
+ ctrl_flags += -DCROSS_ARCH=$(DEB_TARGET_ARCH) \
+ -DTARGET=$(DEB_TARGET_ARCH)
endif
else
# add '-DPRI=optional' to ctrl_flags if this is not the default compiler
diff --git a/debian/rules.d/binary-go.mk b/debian/rules.d/binary-go.mk
index 6f3da92..ed6a4c5 100644
--- a/debian/rules.d/binary-go.mk
+++ b/debian/rules.d/binary-go.mk
@@ -168,13 +168,12 @@ $(binary_stamp)-gccgo: $(install_stamp)
$(d)/$(gcc_lib_dir)/64/; \
fi
if [ -f $(d)/$(usr_lib32)/libgobegin.a ]; then \
- if [ -d $(d)/$(gcc_lib_dir)/32 ]; then \
mv $(d)/$(usr_lib32)/libgobegin.a \
$(d)/$(gcc_lib_dir)/32/; \
- else \
- mv $(d)/$(usr_lib32)/libgobegin.a \
+ fi
+ if [ -f $(d)/$(usr_libn32)/libgobegin.a ]; then \
+ mv $(d)/$(usr_libn32)/libgobegin.a \
$(d)/$(gcc_lib_dir)/n32/; \
- fi; \
fi
if [ -f $(d)/$(usr_libx32)/libgobegin.a ]; then \
mv $(d)/$(usr_libx32)/libgobegin.a \
diff --git a/debian/rules.d/binary-libstdcxx.mk b/debian/rules.d/binary-libstdcxx.mk
index e397326..7248880 100644
--- a/debian/rules.d/binary-libstdcxx.mk
+++ b/debian/rules.d/binary-libstdcxx.mk
@@ -236,7 +236,8 @@ define __do_libstdcxx_dbg
)
$(if $(filter yes,$(with_debug)),
- mv $(d)/$(usr_lib$(2))/debug $(d_d)/$(usr_lib$(2))/.;
+ mkdir -p $(d_d)/$(usr_lib$(2))/debug;
+ mv $(d)/$(usr_lib$(2))/debug/libstdc++* $(d_d)/$(usr_lib$(2))/debug;
rm -f $(d_d)/$(usr_lib$(2))/debug/libstdc++_pic.a
)
diff --git a/debian/rules.defs b/debian/rules.defs
index 3eccbcc..b19f262 100644
--- a/debian/rules.defs
+++ b/debian/rules.defs
@@ -1159,6 +1159,9 @@ endif
with_check := yes
# if you don't want to run the gcc testsuite, uncomment the next line
#with_check := disabled by hand
+ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
+ with_check := disabled by DEB_BUILD_OPTIONS
+endif
ifeq ($(with_base_only),yes)
with_check := no
endif
diff --git a/debian/rules2 b/debian/rules2
index 097084c..4c34ff4 100644
--- a/debian/rules2
+++ b/debian/rules2
@@ -806,7 +806,11 @@ endif
gcc_lib_dir = $(PF)/$(configured_libdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
gcc_lexec_dir = $(libexecdir)/$(gcc_subdir_name)/$(TARGET_ALIAS)/$(versiondir)
-lib32 = $(PF)/lib32
+lib32loc = lib32
+ifneq (,$(findstring mips,$(DEB_TARGET_GNU_TYPE)))
+lib32loc = lib
+endif
+lib32 = $(PF)/$(lib32loc)
lib64 = lib64
libn32 = lib32
libx32 = libx32
@@ -830,7 +834,7 @@ ifeq ($(DEB_CROSS),yes)
else
usr_lib = $(PFL)/$(libdir)
endif
-usr_lib32 = $(PFL)/lib32
+usr_lib32 = $(PFL)/$(lib32loc)
usr_libn32 = $(PFL)/lib32
usr_libx32 = $(PFL)/libx32
usr_lib64 = $(PFL)/lib64
@@ -852,7 +856,7 @@ gcc_lib_dirsf = $(gcc_lib_dir)/$(biarchsfsubdir)
libgcc_dir = $(RPF)/$(libdir)
# yes, really; lib32gcc_s ends up in usr
-libgcc_dir32 = $(PFL)/lib32
+libgcc_dir32 = $(PFL)/$(lib32loc)
libgcc_dirn32 = $(RPF)/lib32
# libx32gcc_s also ends up in usr
libgcc_dirx32 = $(PFL)/libx32
@@ -1954,6 +1958,8 @@ ifneq ($(configured_libdir),$(libdir))
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.py' '*.spec'; do \
mv $(d)/$(PF)/$(configured_libdir)/$$i \
$(d)/$(PF)/$(libdir)/. || true; \
+ mv $(d)/$(PF)/libo32/$$i \
+ $(d)/$(PF)/lib/. || true; \
done
endif
@@ -2003,7 +2009,7 @@ $(install_stamp): $(build_stamp)
rm -rf $(d)
mkdir -p $(d)/$(libdir) $(d)/$(PF) $(d)/$(PF)/$(libdir)/debug
ifeq ($(biarch32),yes)
- mkdir -p $(d)/$(PF)/lib32/debug
+ mkdir -p $(d)/$(PF)/$(lib32loc)/debug
endif
ifeq ($(biarch64),yes)
mkdir -p $(d)/$(PF)/lib64/debug
@@ -2049,6 +2055,8 @@ ifneq ($(configured_libdir),$(libdir))
for i in debug go pkgconfig '*.so' '*.so.*' '*.a' '*.la' '*.o' '*.py' '*.spec'; do \
mv $(d)/$(PF)/$(configured_libdir)/$$i \
$(d)/$(PF)/$(libdir)/. || true; \
+ mv $(d)/$(PF)/libo32/$$i \
+ $(d)/$(PF)/lib/. || true; \
done
endif