From: Glenn Morris <rgm@gnu.org>
Cc: Andreas Schwab <schwab@suse.de>, rms@gnu.org
Subject: Re: add etc/PROBLEMS entry for building 32-bit exe on 64-bit system
Date: Tue, 09 Jan 2007 23:14:02 -0500 [thread overview]
Message-ID: <yf7ivvselx.fsf@fencepost.gnu.org> (raw)
In-Reply-To: yvfyajk9su.fsf@fencepost.gnu.org
Actually, I don't know any more if I'm asking for a reasonable thing.
Should I expect to be able to _compile_ 32-bit apps on an x86_64
system, or just _run_ them? The fact that almost none of the OS
"devel" packages exist in 32-bit form suggests the latter.
Glenn Morris wrote:
> I imagine it's reasonable to expect configure to just Do The Right
> Thing
With some playing around, I find the following change enables me to
just use configure --build=i386-linux-gnu to get the desired result. I
don't know how correct/desirable it is though.
Index: configure.in
===================================================================
RCS file: /sources/emacs/emacs/configure.in,v
retrieving revision 1.428
diff -c -c -w -r1.428 configure.in
*** configure.in 3 Jan 2007 23:47:04 -0000 1.428
--- configure.in 10 Jan 2007 04:09:31 -0000
***************
*** 1486,1491 ****
--- 1486,1523 ----
CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
fi
+ ## Build a 32-bit version on x86_64 GNU/Linux?
+ case "${canonical}" in
+ i386-*linux-gnu* )
+ case `$SHELL "$ac_aux_dir/config.guess"` in
+ x86_64-*-linux-gnu* )
+
+ x86_64_build_m32=yes
+
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="-m32 $CFLAGS"
+ AC_MSG_CHECKING([whether compiler understands -m32])
+ AC_TRY_COMPILE([], [], has_option=yes, has_option=no,)
+ AC_MSG_RESULT($has_option)
+ if test $has_option = yes; then
+ REAL_CFLAGS="-m32 $REAL_CFLAGS"
+ fi
+ CFLAGS="$save_CFLAGS"
+ unset has_option
+ unset save_CFLAGS
+
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-m32 $LDFLAGS"
+ AC_MSG_CHECKING([whether linker understands -m32])
+ AC_LINK_IFELSE([main(){return 0;}],
+ [AC_MSG_RESULT(yes)],
+ LDFLAGS="$save_LDFLAGS"
+ [AC_MSG_RESULT(no)])
+ unset save_LDFLAGS ;;
+
+ esac ;;
+ esac
+
dnl For AC_FUNC_GETLOADAVG, at least:
AC_CONFIG_LIBOBJ_DIR(src)
***************
*** 1765,1770 ****
--- 1797,1805 ----
if test "${x_libraries}" != NONE; then
if test -n "${x_libraries}"; then
+ if test -n "${x86_64_build_m32}"; then
+ x_libraries=`echo ${x_libraries} | sed -e "s:/lib64:/lib:g"`
+ fi
LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
fi
next prev parent reply other threads:[~2007-01-10 4:14 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-09 1:44 add etc/PROBLEMS entry for building 32-bit exe on 64-bit system Glenn Morris
2007-01-09 9:58 ` Andreas Schwab
2007-01-09 21:08 ` Richard Stallman
2007-01-09 22:30 ` Andreas Schwab
2007-01-10 0:25 ` Glenn Morris
2007-01-10 4:14 ` Glenn Morris [this message]
2007-01-10 15:28 ` Stefan Monnier
2007-01-10 20:17 ` Glenn Morris
2007-01-10 20:36 ` Eli Zaretskii
2007-01-10 23:28 ` Stefan Monnier
2007-01-16 1:22 ` Glenn Morris
2007-01-16 9:58 ` Andreas Schwab
2007-01-16 14:40 ` Stefan Monnier
2007-01-10 23:05 ` Richard Stallman
2007-01-11 1:52 ` Glenn Morris
2007-01-14 23:23 ` Richard Stallman
2007-01-15 6:23 ` Giorgos Keramidas
2007-01-10 9:41 ` Andreas Schwab
2007-01-10 19:31 ` Glenn Morris
2007-01-10 20:00 ` Andreas Schwab
2007-01-10 20:14 ` Glenn Morris
2007-01-10 20:23 ` Andreas Schwab
2007-01-10 20:16 ` Stuart D. Herring
2007-01-10 20:42 ` Eli Zaretskii
2007-01-10 18:46 ` Richard Stallman
2007-01-13 2:26 ` Glenn Morris
2007-01-09 17:57 ` Richard Stallman
2007-01-15 6:21 ` Giorgos Keramidas
2007-01-15 9:54 ` Andreas Schwab
2007-01-15 20:27 ` Glenn Morris
2007-01-15 23:28 ` Richard Stallman
2007-01-15 23:33 ` Giorgos Keramidas
2007-01-19 15:36 ` Giorgos Keramidas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yf7ivvselx.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=rms@gnu.org \
--cc=schwab@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.