Skip to content

Commit 369eb24

Browse files
committed
Merge remote-tracking branch 'upstream/gnucobol-3.x' into gcos4gnucobol-3.x
2 parents 6cc5a58 + 7824bb9 commit 369eb24

File tree

3 files changed

+47
-9
lines changed

3 files changed

+47
-9
lines changed

.github/workflows/macos.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
- name: configure
5353
run: |
5454
cd _build
55-
export CFLAGS="-Wno-unused-command-line-argument $CFLAGS"
5655
../configure --enable-cobc-internal-checks \
5756
--enable-hardening \
5857
--with-curses=ncurses \

ChangeLog

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11

2+
2025-02-11 Simon Sobisch <[email protected]>
3+
4+
* configure.ac: fix warning for \ in AC_CHECK_FUNCS by dropping them
5+
6+
2025-02-11 David Declerck <[email protected]>
7+
8+
* configure.ac: add -Wno-unused-command-line-argument to CFLAGS under
9+
Clang, to prevent some features to be mistakenly detected as missing
10+
(in particular -Wno-pointer-sign and -fstack-clash-protection)
11+
12+
2025-01-13 Simon Sobisch <[email protected]>
13+
14+
* configure.ac: only check for IBM/OpenWatcom/Sun's C compilers if not
15+
running under GCC / clang
16+
217
2024-12-08 Simon Sobisch <[email protected]>
318

419
* configure.ac: fix check for curses functions if panel headers are found
@@ -1635,7 +1650,7 @@
16351650
* Version 0.9 released.
16361651

16371652

1638-
Copyright 2002-2024 Free Software Foundation, Inc.
1653+
Copyright 2002-2025 Free Software Foundation, Inc.
16391654

16401655
Copying and distribution of this file, with or without modification, are
16411656
permitted provided the copyright notice and this notice are preserved.

configure.ac

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ AC_ARG_WITH([bugurl],
113113
# or:
114114
# options to configure: CFLAGS=-m64 LDFLAGS="-m64 -L/usr/local/lib/sparcv9"
115115
#
116+
# Note for IBM (Mainfraime) on USS
117+
# options to configure: CC="xlc -q64" CFLAGS="-qlanglvl=extc1x" OBJECT_MODE=64 AR=ar NM=nm
118+
#
116119
# Hack for AIX 64 bit (gcc)
117120
# Required -
118121
# options to configure: CC="gcc -maix64" / CC="xlc -q64"
@@ -461,17 +464,31 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
461464
# error macro not defined
462465
#endif]])],
463466
[COB_USES_CLANG_ONLY=yes
467+
CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
464468
AC_MSG_RESULT([yes])],
465469
[AC_MSG_RESULT([no])])
466470

467-
AC_MSG_CHECKING([for __xlc__])
471+
AS_IF([test "x$COB_USES_GCC$COB_USES_ICC_ONLY$COB_USES_CLANG_ONLY" = xnonono], [
472+
473+
AC_MSG_CHECKING([for __IBMC__])
468474
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
469-
#ifndef __xlc__
475+
#ifndef __IBMC__
470476
# error macro not defined
471477
#endif]])],
472478
[COB_USES_XLC_ONLY=yes
473479
AC_MSG_RESULT([yes])],
474-
[AC_MSG_RESULT([no])])
480+
[
481+
AC_MSG_CHECKING([for __xlc__])
482+
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
483+
#ifndef __xlc__
484+
# error macro not defined
485+
#endif]])],
486+
[COB_USES_XLC_ONLY=yes
487+
AC_MSG_RESULT([yes])],
488+
[AC_MSG_RESULT([no])])
489+
])
490+
491+
AS_IF([test "x$COB_USES_XLC_ONLY" = xno], [
475492
476493
AC_MSG_CHECKING([for __WATCOMC__])
477494
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -480,7 +497,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
480497
#endif]])],
481498
[COB_USES_WATCOMC_ONLY=yes
482499
AC_MSG_RESULT([yes])],
483-
[AC_MSG_RESULT([no])])
500+
[AC_MSG_RESULT([no])
484501
485502
AC_MSG_CHECKING([for __SUNPRO_C])
486503
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -490,6 +507,13 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
490507
[COB_USES_SUNPRO_C_ONLY=yes
491508
AC_MSG_RESULT([yes])],
492509
[AC_MSG_RESULT([no])])
510+
])
511+
512+
])
513+
514+
])
515+
516+
493517

494518
curr_cflags="$CFLAGS"
495519
AC_CACHE_CHECK([how to error on warnings during configure checks], gc_cv_err_warn, [
@@ -673,9 +697,9 @@ AC_DEFINE_UNQUOTED([COB_KEYWORD_INLINE], [$gc_cv_keyword_inline])
673697

674698
# Checks for library functions.
675699
AC_FUNC_VPRINTF
676-
AC_CHECK_FUNCS([memmove memset setlocale fcntl strerror strcasecmp \
677-
strchr strrchr strdup strstr strtol gettimeofday localeconv \
678-
getexecname canonicalize_file_name popen raise readlink realpath \
700+
AC_CHECK_FUNCS([memmove memset setlocale fcntl strerror strcasecmp
701+
strchr strrchr strdup strstr strtol gettimeofday localeconv
702+
getexecname canonicalize_file_name popen raise readlink realpath
679703
setenv strcoll flockfile])
680704

681705
# more things to save...

0 commit comments

Comments
 (0)