mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 07:29:23 +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_CPPFLAGS += -DNDEBUG -DSYSDEBUG
|
||||
CONFIG_CCFLAGS += $(BACKTRACES) -O3 -fmerge-all-constants
|
||||
TARGET_ARCH ?= -march=native
|
||||
CONFIG_TARGET_ARCH ?= -march=native
|
||||
endif
|
||||
|
||||
# Optimized Linux Mode
|
||||
|
@ -100,14 +100,14 @@ CONFIG_OFLAGS ?= -g -ggdb
|
|||
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
||||
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
||||
CONFIG_COPTS += -mred-zone
|
||||
TARGET_ARCH ?= -march=native
|
||||
CONFIG_TARGET_ARCH ?= -march=native
|
||||
endif
|
||||
ifeq ($(MODE), x86_64-optlinux)
|
||||
CONFIG_OFLAGS ?= -g -ggdb
|
||||
CONFIG_CPPFLAGS += -DNDEBUG -DSYSDEBUG -DSUPPORT_VECTOR=1
|
||||
CONFIG_CCFLAGS += -O3 -fmerge-all-constants
|
||||
CONFIG_COPTS += -mred-zone
|
||||
TARGET_ARCH ?= -march=native
|
||||
CONFIG_TARGET_ARCH ?= -march=native
|
||||
endif
|
||||
ifeq ($(MODE), aarch64-optlinux)
|
||||
CONFIG_OFLAGS ?= -g -ggdb
|
||||
|
@ -223,8 +223,6 @@ CONFIG_CCFLAGS += \
|
|||
-momit-leaf-frame-pointer \
|
||||
-foptimize-sibling-calls \
|
||||
-DDWARFLESS
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
PYFLAGS += \
|
||||
-O2 \
|
||||
-B
|
||||
|
@ -244,8 +242,6 @@ CONFIG_CCFLAGS += \
|
|||
-momit-leaf-frame-pointer \
|
||||
-foptimize-sibling-calls \
|
||||
-DDWARFLESS
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
PYFLAGS += \
|
||||
-O2 \
|
||||
-B
|
||||
|
@ -297,8 +293,6 @@ CONFIG_CCFLAGS += \
|
|||
-fno-align-jumps \
|
||||
-fno-align-labels \
|
||||
-fno-align-loops
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
endif
|
||||
|
||||
# Linux+BSD Tiny Mode
|
||||
|
@ -328,8 +322,6 @@ CONFIG_CCFLAGS += \
|
|||
-fno-align-jumps \
|
||||
-fno-align-labels \
|
||||
-fno-align-loops
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
endif
|
||||
|
||||
# Unix Tiny Mode
|
||||
|
@ -358,8 +350,6 @@ CONFIG_CCFLAGS += \
|
|||
-fno-align-jumps \
|
||||
-fno-align-labels \
|
||||
-fno-align-loops
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
endif
|
||||
|
||||
# Tiny Metallic Unix Mode
|
||||
|
@ -388,8 +378,6 @@ CONFIG_CCFLAGS += \
|
|||
-fno-align-jumps \
|
||||
-fno-align-labels \
|
||||
-fno-align-loops
|
||||
TARGET_ARCH ?= \
|
||||
-msse3
|
||||
endif
|
||||
|
||||
# no x87 instructions mode
|
||||
|
@ -522,3 +510,5 @@ ifeq ($(ARCH), aarch64)
|
|||
CONFIG_CCFLAGS += -fpatchable-function-entry=7,6
|
||||
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) {
|
||||
if (!__threaded) return 0;
|
||||
while (atomic_exchange_explicit(lk, 1, memory_order_acquire)) {
|
||||
pthread_pause_np();
|
||||
for (;;) {
|
||||
if (!atomic_exchange_explicit(lk, 1, memory_order_acquire))
|
||||
break;
|
||||
for (;;)
|
||||
if (!atomic_load_explicit(lk, memory_order_relaxed))
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ make -j64 m=$AMD64-dbg \
|
|||
o/$AMD64-dbg/cosmopolitan.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/$AMD64-optlinux/ape/ape.lds \
|
||||
o/$AMD64-optlinux/libc/crt/crt.o \
|
||||
|
|
Loading…
Add table
Reference in a new issue