XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
XXFLAGS_NOPIC:=$(XXFLAGS)
ifeq ($(DOPIC),y)
- XXFLAGS += $(PICFLAG)
+ XXFLAGS += $(PICFLAG) -D__LIBDL_SHARED__
endif
ifeq ($(strip $(SUPPORT_LD_DEBUG)),y)
XXFLAGS+=-D__SUPPORT_LD_DEBUG__
void _dlinfo(void);
-#ifdef __PIC__
+#if defined (__LIBDL_SHARED__)
/* This is a real hack. We need access to the dynamic linker, but we
also need to make it possible to link against this library without any
unresolved externals. We provide these weak symbols to make the link
extern int _dl_debug_file __attribute__ ((__weak__, __alias__ ("foobar1")));
#endif
-#else /* __PIC__ */
+#else /* __LIBDL_SHARED__ */
#ifdef __SUPPORT_LD_DEBUG__
char *_dl_debug = 0;
_dlinfo();
#endif
-#ifdef __PIC__
+#if defined (__LIBDL_SHARED__)
/* Find the last library so we can run things in the right order */
for (tpnt = dyn_chain->dyn; tpnt->next!=NULL; tpnt = tpnt->next)
;