Date: Wed, 24 Aug 2011 13:57:02 +0100 From: Tom Evans <tevans.uk@googlemail.com> To: Michael Hoffmann <benzene@arcor.de> Cc: freebsd-stable@freebsd.org Subject: Re: -m32 on freeBSD 8.2r amd64 Message-ID: <CAFHbX1Lj7MgUJyofapUEZmCjXji0i4joAGAsKFoz7-eHOwkibA@mail.gmail.com> In-Reply-To: <201108241311.11319.benzene@arcor.de> References: <201103092015.p29KFd0U077849@dave.dignus.com> <1314084403216-4725801.post@n5.nabble.com> <CAAtReC=NhQq2A7bwgo_H8tN23_x3xxS3ADFnHnpjfmU=27TdSQ@mail.gmail.com> <201108241311.11319.benzene@arcor.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 24, 2011 at 12:11 PM, Michael Hoffmann <benzene@arcor.de> wrote: > Maybe off topic? > > 1: echo "int main(void) { return 0; }" > t.c > > 2: setenv LDEMULATION elf_i386_fbsd > > 3: gcc -c -m32 -o t.o t.c > > 4: gcc -nostartfiles -o a.out > t.o -L/usr/lib32 /usr/lib32/crt1.o /usr/lib32/crti.o > > 5: file a.out > a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), > dynamically linked (uses shared libs), for FreeBSD 8.2, not stripped > > 6: uname -m > amd64 > > 2: q.v. info binutils -> Selecting The Target System > > Maybe there is a more comfortable way. > Michael > You don't need to go to all that effort: $ uname -m amd64 $ echo "int main(void) { return 0; }" > t.c $ gcc -c -m32 -o t.o t.c $ gcc -m32 -o t t.o -B/usr/lib32 $ file t t: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 8.2 (802510), not stripped Cheers Tom
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFHbX1Lj7MgUJyofapUEZmCjXji0i4joAGAsKFoz7-eHOwkibA>