[MAKEFILE]: Use -fPIC in CFLAGS

To fix this on parisc:

acme@parisc:~/pahole$ make
gcc -g -O2 -Wall -I. -I/usr/include/elfutils  -c -o pahole.o pahole.c
gcc -g -O2 -Wall -I. -I/usr/include/elfutils  -c -o classes.o classes.c
gcc -shared \
          -o libclasses.so.1.0.0 classes.o
/usr/bin/ld: classes.o: relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC
classes.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libclasses.so] Error 1
acme@parisc:~/pahole$

Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
Arnaldo Carvalho de Melo 2006-12-05 22:05:54 -02:00
parent c9be4684fe
commit 314d8f65bb
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ INSTALL_DATA = ${INSTALL} -m 644
CC = gcc
LIBS = -L. -lclasses -ldw -lelf
INCLUDES = -I. -I/usr/include/elfutils
CFLAGS = -g -O2 -Wall
CFLAGS = -g -O2 -Wall -fPIC
CPPFLAGS += $(INCLUDES)
LDFLAGS += $(LIBS)
LINKFLAGS = -shared