From a56073a28beba540347846a193d25fd61584c2af Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 11 Dec 2004 12:23:37 +0000 Subject: Partial commit of a patch from Alexandre Oliva: Here's an updated version of the patch I posted about a month ago. It leaves -nostdinc alone, and uses -print-file-name=include instead of -print-search-dirs to figure out where GCC's internal headers are. Please let me know whether there are any portions of this patch you'd like me to break into smaller pieces, to rework, or to give up trying to get into uClibc :-) Thanks, --- ldso/ldso/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ldso/ldso/Makefile') diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index f58c3e857..2d2abeeb6 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -39,7 +39,13 @@ XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ # BEWARE!!! At least mips* will die if -O0 is used!!! XXFLAGS :=$(XXFLAGS:-O0=-O1) -XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp") +ifeq ($(PIEFLAG),) +PIEFLAG=-fPIC +endif + +XXFLAGS+=$(PIEFLAG) + +XXFLAGS+=-isystem $(shell $(CC) -print-file-name=include) LDFLAGS=$(CPU_LDFLAGS-y) -z now -Bsymbolic -shared --warn-common --export-dynamic --sort-common \ -z combreloc --discard-locals --discard-all --no-undefined -- cgit v1.2.3