Add option --enable-werror (#3038)
This adds configure option `--enable-werror` to `./configure` script which adds `-Werror` to build time CFLAGS.
This commit is contained in:
parent
e8fa0613db
commit
fb63f399ef
10
.github/workflows/ci-push.yml
vendored
10
.github/workflows/ci-push.yml
vendored
|
@ -37,6 +37,7 @@ jobs:
|
||||||
run: >
|
run: >
|
||||||
./configure
|
./configure
|
||||||
--prefix=$GITHUB_WORKSPACE/../racketcgc
|
--prefix=$GITHUB_WORKSPACE/../racketcgc
|
||||||
|
--enable-werror
|
||||||
$RACKET_EXTRA_CONFIGURE_ARGS
|
$RACKET_EXTRA_CONFIGURE_ARGS
|
||||||
--enable-cgcdefault
|
--enable-cgcdefault
|
||||||
--enable-jit
|
--enable-jit
|
||||||
|
@ -51,7 +52,7 @@ jobs:
|
||||||
working-directory: ./racket/src
|
working-directory: ./racket/src
|
||||||
run: |
|
run: |
|
||||||
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
make CFLAGS="-Werror -O2" -l $cpus -j $((cpus+1))
|
make -l $cpus -j $((cpus+1))
|
||||||
- name: Installing
|
- name: Installing
|
||||||
working-directory: ./racket/src
|
working-directory: ./racket/src
|
||||||
run: make -j $((cpus+1)) install
|
run: make -j $((cpus+1)) install
|
||||||
|
@ -122,7 +123,8 @@ jobs:
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
run: >
|
run: >
|
||||||
./configure
|
./configure
|
||||||
--prefix=$GITHUB_WORKSPACE/../racket3m
|
--prefix=$GITHUB_WORKSPACE/../racket3m
|
||||||
|
--enable-werror
|
||||||
$RACKET_EXTRA_CONFIGURE_ARGS
|
$RACKET_EXTRA_CONFIGURE_ARGS
|
||||||
--enable-racket=$GITHUB_WORKSPACE/../racketcgc/bin/racket
|
--enable-racket=$GITHUB_WORKSPACE/../racketcgc/bin/racket
|
||||||
--enable-foreign
|
--enable-foreign
|
||||||
|
@ -136,10 +138,10 @@ jobs:
|
||||||
working-directory: ./racket/src
|
working-directory: ./racket/src
|
||||||
run: |
|
run: |
|
||||||
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
export cpus=$(grep -c ^processor /proc/cpuinfo)
|
||||||
make CFLAGS="-Werror -O2" -l $cpus -j $((cpus+1))
|
make -l $cpus -j $((cpus+1))
|
||||||
- name: Installing
|
- name: Installing
|
||||||
working-directory: ./racket/src
|
working-directory: ./racket/src
|
||||||
run: make -j $((cpus+1)) install
|
run: make -j $((cpus+1)) install
|
||||||
# We build on Linux with clang and gcc and on MacOS with clang only.
|
# We build on Linux with clang and gcc and on MacOS with clang only.
|
||||||
# However, it makes little sense to test both builds on Linux so we tarball the
|
# However, it makes little sense to test both builds on Linux so we tarball the
|
||||||
# gcc build only. Therefore this condition ensure we only perform the tarball
|
# gcc build only. Therefore this condition ensure we only perform the tarball
|
||||||
|
|
|
@ -844,6 +844,7 @@ enable_gcov
|
||||||
enable_noopt
|
enable_noopt
|
||||||
enable_ubsan
|
enable_ubsan
|
||||||
enable_jitframe
|
enable_jitframe
|
||||||
|
enable_werror
|
||||||
enable_crossany
|
enable_crossany
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
|
@ -1508,6 +1509,7 @@ Optional Features:
|
||||||
--enable-noopt drop -O C flags (useful for low-level debugging)
|
--enable-noopt drop -O C flags (useful for low-level debugging)
|
||||||
--enable-ubsan compile with -fsanitize=undefined
|
--enable-ubsan compile with -fsanitize=undefined
|
||||||
--enable-jitframe x86_64: use frame pointer for internal calls
|
--enable-jitframe x86_64: use frame pointer for internal calls
|
||||||
|
--enable-werror compile sources with warnings as errors
|
||||||
--enable-crossany Record own cross target as machine-independent
|
--enable-crossany Record own cross target as machine-independent
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
|
@ -2909,6 +2911,12 @@ if test "${enable_jitframe+set}" = set; then :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-werror was given.
|
||||||
|
if test "${enable_werror+set}" = set; then :
|
||||||
|
enableval=$enable_werror;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check whether --enable-crossany was given.
|
# Check whether --enable-crossany was given.
|
||||||
if test "${enable_crossany+set}" = set; then :
|
if test "${enable_crossany+set}" = set; then :
|
||||||
enableval=$enable_crossany;
|
enableval=$enable_crossany;
|
||||||
|
@ -7021,6 +7029,11 @@ else
|
||||||
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Last but not least, if Werror was requested, add it now
|
||||||
|
if test "${enable_werror}" = "yes"; then
|
||||||
|
CFLAGS="-Werror ${CFLAGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
############## final output ################
|
############## final output ################
|
||||||
|
|
||||||
LIBS="$LIBS $EXTRALIBS"
|
LIBS="$LIBS $EXTRALIBS"
|
||||||
|
|
|
@ -81,6 +81,8 @@ AC_ARG_ENABLE(noopt, [ --enable-noopt drop -O C flags (useful for lo
|
||||||
m4_include(../ac/ubsan_arg.m4)
|
m4_include(../ac/ubsan_arg.m4)
|
||||||
AC_ARG_ENABLE(jitframe,[ --enable-jitframe x86_64: use frame pointer for internal calls])
|
AC_ARG_ENABLE(jitframe,[ --enable-jitframe x86_64: use frame pointer for internal calls])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(werror, [ --enable-werror compile sources with warnings as errors])
|
||||||
|
|
||||||
m4_include(../ac/crossany_arg.m4)
|
m4_include(../ac/crossany_arg.m4)
|
||||||
|
|
||||||
###### Some flags imply other flags #######
|
###### Some flags imply other flags #######
|
||||||
|
@ -1435,6 +1437,11 @@ else
|
||||||
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
FOREIGN_OBJSLIB="\$(FOREIGN_OBJS)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Last but not least, if Werror was requested, add it now
|
||||||
|
if test "${enable_werror}" = "yes"; then
|
||||||
|
CFLAGS="-Werror ${CFLAGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
############## final output ################
|
############## final output ################
|
||||||
|
|
||||||
LIBS="$LIBS $EXTRALIBS"
|
LIBS="$LIBS $EXTRALIBS"
|
||||||
|
|
|
@ -190,7 +190,7 @@ static Scheme_Object **ts_scheme_on_demand(Scheme_Object **rs) XFORM_SKIP_PROC
|
||||||
static int common0(mz_jit_state *jitter, void *_data)
|
static int common0(mz_jit_state *jitter, void *_data)
|
||||||
{
|
{
|
||||||
int in;
|
int in;
|
||||||
GC_CAN_IGNORE jit_insn *ref;
|
GC_CAN_IGNORE jit_insn *ref USED_ONLY_FOR_FUTURES;
|
||||||
|
|
||||||
/* *** check_arity_code *** */
|
/* *** check_arity_code *** */
|
||||||
/* Called as a function: */
|
/* Called as a function: */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user