feat: cosmopolitan libc support
Added support for cosmopolitan libc. Simply do `make COSMO=yes` and you'll get feuille.com, a working αcτµαlly pδrταblε εxεcµταblε pastebin server. + version bump.
This commit is contained in:
parent
63319d7525
commit
16f516d6ce
9 changed files with 86 additions and 27 deletions
29
config.mk
29
config.mk
|
|
@ -1,5 +1,5 @@
|
|||
# feuille version
|
||||
VERSION = 1.19.5
|
||||
VERSION = 2.0.0
|
||||
|
||||
# paths (customize them to fit your system)
|
||||
PREFIX = /usr/local
|
||||
|
|
@ -17,13 +17,28 @@ LIBS = -L/usr/lib -lc
|
|||
# compiler
|
||||
CC = cc
|
||||
|
||||
# debug build
|
||||
CFLAGS = -g -std=c99 -Wall -Wextra -Wpedantic -Wno-sign-compare -DVERSION=\"$(VERSION)\" -DDEBUG $(INCS)
|
||||
LDFLAGS = -g $(LIBS)
|
||||
# cosmopolitan libc flags
|
||||
CCFLAGS = -std=c99 -nostdinc -fno-pie -fno-omit-frame-pointer \
|
||||
-mno-tls-direct-seg-refs -mno-red-zone \
|
||||
-DVERSION=\"$(VERSION)\" -DCOSMOPOLITAN \
|
||||
-I. -include cosmopolitan/cosmopolitan.h
|
||||
|
||||
# release build
|
||||
CFLAGS$(DEBUG) = -std=c99 -Wall -Wextra -Wno-sign-compare -DVERSION=\"$(VERSION)\" -O3 $(INCS)
|
||||
LDFLAGS$(DEBUG) = -s $(LIBS)
|
||||
CLDFLAGS = -std=c99 -static -nostdlib -fno-pie -fno-omit-frame-pointer \
|
||||
-mno-tls-direct-seg-refs -mno-red-zone \
|
||||
-fuse-ld=bfd -Wl,-T,cosmopolitan/ape.lds -Wl,--gc-sections \
|
||||
cosmopolitan/crt.o cosmopolitan/ape-no-modify-self.o cosmopolitan/cosmopolitan.a
|
||||
|
||||
# standard libc flags
|
||||
CCFLAGS$(COSMO) = -std=c99 -DVERSION=\"$(VERSION)\" $(INCS)
|
||||
CLDFLAGS$(COSMO) = $(LIBS)
|
||||
|
||||
# debug flags
|
||||
CFLAGS = -g -Wall -Wextra -Wno-sign-compare -DDEBUG $(CCFLAGS)
|
||||
LDFLAGS = -g $(CLDFLAGS)
|
||||
|
||||
# release flags
|
||||
CFLAGS$(DEBUG) = -O3 -Wall -Wextra -Wno-sign-compare $(CCFLAGS)
|
||||
LDFLAGS$(DEBUG) = -s $(CLDFLAGS)
|
||||
|
||||
# static build (uncomment)
|
||||
#LD_FLAGS += -static
|
||||
|
|
|
|||
Reference in a new issue