Check for __builtin_expect is incorrect for SUN Compiler version for brotli-1.0.5 #248

Closed
opened 2026-01-29 20:40:40 +00:00 by claunia · 5 comments
Owner

Originally created by @rgh-sas on GitHub (Jul 15, 2018).

For brotli-1.0.5 ./c/common/platform.h there is a check to determine if the SUN compiler supports the intrinsic __builtin_expect. The current check is as follows:

74      BROTLI_SUNPRO_VERSION_CHECK(5, 12, 0) ||              \

This should probably be

74      BROTLI_SUNPRO_VERSION_CHECK(5, 15, 0) ||              \

Since the Oracle doc states that support for __builtin_expect isn't supported until Oracle Developer Studio 12.6. See the following supporting documentation from Oracle

https://docs.oracle.com/cd/E77782_01/html/E77792/gqexw.html

As a result of the incorrect version check, I'm unable to build brotli-1.0.5 on Solaris using Oracle Developer Studio 12.4 (Sun C 5.13)

Originally created by @rgh-sas on GitHub (Jul 15, 2018). For brotli-1.0.5 ./c/common/platform.h there is a check to determine if the SUN compiler supports the intrinsic __builtin_expect. The current check is as follows: 74 BROTLI_SUNPRO_VERSION_CHECK(5, 12, 0) || \ This should probably be 74 BROTLI_SUNPRO_VERSION_CHECK(5, 15, 0) || \ Since the Oracle doc states that support for __builtin_expect isn't supported until Oracle Developer Studio 12.6. See the following supporting documentation from Oracle https://docs.oracle.com/cd/E77782_01/html/E77792/gqexw.html As a result of the incorrect version check, I'm unable to build brotli-1.0.5 on Solaris using Oracle Developer Studio 12.4 (Sun C 5.13)
Author
Owner

@eustas commented on GitHub (Jul 16, 2018):

@nemequ I've checked, it surely seems it should be 5.15.0...

@eustas commented on GitHub (Jul 16, 2018): @nemequ I've checked, it surely seems it should be 5.15.0...
Author
Owner

@eustas commented on GitHub (Jul 16, 2018):

Will fix soon.

@eustas commented on GitHub (Jul 16, 2018): Will fix soon.
Author
Owner

@rgh-sas commented on GitHub (Jul 16, 2018):

Thanks. Much appreciated.

@rgh-sas commented on GitHub (Jul 16, 2018): Thanks. Much appreciated.
Author
Owner

@nemequ commented on GitHub (Jul 18, 2018):

Interesting. It works on Solaris Studio 12.3 on Linux. It seems that until 12.6, it was just #defined to the expression, so bumping the version to 5.15 shouldn't have any negative effects.

I guess there are some Linux-specific defines in suncc. I'll have to spin up a VM to test Hedley :(

Thanks for tagging me on this, @eustas.

@nemequ commented on GitHub (Jul 18, 2018): Interesting. It works on Solaris Studio 12.3 on Linux. It seems that until 12.6, it was just #defined to the expression, so bumping the version to 5.15 shouldn't have any negative effects. I guess there are some Linux-specific defines in suncc. I'll have to spin up a VM to test Hedley :( Thanks for tagging me on this, @eustas.
Author
Owner

@eustas commented on GitHub (Oct 19, 2018):

Ooops, this fall of my radar. Going to fix ASAP. Thanks for reporting and patience.

@eustas commented on GitHub (Oct 19, 2018): Ooops, this fall of my radar. Going to fix ASAP. Thanks for reporting and patience.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#248