Skip to content

Commit

Permalink
gcc: make incompatible-pointer-types as warning
Browse files Browse the repository at this point in the history
gcc 14 changed `incompatible-pointer-types` from warning to error
for now, make it as warning to avoid build failure
  • Loading branch information
naveen521kk committed Jul 11, 2024
1 parent 4cb2d1a commit 99418ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -823,10 +823,10 @@ $(BUILDPYTHON): Programs/python.o $(LINK_PYTHON_DEPS) python_exe.o
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -municode -o $@ Programs/python.o $(LINK_PYTHON_OBJS) $(LIBS) $(MODLIBS) $(SYSLIBS) python_exe.o

$(BUILDVENVLAUNCHER): $(BUILDPYTHON) venvlauncher.o $(srcdir)/PC/launcher.c
$(LINKCC) -D_CONSOLE -DVENV_REDIRECT -DPYTHON_EXECUTABLE_WITH_VERSION="L\"python$(LDVERSION)$(EXE)\"" -municode -static -static-libgcc -static-libstdc++ venvlauncher.o $(srcdir)/PC/launcher.c -o $@ -lversion
$(LINKCC) -D_CONSOLE -DVENV_REDIRECT -DPYTHON_EXECUTABLE_WITH_VERSION="L\"python$(LDVERSION)$(EXE)\"" -Wno-error=incompatible-pointer-types -municode -static -static-libgcc -static-libstdc++ venvlauncher.o $(srcdir)/PC/launcher.c -o $@ -lversion

$(BUILDVENVWLAUNCHER): $(BUILDPYTHONW) venvwlauncher.o $(srcdir)/PC/launcher.c
$(LINKCC) -D_WINDOWS -DVENV_REDIRECT -DPYTHON_EXECUTABLE_WITH_VERSION="L\"pythonw$(LDVERSION)$(EXE)\"" -mwindows -municode -static -static-libgcc -static-libstdc++ venvwlauncher.o $(srcdir)/PC/launcher.c -o $@ -lversion
$(LINKCC) -D_WINDOWS -DVENV_REDIRECT -DPYTHON_EXECUTABLE_WITH_VERSION="L\"pythonw$(LDVERSION)$(EXE)\"" -Wno-error=incompatible-pointer-types -mwindows -municode -static -static-libgcc -static-libstdc++ venvwlauncher.o $(srcdir)/PC/launcher.c -o $@ -lversion

platform: $(PYTHON_FOR_BUILD_DEPS) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
Expand Down
8 changes: 8 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2496,6 +2496,14 @@ case $GCC in
yes)
CFLAGS_NODIST="$CFLAGS_NODIST -std=c11"

# GCC 14 and later error out with incompatible-pointer-types
# this only occues on mingw
case $host in
*-*-mingw*)
CFLAGS_NODIST="$CFLAGS_NODIST -Wno-error=incompatible-pointer-types"
;;
esac

PY_CHECK_CC_WARNING([enable], [extra], [if we can add -Wextra])
AS_VAR_IF([ac_cv_enable_extra_warning], [yes],
[CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"])
Expand Down

0 comments on commit 99418ea

Please sign in to comment.