cvs commit: src/lib/libc/i386/net htonl.S ntohl.S
Ruslan Ermilov
ru at FreeBSD.ORG
Mon Oct 18 12:24:36 PDT 2004
On Mon, Oct 18, 2004 at 07:00:47PM +0000, David O'Brien wrote:
> On Mon, Oct 18, 2004 at 09:03:20PM +0300, Ruslan Ermilov wrote:
> > On Mon, Oct 18, 2004 at 10:45:11AM -0700, David O'Brien wrote:
> > > On Mon, Oct 18, 2004 at 08:35:16PM +0300, Ruslan Ermilov wrote:
> > > > On Mon, Oct 18, 2004 at 05:19:36PM +0000, David E. O'Brien wrote:
> > > > > obrien 2004-10-18 17:19:36 UTC
> > > > > FreeBSD src repository
> > > > > Modified files:
> > > > > lib/libc/i386/net htonl.S ntohl.S
> > > > > Log:
> > > > > Sync with sys/i386/include/endian.h: use the single instruction 'bswap'.
> ..
> > > I know. Give me some other symbol then we can publish that one should
> > > add to /etc/make.conf CFLAGS to try to build a userland for an I386.
> > > "I386_CPU" looks as good a spelling as any and I didn't see any need to
> > > spell it differently than in the kernel.
> > >
> > You can check for the CPUTYPE="i386" for ${MACHINE_ARCH} == "i386"
> > in libc/Makefile, and set I386_CPU in CFLAGS in this case.
>
> Taking
> Revision Changes Path
> 1.10 +4 -0 src/lib/libc/i386/net/htonl.S
> 1.10 +4 -0 src/lib/libc/i386/net/ntohl.S
>
> specifically what patch do you suggest that we used in cases like this
> rather than #ifdef I386_CPU". And how to use it? That is one in which
> someone checks out the source and wants to build a userland that is
> usable on an I386 machine.
>
I thought I already made it clear, seems not. In src/lib/Makefile, add
this:
.if ${MACHINE_ARCH} == "i386" && defined(CPUTYPE) && ${CPUTYPE} == "i386"
CFLAGS+= -DI386_CPU
.endif
Or maybe even add -DI386_CPU to _CPUCFLAGS globally in bsd.cpu.mk, so it
can be used anywhere. Note: this is completely untested!
Cheers,
--
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20041018/89cce820/attachment.bin
More information about the cvs-src
mailing list