diff mbox series

[RFC,3/3] .travis.yml: ensure we support C99 on old compilers

Message ID 20180810171102.16451-4-alex.bennee@linaro.org
State New
Headers show
Series tweaks for QEMU's C standard | expand

Commit Message

Alex Bennée Aug. 10, 2018, 5:11 p.m. UTC
The default Travis gcc is so old it default to -std=gnu89 which will
fall over on some c99ism you are allowed to use in the QEMU source
tree. As we also use some GNU extensions make it -std=gnu99 instead of
-std=c99.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Philippe Mathieu-Daudé Aug. 10, 2018, 5:24 p.m. UTC | #1
On 08/10/2018 02:11 PM, Alex Bennée wrote:
> The default Travis gcc is so old it default to -std=gnu89 which will

> fall over on some c99ism you are allowed to use in the QEMU source

> tree. As we also use some GNU extensions make it -std=gnu99 instead of

> -std=c99.

> 

> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


> ---

>  .travis.yml | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/.travis.yml b/.travis.yml

> index 95be6ec59f..9c61750be0 100644

> --- a/.travis.yml

> +++ b/.travis.yml

> @@ -72,7 +72,7 @@ before_install:

>    - git submodule update --init --recursive capstone dtc ui/keycodemapdb

>  before_script:

>    - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}

> -  - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; }

> +  - ${SRC_DIR}/configure ${CONFIG} --extra-cflags=-std=gnu99 || { cat config.log && exit 1; }

>  script:

>    - make ${MAKEFLAGS} && ${TEST_CMD}

>  matrix:

>
diff mbox series

Patch

diff --git a/.travis.yml b/.travis.yml
index 95be6ec59f..9c61750be0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -72,7 +72,7 @@  before_install:
   - git submodule update --init --recursive capstone dtc ui/keycodemapdb
 before_script:
   - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
-  - ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; }
+  - ${SRC_DIR}/configure ${CONFIG} --extra-cflags=-std=gnu99 || { cat config.log && exit 1; }
 script:
   - make ${MAKEFLAGS} && ${TEST_CMD}
 matrix: