pcc-libs: use custom CFLAGS, build PIC objects.

This commit is contained in:
Juan RP 2011-02-24 13:20:48 +01:00
parent 8644bec730
commit b34874574d
2 changed files with 46 additions and 1 deletions

View file

@ -0,0 +1,33 @@
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@

View file

@ -2,7 +2,7 @@
pkgname=pcc-libs
version=20110224
distfiles="http://pcc.ludd.ltu.se/ftp/pub/$pkgname/$pkgname-$version.tgz"
build_style=gnu_configure
build_style=custom-install
short_desc="Portable C Compiler - Support Libraries"
maintainer="Juan RP <xtraeme@gmail.com>"
checksum=35624e4fc195da82ebb1b7d54b695918a7ec81079f7b44d8a769f45df34cd4d2
@ -15,3 +15,15 @@ long_desc="
Add_dependency run glibc
Add_dependency build flex
do_build()
{
# Force gcc compiler.
env CC=gcc ./configure --prefix=/usr
make ${makejobs}
}
do_install()
{
make DESTDIR=${DESTDIR} install
}