Bug 8457 - bswap(16|32|64) are undefined symbols
Summary: bswap(16|32|64) are undefined symbols
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.1 (2006.05)
Hardware: PowerPC Mac OS X (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-29 04:27 UTC by Peter Dyballa
Modified: 2007-03-10 02:55 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Dyballa 2006-09-29 04:27:19 UTC
While Building xserver module component ...

/sw/lib/odcctools/bin/ld: Undefined symbols:
_bswap16
_bswap32
_bswap64
collect2: ld returned 1 exit status
make[3]: *** [Xvfb] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Mac OS X 10.4.7, GCC 4.0.1
Comment 1 Peter Dyballa 2006-09-29 12:29:14 UTC
A C header file in Mac OS X (/usr/include/libkern/OSByteOrder.h), included via machine/endian.h has 
these #define's:

#define OSSwapConstInt16(x) ((uint16_t)((((uint16_t)(x) & 0xff00) >> 8) | (((uint16_t)(x) & 0x00ff) << 8)))
#define OSSwapConstInt32(x) ((uint32_t)((((uint32_t)(x) & 0xff000000) >> 24) | (((uint32_t)(x) & 
0x00ff0000) >> 8) | (((uint32_t)(x) & 0x0000ff00) << 8) | (((uint32_t)(x) & 0x000000ff) << 24)))
#define OSSwapConstInt64(x) ((uint64_t)((((uint64_t)(x) & 0xff00000000000000ULL) >> 56) | (((uint64_t)
(x) & 0x00ff000000000000ULL) >> 40) | (((uint64_t)(x) & 0x0000ff0000000000ULL) >> 24) | 
(((uint64_t)(x) & 0x000000ff00000000ULL) >> 8) | (((uint64_t)(x) & 0x00000000ff000000ULL) << 8) | 
(((uint64_t)(x) & 0x0000000000ff0000ULL) << 24) | (((uint64_t)(x) & 0x000000000000ff00ULL) << 40) | 
(((uint64_t)(x) & 0x00000000000000ffULL) << 56)))

Are they equivalent to the Linux bswap macros?
Comment 2 Daniel Stone 2007-02-27 01:33:45 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 George - 2007-03-10 02:55:47 UTC
Should be fixed in HEAD. Reopen if it persists.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.