Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2007 17:05:35 -0400
From:      "Josh Carroll" <josh.carroll@gmail.com>
To:        "Aryeh M. Friedman" <aryeh.friedman@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: forcing compilation/run time linking of lib32 on amd64
Message-ID:  <8cb6106e0710241405i36c99fd6yfd3661980cafb29b@mail.gmail.com>
In-Reply-To: <471FAFD4.5090500@gmail.com>
References:  <471FAFD4.5090500@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> I am writing some demo code (for teaching C) and need to have the same
> program run on a 32 bit machine and a 64 bit machine (showing that int's
> are always word length)... I have 8-current amd64 how do I force it to
> compile with 32 bit words?

Add the following to your gcc command line:

-m32 -B/usr/lib32 -L/usr/lib32

Regards,
Josh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8cb6106e0710241405i36c99fd6yfd3661980cafb29b>