[flac-dev] [PATCH] Add configure check for bswap16

Martijn van Beurden mvanb1 at gmail.com
Tue Nov 11 11:21:14 PST 2014


Op 04-11-14 om 21:06 schreef Ralph Giles:
> The gcc version #ifdef fix for bswap16 doesn't work for Apple's clang.
> Here's a better fix, which has configure check for it directly.
>
> Fixes build failures on MacOS X.

I now get an error when compiling on Raspbian (GCC 4.6)

>   CC     metadata_object.o
>   CC     md5.o
>   CCLD   test_libFLAC
> endswap.o: In function `test_endswap':
> endswap.c:(.text+0x2c): undefined reference to `__builtin_bswap16'
> endswap.c:(.text+0x40): undefined reference to `__builtin_bswap16'
> endswap.c:(.text+0x44): undefined reference to `__builtin_bswap16'
> endswap.c:(.text+0x58): undefined reference to `__builtin_bswap16'
> endswap.c:(.text+0x5c): undefined reference to `__builtin_bswap16'
> endswap.o:endswap.c:(.text+0xa0): more undefined references to 
> `__builtin_bswap16' follow
> collect2: ld returned 1 exit status
> Makefile:371: recipe for target 'test_libFLAC' failed



More information about the flac-dev mailing list