Re: Use -fvisibility=hidden for shared libraries
От | Peter Eisentraut |
---|---|
Тема | Re: Use -fvisibility=hidden for shared libraries |
Дата | |
Msg-id | 5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Use -fvisibility=hidden for shared libraries (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Use -fvisibility=hidden for shared libraries
|
Список | pgsql-hackers |
On 11.01.22 03:53, Andres Freund wrote: > Ugh. In the case of worker_spi it's because -fvisibility=hidden isn't applied > to worker_spi.c at all. Which in turn is because Makefile.shlib isn't used at > all for MODULES= style modules just for MODULE_big= ones :(. > > Once that's "fixed" it fails as expected... > > I'm not sure what the best way to deal with this is. Just now I copied the > logic from Makefile.shlib to pgxs.mk (by the existing CFLAGS_SL use), but that > doesn't scale - there's other direct uses of CFLAGS_SL. > > Perhaps the best way would be to add the -fvisibility=hidden to CFLAGS_SL, and > work around the explicit exports issue in Makefile.shlib by adding an explicit > -fvisibility=default? Or perhaps CFLAGS_SL The easiest solution would be to change worker_spi's Makefile to use MODULE_big. There are already many cases where MODULE_big is used instead of MODULES for seemingly random reasons, so I wouldn't worry too much about it here if it helps you move forward.
В списке pgsql-hackers по дате отправления: