mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-26 11:24:35 +00:00
Remove -std=foo compiler flags
These flags are only really useful for linting. They put GCC and other compilers into `__STRICT_ANSI__` mode. That can make systems stuff slower, in favor of standards conformance, since it may cause headers to remove platform specific goodness. It also makes builds more painful on old distros that have the functions we need, but track an older version of the standards where those functions weren't strictly available. One such example is mkstemp(). It's available everywhere in practice, but GA Ubuntu in strict ansi mode complains about it. If we don't use mkstemp() then that'll put us on the security radar with other platforms.
This commit is contained in:
parent
cbddf4661b
commit
1631298475
4
Makefile
4
Makefile
@ -30,8 +30,8 @@ endif
|
||||
# Compile flags
|
||||
#
|
||||
|
||||
CFLAGS = -I. -O3 -DNDEBUG -std=c11 -fPIC
|
||||
CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -std=c++11 -fPIC
|
||||
CFLAGS = -I. -O3 -DNDEBUG -fPIC
|
||||
CXXFLAGS = -I. -I./examples -O3 -DNDEBUG -fPIC
|
||||
LDFLAGS =
|
||||
|
||||
# OS specific
|
||||
|
2
mmap.c
2
mmap.c
@ -34,7 +34,7 @@
|
||||
#ifdef NEED_POSIX_MMAP
|
||||
#include <stdlib.h>
|
||||
|
||||
static void *PosixMmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) {
|
||||
void *PosixMmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) {
|
||||
int tfd;
|
||||
void* res;
|
||||
char path[] = "/tmp/llama.dat.XXXXXX";
|
||||
|
Loading…
Reference in New Issue
Block a user