builds with nvcc.

This commit is contained in:
Norayr Chilingarian 2023-02-15 20:14:32 +04:00
parent 7ca08f1ef1
commit d3ab6be2cf
2 changed files with 6 additions and 2 deletions

View file

@ -17,5 +17,5 @@ rm -f *.o *.obj *.exe *.sym *.c *.h result new.asm $(basename "$PWD")
# NOTE: The cygwin 64 bit build has relocation errors with
# these assembly generation options.
if [ "$COMPILER" = "gcc" -a "$FLAVOUR" != "cygwin.LP64.gcc" ]
then export CFLAGS="-gstabs -g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map"
then export CFLAGS="-g1 -Wa,-acdhln=new.asm -Wl,-Map=output.map"
fi

View file

@ -141,7 +141,11 @@ void determineCCompiler() {
compiler = "tcc";
cc = "tcc -g";
staticlink = "";
#elif defined(__GNUC__)
#elif defined(__NVCC__)
compiler = "nvcc";
cc = "nvcc -g --compiler-options -fPIC";
staticlink = "";
#elif defined(__GNUC__)
compiler = "gcc";
if (strncasecmp(os, "cygwin", 6) == 0) {
// Avoid cygwin specific warning that -fPIC is ignored.