mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 15:38:22 +00:00
Fix package.sh build error
This commit is contained in:
parent
642e9cb91a
commit
efb3a34608
3 changed files with 12 additions and 18 deletions
|
@ -82,7 +82,7 @@ ENABLE_FTRACE = 1
|
||||||
CONFIG_OFLAGS ?= -g -ggdb
|
CONFIG_OFLAGS ?= -g -ggdb
|
||||||
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG
|
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG
|
||||||
CONFIG_CCFLAGS += $(BACKTRACES) -O3 -fmerge-all-constants
|
CONFIG_CCFLAGS += $(BACKTRACES) -O3 -fmerge-all-constants
|
||||||
TARGET_ARCH ?= -march=native
|
CONFIG_TARGET_ARCH ?= -march=native
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Optimized Linux Mode
|
# Optimized Linux Mode
|
||||||
|
@ -100,14 +100,14 @@ CONFIG_OFLAGS ?= -g -ggdb
|
||||||
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
||||||
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
||||||
CONFIG_COPTS += -mred-zone
|
CONFIG_COPTS += -mred-zone
|
||||||
TARGET_ARCH ?= -march=native
|
CONFIG_TARGET_ARCH ?= -march=native
|
||||||
endif
|
endif
|
||||||
ifeq ($(MODE), x86_64-optlinux)
|
ifeq ($(MODE), x86_64-optlinux)
|
||||||
CONFIG_OFLAGS ?= -g -ggdb
|
CONFIG_OFLAGS ?= -g -ggdb
|
||||||
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
||||||
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
||||||
CONFIG_COPTS += -mred-zone
|
CONFIG_COPTS += -mred-zone
|
||||||
TARGET_ARCH ?= -march=native
|
CONFIG_TARGET_ARCH ?= -march=native
|
||||||
endif
|
endif
|
||||||
ifeq ($(MODE), aarch64-optlinux)
|
ifeq ($(MODE), aarch64-optlinux)
|
||||||
CONFIG_OFLAGS ?= -g -ggdb
|
CONFIG_OFLAGS ?= -g -ggdb
|
||||||
|
@ -223,8 +223,6 @@ CONFIG_CCFLAGS += \
|
||||||
-momit-leaf-frame-pointer \
|
-momit-leaf-frame-pointer \
|
||||||
-foptimize-sibling-calls \
|
-foptimize-sibling-calls \
|
||||||
-DDWARFLESS
|
-DDWARFLESS
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
PYFLAGS += \
|
PYFLAGS += \
|
||||||
-O2 \
|
-O2 \
|
||||||
-B
|
-B
|
||||||
|
@ -244,8 +242,6 @@ CONFIG_CCFLAGS += \
|
||||||
-momit-leaf-frame-pointer \
|
-momit-leaf-frame-pointer \
|
||||||
-foptimize-sibling-calls \
|
-foptimize-sibling-calls \
|
||||||
-DDWARFLESS
|
-DDWARFLESS
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
PYFLAGS += \
|
PYFLAGS += \
|
||||||
-O2 \
|
-O2 \
|
||||||
-B
|
-B
|
||||||
|
@ -297,8 +293,6 @@ CONFIG_CCFLAGS += \
|
||||||
-fno-align-jumps \
|
-fno-align-jumps \
|
||||||
-fno-align-labels \
|
-fno-align-labels \
|
||||||
-fno-align-loops
|
-fno-align-loops
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Linux+BSD Tiny Mode
|
# Linux+BSD Tiny Mode
|
||||||
|
@ -328,8 +322,6 @@ CONFIG_CCFLAGS += \
|
||||||
-fno-align-jumps \
|
-fno-align-jumps \
|
||||||
-fno-align-labels \
|
-fno-align-labels \
|
||||||
-fno-align-loops
|
-fno-align-loops
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Unix Tiny Mode
|
# Unix Tiny Mode
|
||||||
|
@ -358,8 +350,6 @@ CONFIG_CCFLAGS += \
|
||||||
-fno-align-jumps \
|
-fno-align-jumps \
|
||||||
-fno-align-labels \
|
-fno-align-labels \
|
||||||
-fno-align-loops
|
-fno-align-loops
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Tiny Metallic Unix Mode
|
# Tiny Metallic Unix Mode
|
||||||
|
@ -388,8 +378,6 @@ CONFIG_CCFLAGS += \
|
||||||
-fno-align-jumps \
|
-fno-align-jumps \
|
||||||
-fno-align-labels \
|
-fno-align-labels \
|
||||||
-fno-align-loops
|
-fno-align-loops
|
||||||
TARGET_ARCH ?= \
|
|
||||||
-msse3
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# no x87 instructions mode
|
# no x87 instructions mode
|
||||||
|
@ -522,3 +510,5 @@ ifeq ($(ARCH), aarch64)
|
||||||
CONFIG_CCFLAGS += -fpatchable-function-entry=7,6
|
CONFIG_CCFLAGS += -fpatchable-function-entry=7,6
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TARGET_ARCH ?= $(CONFIG_TARGET_ARCH)
|
||||||
|
|
8
third_party/dlmalloc/locks.inc
vendored
8
third_party/dlmalloc/locks.inc
vendored
|
@ -40,8 +40,12 @@ static int malloc_wipe(MLOCK_T *lk) {
|
||||||
|
|
||||||
static int malloc_lock(MLOCK_T *lk) {
|
static int malloc_lock(MLOCK_T *lk) {
|
||||||
if (!__threaded) return 0;
|
if (!__threaded) return 0;
|
||||||
while (atomic_exchange_explicit(lk, 1, memory_order_acquire)) {
|
for (;;) {
|
||||||
pthread_pause_np();
|
if (!atomic_exchange_explicit(lk, 1, memory_order_acquire))
|
||||||
|
break;
|
||||||
|
for (;;)
|
||||||
|
if (!atomic_load_explicit(lk, memory_order_relaxed))
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ make -j64 m=$AMD64-dbg \
|
||||||
o/$AMD64-dbg/cosmopolitan.a \
|
o/$AMD64-dbg/cosmopolitan.a \
|
||||||
o/$AMD64-dbg/third_party/libcxx/libcxx.a \
|
o/$AMD64-dbg/third_party/libcxx/libcxx.a \
|
||||||
|
|
||||||
make TARGET_ARCH= -j64 m=$AMD64-optlinux \
|
make CONFIG_TARGET_ARCH= -j64 m=$AMD64-optlinux \
|
||||||
o/cosmocc.h.txt \
|
o/cosmocc.h.txt \
|
||||||
o/$AMD64-optlinux/ape/ape.lds \
|
o/$AMD64-optlinux/ape/ape.lds \
|
||||||
o/$AMD64-optlinux/libc/crt/crt.o \
|
o/$AMD64-optlinux/libc/crt/crt.o \
|
||||||
|
|
Loading…
Add table
Reference in a new issue