From df535034341a4080b80a4fd27fe337f446f2a904 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 6 Aug 2008 22:10:20 +0000 Subject: [PATCH] add a variable that contains the proper architecture-dependent -fPIC/-fpic cflag for building shared libraries git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12224 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- rules.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rules.mk b/rules.mk index 5a54c536d9..6b081bba55 100644 --- a/rules.mk +++ b/rules.mk @@ -39,6 +39,12 @@ SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) OPTIMIZE_FOR_CPU=$(ARCH) +ifeq ($(ARCH),powerpc) + FPIC:=-fPIC +else + FPIC:=-fpic +endif + DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl) BIN_DIR:=$(TOPDIR)/bin INCLUDE_DIR:=$(TOPDIR)/include