Skip to content

Commit

Permalink
buildsys: rename SPARC -> SYS_IS_SPARC, drop SYS_IS_CYGWIN32
Browse files Browse the repository at this point in the history
This only affects configure and Makefile.rules; the headers
still define a macro SYS_IS_CYGWIN32.
  • Loading branch information
fingolfin committed Jan 22, 2024
1 parent b37f73e commit 05779de
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#

# GAP specific
SYS_IS_CYGWIN32 = @SYS_IS_CYGWIN32@
ABI = @ABI@
ABI_CFLAGS = @ABI_CFLAGS@

Expand Down
7 changes: 4 additions & 3 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ libgap: libgap$(SHLIB_EXT) $(LIBGAP_FULL)
$(LIBGAP_FULL): $(OBJS) cnf/GAP-LDFLAGS cnf/GAP-LIBS cnf/GAP-OBJS
$(QUIET_LINK)$(LINK) -o $@ $(LINK_SHLIB_FLAGS) $(GAP_LDFLAGS) $(OBJS) $(GAP_LIBS)

ifeq ($(SYS_IS_CYGWIN32),yes)
ifneq (,$(findstring cygwin,$(host_os)))

# increase stack size, the default is too small (see issue #1522)
GAP_LDFLAGS += -Wl,--stack,16777216
Expand Down Expand Up @@ -758,7 +758,8 @@ ZLIB_FILES := $(ZLIB_PREFIX)/include/zlib.h
EXTERN_FILES += $(ZLIB_FILES)

zlib: $(ZLIB_FILES)
ifeq ($(SYS_IS_CYGWIN32),yes)

ifneq (,$(findstring cygwin,$(host_os)))
$(ZLIB_FILES):
MAKE=$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" $(srcdir)/cnf/build-cygwin-zlib.sh

Expand All @@ -767,7 +768,7 @@ else
$(ZLIB_FILES):
MAKE=$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" $(srcdir)/cnf/build-extern.sh zlib "$(abs_srcdir)/extern/zlib"

endif # SYS_IS_CYGWIN32
endif

.PHONY: zlib

Expand Down
11 changes: 1 addition & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -928,19 +928,10 @@ GP_C_LONG_ALIGN

case "$host_cpu" in
sparc* )
AC_DEFINE([SPARC], [1], [define as 1 on SPARC architecture to flush register windows])
SPARC=yes
AC_DEFINE([SYS_IS_SPARC], [1], [define as 1 on SPARC architecture to flush register windows])
;;
esac

case "$host_os" in
*cygwin*)
CYGWIN=yes
;;
esac

AC_SUBST([SYS_IS_CYGWIN32], [$CYGWIN])


dnl
dnl check for the existence of various header files
Expand Down
5 changes: 2 additions & 3 deletions dev/audit-config-h.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ if git grep -n -w config.h -- :/src/*.h > /dev/null ; then
fi

# First scan config.h to obtain a list of all symbols it might define. From
# this is subtracts a list of "known OK" symbols. The symbols and there reason
# this is subtracts a list of "known OK" symbols. The symbols and their reason
# for being on this list are:
# - `HAVE_FUNC_ATTRIBUTE_`*: these are only used for optimizations; also, our
# headers try hard to define them on the fly (at least in GCC and clang)
# - `HAVE___BUILTIN_MUL_OVERFLOW`: same as above
# - `SIZEOF_VOID_P`: provided for backwards compatibility in a few packages,
# and actually (re-)defined in `common.h`
# - `SPARC`: only appears in a comment
PATTERN=$(egrep '(#define|#undef)' build/config.h | sed -E -e 's;(#define|/\* #undef) ([^ ]+) .*$;\2;' | egrep -v 'HAVE_FUNC_ATTRIBUTE_|HAVE___BUILTIN_MUL_OVERFLOW|SIZEOF_VOID_P|SPARC' | tr '\n' '|')
PATTERN=$(egrep '(#define|#undef)' build/config.h | sed -E -e 's;(#define|/\* #undef) ([^ ]+) .*$;\2;' | egrep -v 'HAVE_FUNC_ATTRIBUTE_|HAVE___BUILTIN_MUL_OVERFLOW|SIZEOF_VOID_P' | tr '\n' '|')
PATTERN=${PATTERN%?} # remove trailing "|"

# only consider files that do not #include config.h
Expand Down
4 changes: 2 additions & 2 deletions src/gasman.c
Original file line number Diff line number Diff line change
Expand Up @@ -1893,7 +1893,7 @@ UInt ResizeBag (

static jmp_buf RegsBags;

#if defined(SPARC)
#if defined(SYS_IS_SPARC)
static void SparcStackFuncBags(void)
{
asm (" ta 0x3 ");
Expand Down Expand Up @@ -1998,7 +1998,7 @@ static UInt CollectBags_Mark(UInt FullBags)

// mark from the stack
_setjmp(RegsBags);
#if defined(SPARC)
#if defined(SYS_IS_SPARC)
SparcStackFuncBags();
#endif
GenStackFuncBags();
Expand Down

0 comments on commit 05779de

Please sign in to comment.