I just gave this a shot and it works quite well. In case anyone needs it, I’m sharing the required magical incantations below:
$ gcc -c myexternal.c -o myexternal.o -fPIC
$ ld -export-dynamic -shared -o myexternal.pd_linux myexternal.o -lc -lm
You’ll need the c source code and the file m_pd.h
from the pure data source code.