mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Restore Solaris build after introducing 'noreturn' (re: c4f980eb
)
The build started failing on Solaris Studio cc when 'noreturn' was
introduced, because the wrappers pass the -xc99 flag which sets the
compiler to C99 mode. 'noreturn' is a C11 feature. The
stdnoreturn.h header was correctly included but the compiler still
threw a syntax error (long path abbreviated below):
".../stk.c", line 124: warning: _Noreturn is a keyword in ISO C11
".../stk.c", line 124: warning: old-style declaration or incorrect
type for: _Noreturn
".../stk.c", line 124: syntax error before or at: static
src/cmd/INIT/cc.sol11.*:
- Pass -std=c11 to cc instead of -xc99. At least on i386-64, this
is sufficient to fix the build.
README.md, src/cmd/ksh93/README.md:
- Remove -xc99 from the Solaris build flags example as that is
incompatible with -std=c11 (and was already redundant with the
-xc99 in the wrappers).
src/cmd/ksh93/tests/basic.sh:
- Don't run a newly backported 93v- regression test on Solaris
because it uses the 'join' command with process subsitutions;
Solaris 11.4's join(1) hangs when trying to read from /dev/fd.
This is not ksh's fault. (re: 59bacfd4
)
This commit is contained in:
parent
bf76268d24
commit
ac56614a95
7 changed files with 13 additions and 10 deletions
|
@ -82,7 +82,7 @@ convenient way to keep them consistent between build and test commands.
|
|||
**Note that this system uses `CCFLAGS` instead of the usual `CFLAGS`.**
|
||||
An example that makes Solaris Studio cc produce a 64-bit binary:
|
||||
```sh
|
||||
export CCFLAGS="-xc99 -m64 -O" LDFLAGS="-m64"
|
||||
export CCFLAGS="-m64 -O" LDFLAGS="-m64"
|
||||
bin/package make
|
||||
```
|
||||
Alternatively you can append these to the command, and they will only be
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
: solaris.i386 cc wrapper for reasonable ansi C defaults and 32 bit : 2021-01-17 :
|
||||
: solaris.i386 cc wrapper for 32 bit : 2021-05-12 :
|
||||
|
||||
HOSTTYPE=sol11.i386
|
||||
|
||||
|
@ -15,4 +15,4 @@ esac
|
|||
|
||||
# Note: the _XPG6 macro is now defined in src/lib/libast/features/common
|
||||
|
||||
$CC_EXPLICIT -m32 -xc99 "$@"
|
||||
$CC_EXPLICIT -m32 -std=c11 "$@"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
: solaris.i386-64 cc wrapper for reasonable ansi C defaults and 64 bit : 2021-01-17 :
|
||||
: solaris.i386-64 cc wrapper for 64 bit : 2021-05-12 :
|
||||
|
||||
HOSTTYPE=sol11.i386-64
|
||||
|
||||
|
@ -15,4 +15,4 @@ esac
|
|||
|
||||
# Note: the _XPG6 macro is now defined in src/lib/libast/features/common
|
||||
|
||||
$CC_EXPLICIT -m64 -xc99 "$@"
|
||||
$CC_EXPLICIT -m64 -std=c11 "$@"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
: solaris.sparc cc wrapper for reasonable ansi C defaults and 32 bit : 2021-01-17 :
|
||||
: solaris.sparc cc wrapper for 32 bit : 2021-05-12 :
|
||||
|
||||
HOSTTYPE=sol11.sparc
|
||||
|
||||
|
@ -15,4 +15,4 @@ esac
|
|||
|
||||
# Note: the _XPG6 macro is now defined in src/lib/libast/features/common
|
||||
|
||||
$CC_EXPLICIT -m32 -xc99 "$@"
|
||||
$CC_EXPLICIT -m32 -std=c11 "$@"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
: solaris.sparc-64 cc wrapper for reasonable ansi C defaults and 64 bit : 2021-01-17 :
|
||||
: solaris.sparc-64 cc wrapper for 64 bit : 2021-05-12 :
|
||||
|
||||
HOSTTYPE=sol11.sparc-64
|
||||
|
||||
|
@ -15,4 +15,4 @@ esac
|
|||
|
||||
# Note: the _XPG6 macro is now defined in src/lib/libast/features/common
|
||||
|
||||
$CC_EXPLICIT -m64 -xc99 "$@"
|
||||
$CC_EXPLICIT -m64 -std=c11 "$@"
|
||||
|
|
|
@ -161,7 +161,7 @@ way to keep them consistent between build and test commands. Note that this
|
|||
system uses CCFLAGS instead of the usual CFLAGS. An example that makes
|
||||
Solaris Studio cc produce a 64-bit binary:
|
||||
|
||||
export CCFLAGS="-xc99 -m64 -O" LDFLAGS="-m64"
|
||||
export CCFLAGS="-m64 -O" LDFLAGS="-m64"
|
||||
bin/package make
|
||||
|
||||
Alternatively you can append these to the command, and they will only be
|
||||
|
|
|
@ -826,11 +826,14 @@ expect_status=2
|
|||
# ======
|
||||
# Test for illegal seek error (ksh93v- regression)
|
||||
# https://www.mail-archive.com/ast-users@lists.research.att.com/msg00816.html
|
||||
if [[ $(uname -s) != SunOS ]] # Solaris 11.4 join(1) hangs on this test -- not ksh's fault
|
||||
then
|
||||
exp='1
|
||||
2'
|
||||
got="$(join <(printf '%d\n' 1 2) <(printf '%d\n' 1 2))"
|
||||
[[ $exp == $got ]] || err_exit "pipeline fails with illegal seek error" \
|
||||
"(expected $(printf %q "$exp"), got $(printf %q "$got"))"
|
||||
fi # $(uname -s) != SunOS
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
Loading…
Reference in a new issue