c-semantics
c-semantics copied to clipboard
kcc seems can't work with libtool
#here is a very simple task to use libtool to compile and link a library with kcc as compiler the library only contains one helloWord like function #but it seems can't work and give the error:
/usr/bin/ld: .libs/fun.o: relocation R_X86_64_32 against `.rodata' can not be used
when making a shared object; recompile with -fPIC
.libs/fun.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
#to reproduce the problem:
wget https://github.com/Lycbel/cs510Files/blob/master/report5/libtooltest.zip?raw=true
unzip libtooltest.zip?raw=true
cd libtooltest
bash run.sh
#the two core commands are: (temp need to be an absolute path) #libtool --tag CC --mode=compile kcc -c fun.c #libtool --tag CC --mode=link kcc -o libfun.la fun.lo -rpath /$TEMP