[nflug] Building 32-bit bins under 64-bit Linux

matt donovan kitchetech at gmail.com
Fri Apr 13 10:06:21 EDT 2007


think it's march but it also depends on the configure script what it
supports I would do ./configure --help to see

On 4/12/07, Robert Wolfe <rwolfe at shatterit.com> wrote:
>
> Ken, is there a way that I can specify that on the configure command line?
>
> Ken Smith wrote:
> > On Thu, 2007-04-12 at 05:52 -0400, Robert Wolfe wrote:
> >
> >> Hi all!  I was wondering if it were possible to build 32-bit binaries
> on
> >> an x86_64 version of Linux so that the binaries generated can be run on
> >> 32-bit Linux?  And if so, HOW?
> >>
> >
> > Include "-m32" on the command line when running the compiler.
> > Demonstration set of commands on a machine named nickelback:
> >
> > nickelback 78 % cat hello.c
> > #include <stdio.h>
> >
> > int
> > main(int argc, char *argv[])
> > {
> >         printf("Hello World!\n");
> > }
> > nickelback 79 % uname -p
> > x86_64
> > nickelback 80 % cc -O hello.c -o hello
> > nickelback 81 % file hello
> > hello: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for
> GNU/Linux 2.4.0, dynamically linked (uses shared libs), not stripped
> > nickelback 82 % cc -m32 -O hello.c -o hello
> > nickelback 83 % file hello
> > hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for
> GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
> > nickelback 84 %
> >
> >
>
>
> --
> Robert Wolfe (MCP/Linux+) <rwolfe at shatterit.com>
> Shatter I.T. Global Services, Buffalo, NY
> http://www.shatterit.com
>
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.nflug.org/pipermail/nflug/attachments/20070525/3d07b3a2/attachment.html
-------------- next part --------------
_______________________________________________
nflug mailing list
nflug at nflug.org
http://www.nflug.org/mailman/listinfo/nflug


More information about the nflug mailing list