Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcc-4.0.x does not have __sync_synchronize() to be used for XFENCE #8163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mpsuzuki
Copy link
Contributor

@mpsuzuki mpsuzuki commented Nov 8, 2024

wc_port.h expects __sync_synchronize() in gcc-4.x, but it was introduced since gcc-4.1.0.

Please find the end of gcc/builtins.def in gcc-4.0 branch and gcc-4.1.0 (sorry, the changeset between gcc-4.0.4 and gcc-4.1.0 is too huge for github.com's comparison feature to display well).

gcc-4.0.x gcc/builtins.def
image

gcc-4.1.0 gcc/builtins.def
image

It would be safer to deal gcc-4.0 as gcc-3.x or older one.

Description

To build wolfSSL by ancient gcc on ancient platform, the C preprocessor-based function availability classification is improved.

Testing

Building wolfSSL with gcc-4.0.0 (on FreeBSD 5.5) finishes. Without this modification, the built libwolfssl.so would have an unresolvable reference to __sync_synchronize(), and it makes the linking of wolfcrypt/benchmark/benchmark failed as

src/.libs/libwolfssl.so: undefined reference to `__sync_synchronize'

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@wolfSSL-Bot
Copy link

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants