void-packages/srcpkgs/pcc-libs/patches/build_PIC.patch

34 lines
1.1 KiB
Diff

Respect passed CFLAGS to configure and force PIC object generation.
--- csu/linux/Makefile.orig 2011-02-24 12:59:36.988078869 +0100
+++ csu/linux/Makefile 2011-02-24 13:01:29.434007771 +0100
@@ -4,7 +4,7 @@ VERSION ?= 0.9.9
PCCLIBDIR ?= /usr/local/lib/pcc/$(TARGET)/$(VERSION)/lib
SRCDIR ?= .
-CFLAGS = -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS += -fpic -fPIC -I$(SRCDIR)/$(MACH) -I$(SRCDIR) -Wall -Wstrict-prototypes -Wmissing-prototypes
OBJS = crt0.o crt1.o gcrt1.o crti.o crtn.o crtbegin.o crtend.o
--- libpcc/Makefile.in.orig 2011-02-24 13:02:15.570566278 +0100
+++ libpcc/Makefile.in 2011-02-24 13:02:33.577393664 +0100
@@ -12,6 +12,7 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
CC = @CC@
+CFLAGS = @CFLAGS@ -fpic -fPIC
TARGMACH = @targmach@
TARGOS = @targos@
TARGET = @target@
--- libsoftfloat/Makefile.in.orig 2011-02-24 13:02:54.937188695 +0100
+++ libsoftfloat/Makefile.in 2011-02-24 13:03:09.281050924 +0100
@@ -12,6 +12,7 @@ exec_prefix = @exec_prefix@
libdir = @libdir@
CC = @CC@
+CFLAGS = @CFLAGS@ -fpic -fPIC
TARGET = @target@
TARGMACH = @targmach@
VERSION = @version@