[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Problem compiling for FreeBSD x86-64

From: Harshvardhan
Subject: [Tinycc-devel] Problem compiling for FreeBSD x86-64
Date: Wed, 11 Sep 2013 09:09:28 +0530
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130824 Thunderbird/17.0.8

Hello. I faced several problems compiling tcc-0.9.26 for FreeBSD x86-64, First of all it didn't detected that I am using x86-64 CPU and that FreeBSD don't use ldl. I manually edited Configuration script to change 'unknown' cpu to 'x86-64'. Then I added FreeBSD in list of OS where there is noldl (like DragonflyBSD). Configuration was fine. This is what happened next:
address@hidden ~/Desktop/tcc-0.9.26% sudo gmake install
gcc -o tcc.o -c tcc.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o libtcc.o -c libtcc.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o tccpp.o -c tccpp.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o tccgen.o -c tccgen.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o tccelf.o -c tccelf.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o tccasm.o -c tccasm.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o tccrun.o -c tccrun.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o x86_64-gen.o -c x86_64-gen.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 gcc -o i386-asm.o -c i386-asm.c -DTCC_TARGET_X86_64 -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0 ar rcs libtcc.a libtcc.o tccpp.o tccgen.o tccelf.o tccasm.o tccrun.o x86_64-gen.o i386-asm.o gcc -o tcc tcc.o libtcc.a -lm -I. -Wall -g -O2 -fno-strict-aliasing -Wno-pointer-sign -Wno-sign-compare -D_FORTIFY_SOURCE=0
gmake -C lib native
gmake[1]: Entering directory `/usr/home/harshvardhan/Desktop/tcc-0.9.26/lib'
ar rcs ../libtcc1.a x86_64/libtcc1.o x86_64/alloca86_64.o
gmake[1]: Leaving directory `/usr/home/harshvardhan/Desktop/tcc-0.9.26/lib'
./texi2pod.pl tcc-doc.texi tcc.pod
pod2man --section=1 --center=" " --release=" " tcc.pod > tcc.1
makeinfo tcc-doc.texi
mkdir -p "/usr/local/bin"
install -m755 tcc "/usr/local/bin"
mkdir -p "/usr/local/share/man/man1"
install tcc.1 "/usr/local/share/man/man1"
mkdir -p "/usr/local/share/info"
install tcc-doc.info "/usr/local/share/info"
mkdir -p "/usr/local/lib/tcc"
mkdir -p "/usr/local/lib/tcc/include"
install -m644 libtcc1.a "/usr/local/lib/tcc"
install -m644 ./include/stdarg.h ./include/stddef.h ./include/stdbool.h ./include/float.h ./include/varargs.h ./include/tcclib.h "/usr/local/lib/tcc/include"
mkdir -p "/usr/local/lib"
install -m755 libtcc.a "/usr/local/lib"
mkdir -p "/usr/local/include"
install -m644 ./libtcc.h "/usr/local/include"
mkdir -p "/usr/local/share/doc/tcc"
install -m644 tcc-doc.html "/usr/local/share/doc/tcc"

Finally it got successfully compiled. Then I tried a simple program helloapp.c to test TCC:
#include <stdio.h>

int main(){
        printf("Hello Earth! I am from Mars!");
        return 0;

Then I got this error:
address@hidden ~/Desktop% tcc helloapp.c
In file included from helloapp.c:1:
/usr/include/stdio.h:63: error: ';' expected (got "va_list")

Sad. I checked /usr/include/stdio.h:63, it was "typedef __va_list va_list;". This is legal C I think. If you want to have look at modified Configure file, have a look here- http://pastebin.com/G65C7ASj
So what is the problem? Why it isn't working?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]