seccomp / libseccomp

The main libseccomp repository
GNU Lesser General Public License v2.1
791 stars 170 forks source link

Q: manually setting CFLAGS=-fvisibility=hidden does not work #403

Closed androiddeveloper-ops closed 1 year ago

androiddeveloper-ops commented 1 year ago

when I use CFLAGS=-fvisibility=hidden -fvisibility-inlines-hidden parameters in ./configure command and add this parameters to configure.ac , it does not work, why?

thesamesam commented 1 year ago

You can't generally go around passing this to random projects and expect it to work. You'll need to make sure their symbol versioning is done correctly first.

We also can't really say why if you haven't shared any errors or output.

pcmoore commented 1 year ago

We add -fvisibility=hidden to the libseccomp CFLAGS in "src/Makefile.am" with all of the API function marked with an API macro that is defined at the of "src/api.c".

Reading the GCC wiki on visibility (linked below), I don't believe we gain anything through the use of -fvisibility-inlines-hidden, but if I'm wrong about this I would appreciate a pointer/explanation.

pcmoore commented 1 year ago

I'm going to close this issue as I don't believe there is anything for us to do here beyond the comment above, but if you believe there is more to discuss please re-open this issue.