get a little closer to cross compiling for w32

This commit is contained in:
darkrose 2017-08-24 21:02:20 +10:00
parent 623a11e24a
commit 9e47f55c7a
2 changed files with 8 additions and 4 deletions

View File

@ -423,7 +423,11 @@ else()
endif() endif()
set(SAFETY_FLAGS "-fwrapv -fno-fast-math") set(SAFETY_FLAGS "-fwrapv -fno-fast-math")
set(SAFETY_LDFLAGS "-Wl,-z,relro,-z,now") if(MINGW)
set(SAFETY_LDFLAGS "")
else()
set(SAFETY_LDFLAGS "-Wl,-z,relro,-z,now")
endif()
set(OPT_FLAGS "-O3 -fomit-frame-pointer") set(OPT_FLAGS "-O3 -fomit-frame-pointer")
set(OPT_LDFLAGS "-Wl,-O1,--sort-common,-s") set(OPT_LDFLAGS "-Wl,-O1,--sort-common,-s")

View File

@ -266,14 +266,14 @@ int path_init()
} }
for (k=0; k<2; k++) { for (k=0; k<2; k++) {
for (i--; i>=0; i--) { for (i--; i>=0; i--) {
if (path[i] == '/') if (buff[i] == '/')
break; break;
} }
path[i] = 0; buff[i] = 0;
} }
path.cwd = strdup(buff); path.cwd = strdup(buff);
path.data_global = strdup(cwd); path.data_global = strdup(path.cwd);
path.home = strdup(path.cwd); path.home = strdup(path.cwd);
path.data_user = path_set(path.cwd,"data",NULL,0); path.data_user = path_set(path.cwd,"data",NULL,0);
path.config = strdup(path.cwd); path.config = strdup(path.cwd);