I want to compile httpd into LLVM bytecode using clang. First I tried compiling it using gcc, for which I did the following:
./configure --prefix=/home/varun/apache/httpd/gcc --with-included-apr
make
sudo make install
And it successfully installs!
Now, I try compiling it with clang, for which I do the following:
CC="clang" CFLAGS="-O4" ./configure --prefix=/home/varun/apache/httpd/clang --with-included-apr
make # didn't come to this step
sudo make install # didn't come to this step
And, the configure itself fails. I chose -O4 as I read that LLVM outputs bytecode if you use -O4 or -emit-llvm as CFLAGS(neither of them work).
This is the error I get:
checking whether the C compiler works... no
configure: error: in `/home/varun/apache/httpd/httpd-2.4.3/srclib/apr':
configure: error: C compiler cannot create executables
Is this related to the the linker not being able to link the LLVM bytecode files?