[Scummvm-git-logs] scummvm master -> a8f270eb25d23a970feecac0965f567baad62d93
lephilousophe
lephilousophe at users.noreply.github.com
Tue Jun 2 17:48:01 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a8f270eb25 DS: Fix build of C files when specifying -ansi in CXXFLAGS
Commit: a8f270eb25d23a970feecac0965f567baad62d93
https://github.com/scummvm/scummvm/commit/a8f270eb25d23a970feecac0965f567baad62d93
Author: Philippe Valembois (lephilousophe at users.sourceforge.net)
Date: 2020-06-02T19:47:57+02:00
Commit Message:
DS: Fix build of C files when specifying -ansi in CXXFLAGS
Compiling externally provided C files using CXXFLAGS makes build fail
when specifying -ansi because files are not ANSI C compliant.
configure script don't provide a CFLAGS variable so we just override
using -std flag
Changed paths:
backends/platform/ds/ds.mk
diff --git a/backends/platform/ds/ds.mk b/backends/platform/ds/ds.mk
index 18feea00c2..83cf8d8213 100644
--- a/backends/platform/ds/ds.mk
+++ b/backends/platform/ds/ds.mk
@@ -195,9 +195,11 @@ ARM7_LDFLAGS := -g $(ARM7_ARCH) -mfloat-abi=soft
# We do this because it is a .c file, not a .cpp file and so is outside our
# regular build system anyway. But this is *bad*. It should be changed into a
# .cpp file and this rule be removed.
+# Redefining -std there as we are using CXXFLAGS which specifies -ansi or -std=c++11
+# Using gnu90 as library code doesn't conform to standards
%.o: %.c
$(MKDIR) $(*D)/$(DEPDIR)
- $(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+ $(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -std=gnu90 -c $(<) -o $*.o
# Set custom build flags for cartreset.o
$(ndsdir)/arm7/source/libcartreset/cartreset.o: CXXFLAGS=$(ARM7_CFLAGS)
More information about the Scummvm-git-logs
mailing list