Skip to content

Commit 63b79a7

Browse files
authored
buildsys: rename SPARC -> SYS_IS_SPARC, drop SYS_IS_CYGWIN32 (#5604)
This only affects configure and Makefile.rules; the headers still define a macro SYS_IS_CYGWIN32.
1 parent c2b535e commit 63b79a7

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

GNUmakefile.in

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#
1313

1414
# GAP specific
15-
SYS_IS_CYGWIN32 = @SYS_IS_CYGWIN32@
1615
ABI = @ABI@
1716
ABI_CFLAGS = @ABI_CFLAGS@
1817

Makefile.rules

+5-4
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ build/obj/%.c.o: %.c cnf/GAP-CFLAGS cnf/GAP-CPPFLAGS $(obj_deps)
425425
LINK=$(CC)
426426

427427
SHLIB_MAJOR = $(GAP_KERNEL_MAJOR_VERSION)
428-
ifeq ($(SYS_IS_CYGWIN32),yes)
428+
ifneq (,$(findstring cygwin,$(host_os)))
429429
SHLIB_EXT=.dll
430430
LIBGAP_FULL = libgap$(SHLIB_EXT)
431431

@@ -466,7 +466,7 @@ libgap: libgap$(SHLIB_EXT) $(LIBGAP_FULL)
466466
$(LIBGAP_FULL): $(OBJS) cnf/GAP-LDFLAGS cnf/GAP-LIBS cnf/GAP-OBJS
467467
$(QUIET_LINK)$(LINK) -o $@ $(LINK_SHLIB_FLAGS) $(GAP_LDFLAGS) $(OBJS) $(GAP_LIBS)
468468

469-
ifeq ($(SYS_IS_CYGWIN32),yes)
469+
ifneq (,$(findstring cygwin,$(host_os)))
470470

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

760760
zlib: $(ZLIB_FILES)
761-
ifeq ($(SYS_IS_CYGWIN32),yes)
761+
762+
ifneq (,$(findstring cygwin,$(host_os)))
762763
$(ZLIB_FILES):
763764
MAKE=$(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" $(srcdir)/cnf/build-cygwin-zlib.sh
764765

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

770-
endif # SYS_IS_CYGWIN32
771+
endif
771772

772773
.PHONY: zlib
773774

configure.ac

+1-10
Original file line numberDiff line numberDiff line change
@@ -932,19 +932,10 @@ GP_C_LONG_ALIGN
932932

933933
case "$host_cpu" in
934934
sparc* )
935-
AC_DEFINE([SPARC], [1], [define as 1 on SPARC architecture to flush register windows])
936-
SPARC=yes
935+
AC_DEFINE([SYS_IS_SPARC], [1], [define as 1 on SPARC architecture to flush register windows])
937936
;;
938937
esac
939938

940-
case "$host_os" in
941-
*cygwin*)
942-
CYGWIN=yes
943-
;;
944-
esac
945-
946-
AC_SUBST([SYS_IS_CYGWIN32], [$CYGWIN])
947-
948939

949940
dnl
950941
dnl check for the existence of various header files

dev/audit-config-h.sh

+2-3
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,14 @@ if git grep -n -w config.h -- :/src/*.h > /dev/null ; then
2121
fi
2222

2323
# First scan config.h to obtain a list of all symbols it might define. From
24-
# this is subtracts a list of "known OK" symbols. The symbols and there reason
24+
# this is subtracts a list of "known OK" symbols. The symbols and their reason
2525
# for being on this list are:
2626
# - `HAVE_FUNC_ATTRIBUTE_`*: these are only used for optimizations; also, our
2727
# headers try hard to define them on the fly (at least in GCC and clang)
2828
# - `HAVE___BUILTIN_MUL_OVERFLOW`: same as above
2929
# - `SIZEOF_VOID_P`: provided for backwards compatibility in a few packages,
3030
# and actually (re-)defined in `common.h`
31-
# - `SPARC`: only appears in a comment
32-
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' '|')
31+
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' '|')
3332
PATTERN=${PATTERN%?} # remove trailing "|"
3433

3534
# only consider files that do not #include config.h

src/gasman.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ UInt ResizeBag (
18931893

18941894
static jmp_buf RegsBags;
18951895

1896-
#if defined(SPARC)
1896+
#if defined(SYS_IS_SPARC)
18971897
static void SparcStackFuncBags(void)
18981898
{
18991899
asm (" ta 0x3 ");
@@ -1998,7 +1998,7 @@ static UInt CollectBags_Mark(UInt FullBags)
19981998

19991999
// mark from the stack
20002000
_setjmp(RegsBags);
2001-
#if defined(SPARC)
2001+
#if defined(SYS_IS_SPARC)
20022002
SparcStackFuncBags();
20032003
#endif
20042004
GenStackFuncBags();

0 commit comments

Comments
 (0)