Re: A tiny patch for cross-gcc 3.3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> When building packages for debian archive, libgcc from 3.3 is no longer
> needed because 3.4 provides it on most archs. However, when building
> cross compilers, libgcc1 is needed (e.g. to make deps be calculated
> correctly, to avoid build of both 3.3 and 3.4 just to get libgcc1).
>
> Here is a little patch for gcc-3.3 source package that enables
> unconditional build of libgcc1 if building cross-compiler.
>
> Please apply.
>
> Also, if for whatever reasons you will do one more sarge upload, please
> apply there too. It's a one-lined that could hardly break anything, and
> will unbreak cross-compiler building in sarge gcc 3.3 version.
A better patch to apply is attached to this message. In addition to the
above, it also should work with both old (<= 1.17) and newer dpkg-cross.
Nikita
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFBK524sTbPknTfAB4RAs9OAJ98hNDxbbaEyjngWdjxTeEntPlgSgCfY1pg
udgdivuGDJESbMuHrWHYKFc=
=GrSA
-----END PGP SIGNATURE-----
diff -urN gcc-3.3-3.3.4-6sarge1/debian/rules.d/binary-libgcc-cross.mk gcc-3.3-3.3.4/debian/rules.d/binary-libgcc-cross.mk
--- gcc-3.3-3.3.4-6sarge1/debian/rules.d/binary-libgcc-cross.mk 2004-08-24 22:47:11.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.d/binary-libgcc-cross.mk 2004-08-24 23:15:21.000000000 +0400
@@ -35,7 +35,7 @@
dh_installchangelogs -p$(p_lgcc)
debian/dh_rmemptydirs -p$(p_lgcc)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lgcc)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lgcc)
dh_compress -p$(p_lgcc)
dh_fixperms -p$(p_lgcc)
ifeq ($(with_shared_libgcc),yes)
@@ -80,7 +80,7 @@
dh_installchangelogs -p$(p_l64gcc)
debian/dh_rmemptydirs -p$(p_l64gcc)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_l64gcc)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_l64gcc)
dh_compress -p$(p_l64gcc)
dh_fixperms -p$(p_l64gcc)
ifeq ($(with_shared_libgcc),yes)
diff -urN gcc-3.3-3.3.4-6sarge1/debian/rules.d/binary-libstdcxx-cross.mk gcc-3.3-3.3.4/debian/rules.d/binary-libstdcxx-cross.mk
--- gcc-3.3-3.3.4-6sarge1/debian/rules.d/binary-libstdcxx-cross.mk 2004-08-24 22:47:11.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.d/binary-libstdcxx-cross.mk 2004-08-24 23:16:22.000000000 +0400
@@ -89,7 +89,7 @@
dh_installchangelogs -p$(p_lib)
debian/dh_rmemptydirs -p$(p_lib)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib)
dh_compress -p$(p_lib)
dh_fixperms -p$(p_lib)
DH_COMPAT=3 dh_makeshlibs -p$(p_lib) \
@@ -135,7 +135,7 @@
dh_installchangelogs -p$(p_lib64)
debian/dh_rmemptydirs -p$(p_lib64)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib64)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib64)
dh_compress -p$(p_lib64)
dh_fixperms -p$(p_lib64)
DH_COMPAT=3 dh_makeshlibs -p$(p_lib64) \
@@ -209,7 +209,7 @@
debian/dh_rmemptydirs -p$(p_dbg)
endif
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_dev) -p$(p_pic)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_dev) -p$(p_pic)
dh_compress -p$(p_dev) -p$(p_pic) -p$(p_dbg) -X.txt
dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg)
dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
diff -urN gcc-3.3-3.3.4-6sarge1/debian/rules.defs gcc-3.3-3.3.4/debian/rules.defs
--- gcc-3.3-3.3.4-6sarge1/debian/rules.defs 2004-08-24 22:47:11.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.defs 2004-08-24 23:12:36.000000000 +0400
@@ -435,6 +435,9 @@
#ifeq ($(with_common_libs),yes)
# with_libgcc := yes
#else
+ifdef DEB_CROSS
+ with_libgcc := yes
+else
libgcc_archs := hppa m68k
ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(libgcc_archs)))
with_libgcc := yes
@@ -442,6 +445,7 @@
with_libgcc := no
with_shared_libgcc := no
endif
+endif
#endif
# run testsuite --------------------
diff -urN gcc-3.3-3.3.4-9/debian/rules.d/binary-libgcc-cross.mk gcc-3.3-3.3.4/debian/rules.d/binary-libgcc-cross.mk
--- gcc-3.3-3.3.4-9/debian/rules.d/binary-libgcc-cross.mk 2004-08-18 22:24:49.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.d/binary-libgcc-cross.mk 2004-08-24 00:07:11.000000000 +0400
@@ -35,7 +35,7 @@
dh_installchangelogs -p$(p_lgcc)
debian/dh_rmemptydirs -p$(p_lgcc)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lgcc)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lgcc)
dh_compress -p$(p_lgcc)
dh_fixperms -p$(p_lgcc)
ifeq ($(with_shared_libgcc),yes)
@@ -80,7 +80,7 @@
dh_installchangelogs -p$(p_l64gcc)
debian/dh_rmemptydirs -p$(p_l64gcc)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_l64gcc)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_l64gcc)
dh_compress -p$(p_l64gcc)
dh_fixperms -p$(p_l64gcc)
ifeq ($(with_shared_libgcc),yes)
diff -urN gcc-3.3-3.3.4-9/debian/rules.d/binary-libstdcxx-cross.mk gcc-3.3-3.3.4/debian/rules.d/binary-libstdcxx-cross.mk
--- gcc-3.3-3.3.4-9/debian/rules.d/binary-libstdcxx-cross.mk 2004-08-18 22:24:49.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.d/binary-libstdcxx-cross.mk 2004-08-24 00:07:02.000000000 +0400
@@ -89,7 +89,7 @@
dh_installchangelogs -p$(p_lib)
debian/dh_rmemptydirs -p$(p_lib)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib)
dh_compress -p$(p_lib)
dh_fixperms -p$(p_lib)
DH_COMPAT=3 dh_makeshlibs -p$(p_lib) \
@@ -135,7 +135,7 @@
dh_installchangelogs -p$(p_lib64)
debian/dh_rmemptydirs -p$(p_lib64)
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib64)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_lib64)
dh_compress -p$(p_lib64)
dh_fixperms -p$(p_lib64)
DH_COMPAT=3 dh_makeshlibs -p$(p_lib64) \
@@ -209,7 +209,7 @@
debian/dh_rmemptydirs -p$(p_dbg)
endif
- ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_dev) -p$(p_pic)
+ PATH=/usr/share/dpkg-cross:$$PATH ARCH=$(DEB_TARGET_ARCH) MAKEFLAGS="CC=something" dh_strip -p$(p_dev) -p$(p_pic)
dh_compress -p$(p_dev) -p$(p_pic) -p$(p_dbg) -X.txt
dh_fixperms -p$(p_dev) -p$(p_pic) -p$(p_dbg)
dh_gencontrol -p$(p_dev) -p$(p_pic) -p$(p_dbg) \
diff -urN gcc-3.3-3.3.4-9/debian/rules.defs gcc-3.3-3.3.4/debian/rules.defs
--- gcc-3.3-3.3.4-9/debian/rules.defs 2004-08-18 23:42:52.000000000 +0400
+++ gcc-3.3-3.3.4/debian/rules.defs 2004-08-18 23:43:28.000000000 +0400
@@ -435,6 +435,9 @@
#ifeq ($(with_common_libs),yes)
# with_libgcc := yes
#else
+ifdef DEB_CROSS
+ with_libgcc := yes
+else
libgcc_archs := hppa m68k
ifeq ($(DEB_TARGET_ARCH), $(findstring $(DEB_TARGET_ARCH),$(libgcc_archs)))
with_libgcc := yes
@@ -442,6 +445,7 @@
with_libgcc := no
with_shared_libgcc := no
endif
+endif
#endif
# run testsuite --------------------
Reply to: