Klozz / lz4

Automatically exported from code.google.com/p/lz4
0 stars 0 forks source link

provide fallback functions for builtins on older versions of gcc #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I received a failure report [1] from the CPAN testers in which __builtin_ctz 
was an undefined symbol. A bit of searching shows that was added in GCC 3.4 and 
the tester's environment had version 3.3.3. I suggest testing for the version 
of GCC and providing a fallback function if the builtin isn't available in the 
user's version.

[1] http://www.cpantesters.org/cpan/report/7b034a9c-581e-11e1-a156-f932921a7b64

Original issue reported on code.google.com by g...@cpan.org on 16 Feb 2012 at 9:02

GoogleCodeExporter commented 8 years ago
Thanks for notifying

The fallback exists, 
it can be triggered using _FORCE_SW_BITCOUNT into lz4.c :

// Uncomment this parameter if your target system does not support hardware bit 
count
//#define _FORCE_SW_BITCOUNT

Now, i guess that the problem is that this trigger is manual....

Original comment by yann.col...@gmail.com on 16 Feb 2012 at 9:34

GoogleCodeExporter commented 8 years ago

Original comment by yann.col...@gmail.com on 16 Feb 2012 at 9:47

GoogleCodeExporter commented 8 years ago
Please find in attached file a candidate version rc56.
It adds automatic detection of GCC version, in order to enable Hardware Bit 
Count only for versions 3.4 and higher.
Please don't hesitate to comment.

Original comment by yann.col...@gmail.com on 16 Feb 2012 at 9:51

Attachments:

GoogleCodeExporter commented 8 years ago
Looks good. Thanks.

Original comment by g...@cpan.org on 16 Feb 2012 at 10:04

GoogleCodeExporter commented 8 years ago
GCC version verification for Hardware Bit Count has been added to r56.

Original comment by yann.col...@gmail.com on 20 Feb 2012 at 8:54

GoogleCodeExporter commented 8 years ago
option added in r56

Original comment by yann.col...@gmail.com on 20 Feb 2012 at 8:54