attempt to get tiny C for i386 to work
This commit is contained in:
parent
c96f4e042e
commit
030d46f218
2 changed files with 7 additions and 1 deletions
|
|
@ -30,6 +30,8 @@ proc addFile(filename: string) =
|
||||||
proc setupEnvironment =
|
proc setupEnvironment =
|
||||||
when defined(amd64):
|
when defined(amd64):
|
||||||
defineSymbol(gTinyC, "__x86_64__", nil)
|
defineSymbol(gTinyC, "__x86_64__", nil)
|
||||||
|
elif defined(i386):
|
||||||
|
defineSymbol(gTinyC, "__i386__", nil)
|
||||||
when defined(linux):
|
when defined(linux):
|
||||||
defineSymbol(gTinyC, "__linux__", nil)
|
defineSymbol(gTinyC, "__linux__", nil)
|
||||||
defineSymbol(gTinyC, "__linux", nil)
|
defineSymbol(gTinyC, "__linux", nil)
|
||||||
|
|
@ -40,7 +42,6 @@ proc setupEnvironment =
|
||||||
addSysincludePath(gTinyC, nimrodDir / "tinyc/win32/include")
|
addSysincludePath(gTinyC, nimrodDir / "tinyc/win32/include")
|
||||||
addSysincludePath(gTinyC, nimrodDir / "tinyc/include")
|
addSysincludePath(gTinyC, nimrodDir / "tinyc/include")
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
defineSymbol(gTinyC, "__i386__", nil)
|
|
||||||
defineSymbol(gTinyC, "_WIN32", nil)
|
defineSymbol(gTinyC, "_WIN32", nil)
|
||||||
# we need Mingw's headers too:
|
# we need Mingw's headers too:
|
||||||
var gccbin = getConfigVar("gcc.path") % ["nimrod", nimrodDir]
|
var gccbin = getConfigVar("gcc.path") % ["nimrod", nimrodDir]
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,11 @@
|
||||||
# define TCC_TARGET_PE 1
|
# define TCC_TARGET_PE 1
|
||||||
# define TCC_TARGET_I386
|
# define TCC_TARGET_I386
|
||||||
# define CONFIG_TCCDIR "."
|
# define CONFIG_TCCDIR "."
|
||||||
|
#elif defined(__i386__)
|
||||||
|
# define TCC_TARGET_I386
|
||||||
|
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
|
||||||
|
# define GCC_MAJOR 4
|
||||||
|
# define HOST_I386 1
|
||||||
#else
|
#else
|
||||||
# define TCC_TARGET_X86_64
|
# define TCC_TARGET_X86_64
|
||||||
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
|
# define CONFIG_TCCDIR "/usr/local/lib/tcc"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue