summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-23 14:15:11 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-23 14:15:11 +0000
commitc5207a5547426030930716fbd0de0de064c2f27b (patch)
tree687fa7cd6f34260b4f4a4de8a42f2fc698e6f489
parentf0d383b45bf6b28ab8e579d7da3288ac16cdef64 (diff)
Make PIC a config option
-rw-r--r--Rules.mak6
-rw-r--r--extra/Configs/Config.arm3
-rw-r--r--extra/Configs/Config.i3863
-rw-r--r--extra/Configs/Config.m68k3
-rw-r--r--extra/Configs/Config.m68k.coff3
-rw-r--r--extra/Configs/Config.mips3
-rw-r--r--extra/Configs/Config.mipsel3
-rw-r--r--extra/Configs/Config.powerpc3
-rw-r--r--extra/Configs/Config.sh3
-rw-r--r--extra/Configs/Config.x863
10 files changed, 32 insertions, 1 deletions
diff --git a/Rules.mak b/Rules.mak
index cb27da4dc..7b8223950 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -45,7 +45,7 @@ endif
ARFLAGS=r
-CCFLAGS=$(WARNINGS) $(OPTIMIZATION) -fPIC -fno-builtin -nostdinc $(CPUFLAGS) -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D_LIBC
+CCFLAGS=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) -I$(TOPDIR)include -I$(GCCINCDIR) -I. -D_LIBC
TARGET_CCFLAGS=--uclibc-use-build-dir $(WARNINGS) $(OPTIMIZATION) $(CPUFLAGS)
CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2)
@@ -64,6 +64,10 @@ else
LDFLAGS = -s -nostdlib -Wl,-warn-common
TARGET_LDFLAGS = --uclibc-use-build-dir -s -Wl,-warn-common
endif
+ifeq ($(strip $(DOPIC)),true)
+ CFLAGS += -fPIC -D__PIC__
+endif
+
ifndef $(PREFIX)
PREFIX = `pwd`/_install
diff --git a/extra/Configs/Config.arm b/extra/Configs/Config.arm
index a3c61d7ca..21c66bcb6 100644
--- a/extra/Configs/Config.arm
+++ b/extra/Configs/Config.arm
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386
index 92ab85b79..1876d05a0 100644
--- a/extra/Configs/Config.i386
+++ b/extra/Configs/Config.i386
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.m68k b/extra/Configs/Config.m68k
index 977394369..becad56f4 100644
--- a/extra/Configs/Config.m68k
+++ b/extra/Configs/Config.m68k
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = true
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.m68k.coff b/extra/Configs/Config.m68k.coff
index 7d779f78a..e70220a98 100644
--- a/extra/Configs/Config.m68k.coff
+++ b/extra/Configs/Config.m68k.coff
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = true
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.mips b/extra/Configs/Config.mips
index dabf40015..30778e848 100644
--- a/extra/Configs/Config.mips
+++ b/extra/Configs/Config.mips
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.mipsel b/extra/Configs/Config.mipsel
index dabf40015..30778e848 100644
--- a/extra/Configs/Config.mipsel
+++ b/extra/Configs/Config.mipsel
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.powerpc b/extra/Configs/Config.powerpc
index 54ed4c1ce..836b1dfcf 100644
--- a/extra/Configs/Config.powerpc
+++ b/extra/Configs/Config.powerpc
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.sh b/extra/Configs/Config.sh
index 6007d1cef..39736b4cf 100644
--- a/extra/Configs/Config.sh
+++ b/extra/Configs/Config.sh
@@ -153,6 +153,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib
diff --git a/extra/Configs/Config.x86 b/extra/Configs/Config.x86
index 92ab85b79..1876d05a0 100644
--- a/extra/Configs/Config.x86
+++ b/extra/Configs/Config.x86
@@ -132,6 +132,9 @@ DOLFS = false
# disabled. This is off by default.
INCLUDE_RPC = false
+# If you want to compile the library as PIC code, turn this on.
+DOPIC = false
+
# ROOT_DIR is the base directory which will be compiled into the uClibc
# runtime environment. When compiled as a shared library, the shared
# library loader will look in <ROOT_DIR>/lib and <ROOT_DIR>/usr/lib