From owner-freebsd-questions@FreeBSD.ORG Fri Aug 13 17:58:20 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C9CE0106564A for ; Fri, 13 Aug 2010 17:58:20 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id F04628FC13 for ; Fri, 13 Aug 2010 17:58:19 +0000 (UTC) Received: by ewy26 with SMTP id 26so1757262ewy.13 for ; Fri, 13 Aug 2010 10:58:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=xEFJOVq8neQ5C0Sw6W9gGaJhQnoq27JOg7NQVyHIyEM=; b=A+Fdzy91DTJq4Llwyg33C87aiZgx+6ClnCVNGpSsBOIEyP2yjCPkaRqC9DEX7I7S2r m95vbXzC0wa7Gk01dMdwNYoihKqUNdF72O3iMzNxKZEsIiD/TfHZL0pJlzY3zaWYIb98 HO/Ang+Se0PxcQziecnOm4I2bkp0RGet0DPdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=WXE0CA30tAcfL4ciinjsWZPdnXIyuH+5nOcLtKSIw9EqPwvqy4a2gNiEiwHPQ8eHgl 2bNt+zoDtB5diOoyx5K389ljVao6SgCXH++UyAlm4tQUbDfmLnCgOmQS+6BuM/asORj1 hBJ+643TE3VYaagbntNbOcU7wSdLpoLKwh+xo= Received: by 10.216.86.15 with SMTP id v15mr1634522wee.9.1281722298534; Fri, 13 Aug 2010 10:58:18 -0700 (PDT) Received: from localhost ([109.169.29.56]) by mx.google.com with ESMTPS id k83sm1745615weq.14.2010.08.13.10.58.15 (version=SSLv3 cipher=RC4-MD5); Fri, 13 Aug 2010 10:58:17 -0700 (PDT) From: Anonymous To: Yuri References: <4C656E8F.8090105@rawbw.com> <20100813162429.GE18896@dan.emsphone.com> <4C65852B.807@rawbw.com> Date: Fri, 13 Aug 2010 21:58:10 +0400 In-Reply-To: <4C65852B.807@rawbw.com> (yuri@rawbw.com's message of "Fri, 13 Aug 2010 10:47:23 -0700") Message-ID: <868w4av1hp.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: Documentation on how to build 32bit applications on amd64? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 17:58:20 -0000 Yuri writes: > --- output of 64 bit executable (gcc -o m m.c) --- > match: off=0 so=3 eo=4 > match: off=4 so=3 eo=4 > > --- output of 32 bit executable built on 64 bit system with flags (gcc > -B/usr/lib32 -m32 -o m m.c) --- > match: off=0 so=3 eo=0 I guess machine-dependent headers are involved. $ cc -m32 -B/usr/lib32 a.c $ ./a.out match: off=0 so=3 eo=0 $ ln -s /usr/src/sys/i386/include machine $ cc -m32 -B/usr/lib32 -isystem. a.c $ ./a.out match: off=0 so=3 eo=4 match: off=4 so=3 eo=4 Same thing is happening for mmap() http://docs.freebsd.org/cgi/mid.cgi?20100524.134955.2300883222251175323.okuno.kohji