Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildsys: rename SPARC -> SYS_IS_SPARC, drop SYS_IS_CYGWIN32 #5604

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 5 additions & 4 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ build/obj/%.c.o: %.c cnf/GAP-CFLAGS cnf/GAP-CPPFLAGS $(obj_deps)
LINK=$(CC)

SHLIB_MAJOR = $(GAP_KERNEL_MAJOR_VERSION)
ifeq ($(SYS_IS_CYGWIN32),yes)
ifneq (,$(findstring cygwin,$(host_os)))
SHLIB_EXT=.dll
LIBGAP_FULL = libgap$(SHLIB_EXT)

Expand Down 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