summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2011-12-07 14:41:54 +0000
committerJon Medhurst <tixy@linaro.org>2011-12-07 14:41:54 +0000
commita431c9191b7aad78119c077ec7b53dd12e409317 (patch)
treeaba4444a387e5829b84fddc5295af3ef09a57e33
parent6718cac02cb356b790039cdbb22f2430860977c1 (diff)
common/tasks: Make gator module build with -fno-pic
Loading the gator module was giving the error message: "gator: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)" this can be fixed by compiling with -fno-pic. (Bug 901189) For consistency, and to avoid possible future problems, this patch also makes the gator_driver target use the same linker selection method as android_kernel_modules. Change-Id: I4178a27f8c2c33c4511bf14dbb1566761d91fc3f Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--tasks/kernel.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/tasks/kernel.mk b/tasks/kernel.mk
index c30d4df..06737d5 100644
--- a/tasks/kernel.mk
+++ b/tasks/kernel.mk
@@ -35,7 +35,9 @@ ifeq ($(TARGET_USE_GATOR),true)
KERNEL_PATH:=$(shell pwd)/kernel
gator_driver: android_kernel_modules $(INSTALLED_KERNEL_TARGET) $(ACP)
cd $(TOP)/external/gator/driver &&\
- $(MAKE) ARCH=arm CROSS_COMPILE=$(KERNEL_TOOLCHAIN) -C $(KERNEL_PATH) M=`pwd` modules
+ if [ -e $(TARGET_TOOLS_PREFIX)ld.bfd ]; then LD=$(TARGET_TOOLS_PREFIX)ld.bfd; else LD=$(TARGET_TOOLS_PREFIX)ld; fi && \
+ export PATH=../$(BUILD_OUT_EXECUTABLES):$(PATH) && \
+ $(MAKE) ARCH=arm CROSS_COMPILE=$(KERNEL_TOOLCHAIN) LD=$$LD EXTRA_CFLAGS="$(EXTRA_CFLAGS) -fno-pic" -C $(KERNEL_PATH) M=`pwd` modules
mkdir -p $(TARGET_OUT)/modules
find $(TOP)/external/gator/driver/. -name "*.ko" -exec $(ACP) -fpt {} $(TARGET_OUT)/modules/ \;
else