Skip to content

Commit

Permalink
Bug 1386077 - Compile freebl using -std=gnu99 for all C compilers on …
Browse files Browse the repository at this point in the history
…Linux. r=mt,kaie

Summary:
Compilation of the HaCl* formally verified C code requires C99 syntax for loops.
This patch enables GNU C99 syntax on all C compilers for Linux by passing -std=gnu99.

Reviewers: kaie, franziskus

Subscribers: mt, bbeurdouche

Differential Revision: https://nss-review.dev.mozaws.net/D388
  • Loading branch information
Benjamin Beurdouche authored and ekr committed Aug 2, 2017
1 parent 0875aae commit 18e5074
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/freebl/config.mk
Expand Up @@ -90,7 +90,12 @@ EXTRA_SHARED_LIBS += \
endif
endif

ifeq ($(OS_ARCH), Linux)
CFLAGS += -std=gnu99
endif

ifeq ($(OS_ARCH), Darwin)
CFLAGS += -std=gnu99
EXTRA_SHARED_LIBS += -dylib_file @executable_path/libplc4.dylib:$(DIST)/lib/libplc4.dylib -dylib_file @executable_path/libplds4.dylib:$(DIST)/lib/libplds4.dylib
endif

Expand Down
4 changes: 4 additions & 0 deletions lib/freebl/freebl.gyp
Expand Up @@ -166,6 +166,7 @@
'OTHER_CFLAGS': [
'-mpclmul',
'-maes',
'-std=gnu99',
],
},
}],
Expand Down Expand Up @@ -232,6 +233,9 @@
'FREEBL_LOWHASH',
'FREEBL_NO_DEPEND',
],
'cflags': [
'-std=gnu99',
],
}],
[ 'OS=="linux" or OS=="android"', {
'conditions': [
Expand Down

0 comments on commit 18e5074

Please sign in to comment.