diff --git a/bootstrap/.gitignore b/bootstrap/.gitignore new file mode 100644 index 0000000..a65bc74 --- /dev/null +++ b/bootstrap/.gitignore @@ -0,0 +1,3 @@ +/Makefile +/lib +/tests diff --git a/bootstrap/build_x86_64.sh b/bootstrap/build_x86_64.sh new file mode 100755 index 0000000..28ad0ba --- /dev/null +++ b/bootstrap/build_x86_64.sh @@ -0,0 +1,5 @@ +#! /usr/bin/env sh + +cd "$(dirname "$0")" && +../configure && +gcc -o tcc -static -nostdlib -DNDEBUG -DTCC_NOT_NATIVE -DCONFIG_LDDIR="\"lib64\"" -DTCC_TARGET_X86_64 -DONE_SOURCE=0 -I. ../tcc.c ../libtcc.c ../tccpp.c ../tccgen.c ../tccelf.c ../tccasm.c ../tccrun.c ../x86_64-gen.c ../x86_64-link.c ../i386-asm.c diff --git a/tcc.h b/tcc.h index cd67973..0e00290 100644 --- a/tcc.h +++ b/tcc.h @@ -150,7 +150,7 @@ extern long double strtold (const char *__nptr, char **__endptr); #endif /* only native compiler supports -run */ -#if defined _WIN32 == defined TCC_TARGET_PE +#if (defined _WIN32 == defined TCC_TARGET_PE) && !defined TCC_NOT_NATIVE # if (defined __i386__ || defined _X86_) && defined TCC_TARGET_I386 # define TCC_IS_NATIVE # elif (defined __x86_64__ || defined _AMD64_) && defined TCC_TARGET_X86_64