[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:
parent
c9be4684fe
commit
314d8f65bb
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ INSTALL_DATA = ${INSTALL} -m 644
|
||||||
CC = gcc
|
CC = gcc
|
||||||
LIBS = -L. -lclasses -ldw -lelf
|
LIBS = -L. -lclasses -ldw -lelf
|
||||||
INCLUDES = -I. -I/usr/include/elfutils
|
INCLUDES = -I. -I/usr/include/elfutils
|
||||||
CFLAGS = -g -O2 -Wall
|
CFLAGS = -g -O2 -Wall -fPIC
|
||||||
CPPFLAGS += $(INCLUDES)
|
CPPFLAGS += $(INCLUDES)
|
||||||
LDFLAGS += $(LIBS)
|
LDFLAGS += $(LIBS)
|
||||||
LINKFLAGS = -shared
|
LINKFLAGS = -shared
|
||||||
|
|
Loading…
Reference in New Issue