From owner-freebsd-stable@FreeBSD.ORG Wed Aug 24 12:57:04 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 213AB106564A for ; Wed, 24 Aug 2011 12:57:04 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D6A0D8FC17 for ; Wed, 24 Aug 2011 12:57:03 +0000 (UTC) Received: by vxh11 with SMTP id 11so1267770vxh.13 for ; Wed, 24 Aug 2011 05:57:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pang7Ty7wHVpqVS4bw7SMj2d24y1UDDttOrStiS1PO4=; b=utvew5/+n/YkZ8UwljfeI1CFTTC6qrYMgMQDQyNyN1MvauP9MBfcOXofYt5gaY9Syk miNck4+brWiaxEHLJYEEEy5M+llneN0NUMODviGKNgBsJNRhBIqUe0vkZBbP8uVQmJBc T4H/abUga85av7MIhkqKDx6Ig2wfg/7lhAGsk= MIME-Version: 1.0 Received: by 10.52.92.102 with SMTP id cl6mr2424027vdb.11.1314190622942; Wed, 24 Aug 2011 05:57:02 -0700 (PDT) Received: by 10.52.162.73 with HTTP; Wed, 24 Aug 2011 05:57:02 -0700 (PDT) In-Reply-To: <201108241311.11319.benzene@arcor.de> References: <201103092015.p29KFd0U077849@dave.dignus.com> <1314084403216-4725801.post@n5.nabble.com> <201108241311.11319.benzene@arcor.de> Date: Wed, 24 Aug 2011 13:57:02 +0100 Message-ID: From: Tom Evans To: Michael Hoffmann Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable@freebsd.org Subject: Re: -m32 on freeBSD 8.2r amd64 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Aug 2011 12:57:04 -0000 On Wed, Aug 24, 2011 at 12:11 PM, Michael Hoffmann 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