From 9d4b81d74bc2a371a47e0e0f6376efa7cd211bb8 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Tue, 10 Aug 2004 09:23:57 +0000 Subject: Mike Frysinger writes: in libdl, the XXFLAGS is set incorrectly if DODEBUG=y ... it has 'I.' added to it instead of '-I.' ... this of course pisses of gcc :) find attached a patch that cleans up the XXFLAGS setting so as to minimize this kind of thing ... when asked, mjn3 said it was a kosher idea ;) and later writes: hmm it seems ldso also utilizes USE_CACHE in the code (but LIBRARY_CACHE never propogates down to the Makefiles) so the fix is to add $(LIBRARY_CACHE) while setting $(XXFLAGS) Applied with minor fixes and also fixed up ldso/Makefile to match libdl/Makefile. --- ldso/ldso/Makefile | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'ldso/ldso/Makefile') diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index 3c1d04530..01a26193a 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -21,20 +21,18 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so - -XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ - -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ - -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include - -ifeq ($(SUPPORT_LD_DEBUG),y) -XXFLAGS=$(XWARNINGS) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ - -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ - -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include +XXFLAGS=$(XWARNINGS) $(LIBRARY_CACHE) +ifeq ($(DODEBUG),y) # Not really much point in including debugging info, since gdb # can't really debug ldso, since gdb requires help from ldso to # debug things.... XXFLAGS+=-Os #-g3 +else +XXFLAGS+=$(OPTIMIZATION) endif +XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ + -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include # BEWARE!!! At least mips* will die if -O0 is used!!! XXFLAGS :=$(XXFLAGS:-O0=-O1) -- cgit v1.2.3