diff options
author | Test_User <hax@andrewyu.org> | 2024-07-19 23:26:45 -0400 |
---|---|---|
committer | Test_User <hax@andrewyu.org> | 2024-07-19 23:26:45 -0400 |
commit | 59a07e28c5ef018d0c5cecd12d52ff10f5dc5b1a (patch) | |
tree | 5ca0a30a2426d5e6ba72ae61ad3c0e2f52cdd6cd /Makefile | |
parent | e755e8b341eea1b37ef82584cd65a05edf8fdbaa (diff) | |
download | haxircd-59a07e28c5ef018d0c5cecd12d52ff10f5dc5b1a.tar.gz haxircd-59a07e28c5ef018d0c5cecd12d52ff10f5dc5b1a.zip |
Minimal support for non-semaphore-supporting systems
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -51,6 +51,7 @@ LDFLAGS = -lpthread printf '%s\n' 'LAST_SERVICES_PSEUDOCLIENT = $(SERVICES_PSEUDOCLIENT)' >> .makeopts printf '%s\n' 'LAST_SAFE_STACK = $(SAFE_STACK)' >> .makeopts printf '%s\n' 'LAST_FUTEX = $(FUTEX)' >> .makeopts + printf '%s\n' 'LAST_MISERABLE_SPINLOCKS = $(MISERABLE_SPINLOCKS)' >> .makeopts printf '%s\n' 'LAST_ATOMICS = $(ATOMICS)' >> .makeopts printf '%s\n' 'LAST_CFLAGS = $(ORIGINAL_CFLAGS)' >> .makeopts printf '%s\n' 'LAST_CC = $(CC)' >> .makeopts @@ -223,6 +224,14 @@ else FUTEX := $(LAST_FUTEX) endif +ifneq ($(MISERABLE_SPINLOCKS),) +ifneq ($(MISERABLE_SPINLOCKS),$(LAST_MISERABLE_SPINLOCKS)) +rebuild = 1 +endif +else +MISERABLE_SPINLOCKS := $(LAST_MISERABLE_SPINLOCKS) +endif + ifneq ($(ATOMICS),) ifneq ($(ATOMICS),$(LAST_ATOMICS)) rebuild = 1 @@ -415,6 +424,13 @@ ifeq ($(FUTEX),1) CFLAGS += -DUSE_FUTEX endif +ifeq ($(MISERABLE_SPINLOCKS),1) +ifeq ($(FUTEX),1) +$(error Miserable spinlocks are only enabled when noy using futexes) +endif +CFLAGS += -DUSE_MISERABLE_SPINLOCKS +endif + ifeq ($(ATOMICS),1) CFLAGS += -DUSE_ATOMICS endif |