summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-25 15:26:35 (GMT)
committerGitHub <noreply@github.com>2020-11-25 15:26:35 (GMT)
commitffcb3542377c62cf972ff683c101e7268332f8a0 (patch)
tree13169e6a49d7e44298203afa99028b7efb791d29
parent7b9c5e124ba8e5ca4a44fa57e90f291b043a0eb2 (diff)
downloadhdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.zip
hdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.tar.gz
hdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.tar.bz2
Minor/solaris gcc fix (#126)
* Adds gnu99 as the standard when building with gcc on Solaris * Adds a note to RELEASE.txt and improves comments For Solaris + gcc fix (HDFFV-11191)
-rw-r--r--config/gnu-flags12
-rw-r--r--release_docs/RELEASE.txt13
2 files changed, 21 insertions, 4 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 7cf90b8..5c6745c 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -118,12 +118,16 @@ if test "X-gcc" = "X-$cc_vendor"; then
esac
case "$host_os-$host_cpu" in
- # cygwin needs the "-std=c99" flag removed, so make
- # a specific case for Cygwin without the flag and a default
- # case to add the flag everywhere else
+ # Cygwin needs the "-std=c99" flag removed.
cygwin-*)
;;
-
+ # On Solaris, gcc needs the gnu99 standard to pick up certain POSIX
+ # things. Do NOT use this as the gcc norm as this encourages the use
+ # of non-standard gcc extensions.
+ *solaris*)
+ H5_CFLAGS="$H5_CFLAGS -std=gnu99"
+ ;;
+ # Everybody else gets c99 as the standard.
*)
H5_CFLAGS="$H5_CFLAGS -std=c99"
;;
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 67fbe51..690635a 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -47,6 +47,19 @@ New Features
Configuration:
-------------
+ - Fixed POSIX problems when building w/ gcc on Solaris
+
+ When building on Solaris using gcc, the POSIX symbols were not
+ being set correctly, which could lead to issues like clock_gettime()
+ not being found.
+
+ The standard is now set to gnu99 when building with gcc on Solaris,
+ which allows POSIX things to be #defined and linked correctly. This
+ differs slightly from the gcc norm, where we set the standard to c99
+ and manually set POSIX #define symbols.
+
+ (DER - 2020/11/25, HDFFV-11191)
+
- Added a configure-time option to consider certain compiler warnings
as errors