Source: libtool
Version: 2.4.2-1.1
Severity: wishlist
User: [email protected]
Usertags: port-x32 ftbfs-x32
Here's a patch which backports a couple items for x32 support from upstream
git. The first chunk, of course, distinguishes between i386 and x32 when it
sees 32-bit output on x86_64-linux-gnu. The second chunk handles "undefined"
output from getconf ARG_MAX, which is the output on x32 when there's no stack
limit (which happens, for example, for commands run from a makefile, and in
particular, for configure scripts run from debian/rules).
It would be nice to have this included in the mainline Debian package, so it
gets included when maintainers run autoreconf locally. (My x32 bootstrapping
autobuilder already has custom libtool packages with this change included, so
if a package build itself runs autoreconf, then it's good.)
--
Daniel Schepler
Index: libtool-2.4.2/libltdl/m4/libtool.m4
===================================================================
--- libtool-2.4.2.orig/libltdl/m4/libtool.m4 2012-11-03 15:44:29.000000000 +0000
+++ libtool-2.4.2/libltdl/m4/libtool.m4 2012-11-03 15:50:42.000000000 +0000
@@ -1324,7 +1324,14 @@
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
;;
ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
@@ -1688,7 +1695,8 @@
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else