aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2022-05-16 18:32:51 +0200
committerXiretza <xiretza@xiretza.xyz>2022-05-16 18:47:33 +0200
commit9217cecc8bee7b2a6759f38eafb823703c9d0617 (patch)
tree0dc5a5acf762c74e59378b783fc272b83ab3705a
parentc2475bd22f647ebea751171fc6376e0b2c872fb7 (diff)
downloadghdl-9217cecc8bee7b2a6759f38eafb823703c9d0617.tar.gz
ghdl-9217cecc8bee7b2a6759f38eafb823703c9d0617.tar.bz2
ghdl-9217cecc8bee7b2a6759f38eafb823703c9d0617.zip
fix(configure): disable -Werror by default
Because the build system does not have direct control over the compiler, it cannot ensure that no warnings are issued in downstream compilations. Such warnings can occur due to newer compiler versions with more sophisticated diagnostics, older compiler versions with diagnostics bugs, or simply different, untested compilers. With -Werror enabled by default, these harmless warnings result in complete compilation failures. The option remains enabled in CI to ensure upstream code quality.
-rw-r--r--.github/workflows/Test.yml4
-rwxr-xr-xconfigure2
-rwxr-xr-xscripts/ci-run.sh2
-rw-r--r--scripts/msys2-llvm/PKGBUILD1
-rw-r--r--scripts/msys2-mcode/PKGBUILD1
5 files changed, 7 insertions, 3 deletions
diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml
index 18f06619d..0ede8cee3 100644
--- a/.github/workflows/Test.yml
+++ b/.github/workflows/Test.yml
@@ -28,7 +28,7 @@ jobs:
run: |
docker run --rm -i -v $(pwd):/src -w /src ghdl/debug:base <<'EOF'
#!/usr/bin/env sh
- ./configure && make && make install
+ ./configure --enable-werror && make && make install
gnatdoc -P./ghdl
EOF
@@ -53,7 +53,7 @@ jobs:
docker build -t ghdl/doc . -f- <<-EOF
FROM ghdl/build:doc
COPY . /opt/ghdl
- RUN cd /opt/ghdl && ./configure && make && make install
+ RUN cd /opt/ghdl && ./configure --enable-werror && make && make install
EOF
- name: '📥 Download artifact: gnatdoc'
diff --git a/configure b/configure
index 49edf2f7d..715027445 100755
--- a/configure
+++ b/configure
@@ -42,7 +42,7 @@ backtrace_lib=
llvm_be=llvm6
build=
build_mode=
-enable_werror=true
+enable_werror=false
enable_checks=true
enable_gplcompat=unknown
enable_libghdl=true
diff --git a/scripts/ci-run.sh b/scripts/ci-run.sh
index 368224085..ecfd6e358 100755
--- a/scripts/ci-run.sh
+++ b/scripts/ci-run.sh
@@ -202,6 +202,8 @@ build () {
mkdir "build-$BACK"
cd "build-$BACK"
+ CONFIG_OPTS+=" --enable-werror"
+
if [ "x$ISSYNTH" = "xfalse" ]; then
CONFIG_OPTS+=" --disable-synth"
fi
diff --git a/scripts/msys2-llvm/PKGBUILD b/scripts/msys2-llvm/PKGBUILD
index 0c7848209..91aba6f59 100644
--- a/scripts/msys2-llvm/PKGBUILD
+++ b/scripts/msys2-llvm/PKGBUILD
@@ -28,6 +28,7 @@ build() {
--prefix=${MINGW_PREFIX} \
--with-llvm-config="llvm-config --link-static" \
LDFLAGS="-static" \
+ --enable-werror \
--enable-libghdl \
--enable-synth
make GNATMAKE="gnatmake -j$(nproc)"
diff --git a/scripts/msys2-mcode/PKGBUILD b/scripts/msys2-mcode/PKGBUILD
index 7c77fbf75..1e01fa613 100644
--- a/scripts/msys2-mcode/PKGBUILD
+++ b/scripts/msys2-mcode/PKGBUILD
@@ -24,6 +24,7 @@ build() {
../../../../configure \
--prefix=${MINGW_PREFIX} \
LDFLAGS="-static -Wl,--stack=8388608" \
+ --enable-werror \
--enable-libghdl \
--enable-synth
make GNATMAKE="gnatmake -j$(nproc)"