tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

LDFLAGS and -rdynamic ?



Hi,

I was trying to update the ski package http://gnats.netbsd.org/51103
which depends on gtk and others things.  It contains a Makefile.am
file that has stuff like

if HPUX
# on HPUX libtool does not work w/ -all-static
ski_LDFLAGS=-static
else
ski_LDFLAGS=-all-static
endif

if LINUX
# Debian wants everything to be dynamically linked
ski_LDFLAGS = 
endif

I've created a patch to add -rdynamic flag for a new NetBSD case:

--- src/Makefile.am.orig        2008-02-04 23:11:38.000000000 -0500
+++ src/Makefile.am     2016-04-20 09:50:38.000000000 -0400
@@ -130,7 +130,12 @@
 ski_LDFLAGS = 
 endif
 
-ski_LDADD= libski.la -ldl
+# XXX others beside netbsd require?, rdynamic for gtk/libglade
+if NETBSD
+ski_LDFLAGS=-static -rdynamic
+endif
+
+ski_LDADD= libski.la


Without the patch, I get undefined reference errors during linking like

lcInit.c:(.text+0x49): undefined reference to `_XlcGenericLoader'
xcb_disp.c:(.text+0x1cd): undefined reference to `xcb_get_file_descriptor'
fcfreetype.c:(.text+0x2013): undefined reference to `FT_Get_PS_Font_Info'
fcfreetype.c:(.text+0x2300): undefined reference to`FT_Get_BDF_Property'

Is there a better or preferred way to handle this LDFLAGS variable?

Thanks


Home | Main Index | Thread Index | Old Index