From c5207a5547426030930716fbd0de0de064c2f27b Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 23 Jun 2001 14:15:11 +0000 Subject: Make PIC a config option --- Rules.mak | 6 +++++- extra/Configs/Config.arm | 3 +++ extra/Configs/Config.i386 | 3 +++ extra/Configs/Config.m68k | 3 +++ extra/Configs/Config.m68k.coff | 3 +++ extra/Configs/Config.mips | 3 +++ extra/Configs/Config.mipsel | 3 +++ extra/Configs/Config.powerpc | 3 +++ extra/Configs/Config.sh | 3 +++ extra/Configs/Config.x86 | 3 +++ 10 files changed, 32 insertions(+), 1 deletion(-) 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 /lib and /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 /lib and /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 /lib and /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 /lib and /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 /lib and /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 /lib and /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 /lib and /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 /lib and /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 /lib and /usr/lib -- cgit v1.2.3