mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
Merge remote-tracking branches 'brandoncurtis/patch-1' and 'brandoncurtis/patch-2'
Don't error on specific compiler warning caused by glibc 2.24 Actually use U3_OS_LoomBits to set the number of loom bits
This commit is contained in:
commit
88c9921ae9
14
Makefile
14
Makefile
@ -134,6 +134,20 @@ ifneq ($(OS),bsd)
|
||||
CWFLAGS+=-Wno-error=unused-result
|
||||
endif
|
||||
|
||||
# glibc 2.24 deprecates readdir_r; iff glibc >=2.24,
|
||||
# don't upgrade 'deprecated declarations' warnings to errors
|
||||
# dependency: `getconf`, which comes w/glibc
|
||||
GLIBC := $(lastword $(shell getconf GNU_LIBC_VERSION))
|
||||
# dependency: none, uses make's native functions
|
||||
GLIBC_MAJ := $(word 1, $(subst ., ,$(GLIBC)))
|
||||
GLIBC_MIN := $(word 2, $(subst ., ,$(GLIBC)))
|
||||
# dependency: `expr` shell built-in
|
||||
GLIBC_GE_2_24 := $(shell expr $(GLIBC_MAJ) ">" 2 "|" \
|
||||
$(GLIBC_MAJ) "=" 2 "&" $(GLIBC_MIN) ">=" 24)
|
||||
ifeq (1,$(GLIBC_GE_2_24))
|
||||
CWFLAGS+=-Wno-error=deprecated-declarations
|
||||
endif
|
||||
|
||||
ifdef NO_SILENT_RULES
|
||||
%.o: %.c $(CORE)
|
||||
$(CC) -c $(CWFLAGS) $(CFLAGS) -o $@ $<
|
||||
|
@ -23,7 +23,7 @@
|
||||
**/
|
||||
/* u3a_bits: number of bits in word-addressed pointer. 29 == 2GB.
|
||||
*/
|
||||
# define u3a_bits 29
|
||||
# define u3a_bits U3_OS_LoomBits
|
||||
|
||||
/* u3a_page: number of bits in word-addressed page. 12 == 16Kbyte page.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user