Skip to content

Commit 6122bed

Browse files
committed
default_makefiles: templates: Remove hardcoded C/C++ standard version
Let the user decide. Currently the ARM toolchain defaults to gnu17, so this change won't change anything. However, when GCC gets updated, it will affect projects with C/C++ compatibility issues. This is rarely a problem in C projects, but it can be a bit more problematic in C++ projects. Users that want to keep using old standards will need to manually set it to the right standard in their makefiles. The Teak toolchain is a bit older and it will probably stay like that for the time being, so no change has been done to the Teak makefiles.
1 parent 70e467d commit 6122bed

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

sys/default_makefiles/rom_arm9/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
133133
$(ARCH) -ffunction-sections -fdata-sections \
134134
-specs=$(SPECS)
135135

136-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
136+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
137137
$(ARCH) -O2 -ffunction-sections -fdata-sections \
138138
-specs=$(SPECS)
139139

140-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
140+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
141141
$(ARCH) -O2 -ffunction-sections -fdata-sections \
142142
-fno-exceptions -fno-rtti \
143143
-specs=$(SPECS)

sys/default_makefiles/rom_arm9arm7/Makefile.arm7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
9191
$(ARCH) -ffunction-sections -fdata-sections \
9292
-specs=$(SPECS)
9393

94-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
94+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
9595
$(ARCH) -O2 -ffunction-sections -fdata-sections \
9696
-specs=$(SPECS)
9797

98-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
98+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
9999
$(ARCH) -O2 -ffunction-sections -fdata-sections \
100100
-fno-exceptions -fno-rtti \
101101
-specs=$(SPECS)

sys/default_makefiles/rom_arm9arm7/Makefile.arm9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
104104
$(ARCH) -ffunction-sections -fdata-sections \
105105
-specs=$(SPECS)
106106

107-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
107+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
108108
$(ARCH) -O2 -ffunction-sections -fdata-sections \
109109
-specs=$(SPECS)
110110

111-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
111+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
112112
$(ARCH) -O2 -ffunction-sections -fdata-sections \
113113
-fno-exceptions -fno-rtti \
114114
-specs=$(SPECS)

sys/default_makefiles/rom_arm9arm7teak/Makefile.arm7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
9191
$(ARCH) -ffunction-sections -fdata-sections \
9292
-specs=$(SPECS)
9393

94-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
94+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
9595
$(ARCH) -O2 -ffunction-sections -fdata-sections \
9696
-specs=$(SPECS)
9797

98-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
98+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
9999
$(ARCH) -O2 -ffunction-sections -fdata-sections \
100100
-fno-exceptions -fno-rtti \
101101
-specs=$(SPECS)

sys/default_makefiles/rom_arm9arm7teak/Makefile.arm9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
104104
$(ARCH) -ffunction-sections -fdata-sections \
105105
-specs=$(SPECS)
106106

107-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
107+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
108108
$(ARCH) -O2 -ffunction-sections -fdata-sections \
109109
-specs=$(SPECS)
110110

111-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
111+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
112112
$(ARCH) -O2 -ffunction-sections -fdata-sections \
113113
-fno-exceptions -fno-rtti \
114114
-specs=$(SPECS)

sys/default_makefiles/rom_arm9teak/Makefile.arm9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,11 @@ ASFLAGS += -x assembler-with-cpp $(INCLUDEFLAGS) $(DEFINES) \
104104
$(ARCH) -ffunction-sections -fdata-sections \
105105
-specs=$(SPECS)
106106

107-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
107+
CFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
108108
$(ARCH) -O2 -ffunction-sections -fdata-sections \
109109
-specs=$(SPECS)
110110

111-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
111+
CXXFLAGS += $(WARNFLAGS) $(INCLUDEFLAGS) $(DEFINES) \
112112
$(ARCH) -O2 -ffunction-sections -fdata-sections \
113113
-fno-exceptions -fno-rtti \
114114
-specs=$(SPECS)

templates/dldi/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ ASFLAGS += -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
105105
$(ARCH) -ffunction-sections -fdata-sections \
106106
-specs=$(SPECS)
107107

108-
CFLAGS += -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
108+
CFLAGS += $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
109109
$(ARCH) -O2 -ffunction-sections -fdata-sections \
110110
-specs=$(SPECS)
111111

112-
CXXFLAGS += -std=gnu++17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
112+
CXXFLAGS += $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
113113
$(ARCH) -O2 -ffunction-sections -fdata-sections \
114114
-fno-exceptions -fno-rtti \
115115
-specs=$(SPECS)

templates/library_arm9_only/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ ASFLAGS += -g -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
8787
$(ARCH) -ffunction-sections -fdata-sections \
8888
-specs=$(SPECS)
8989

90-
CFLAGS += -g -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
90+
CFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
9191
$(ARCH) -O2 -ffunction-sections -fdata-sections \
9292
-specs=$(SPECS)
9393

94-
CXXFLAGS += -g -std=gnu++17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
94+
CXXFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
9595
$(ARCH) -O2 -ffunction-sections -fdata-sections \
9696
-fno-exceptions -fno-rtti \
9797
-specs=$(SPECS)

templates/library_combined/Makefile.arm7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ ASFLAGS += -g -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
7373
$(ARCH) -ffunction-sections -fdata-sections \
7474
-specs=$(SPECS)
7575

76-
CFLAGS += -g -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
76+
CFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
7777
$(ARCH) -O2 -ffunction-sections -fdata-sections \
7878
-specs=$(SPECS)
7979

80-
CXXFLAGS += -g -std=gnu++17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
80+
CXXFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
8181
$(ARCH) -O2 -ffunction-sections -fdata-sections \
8282
-fno-exceptions -fno-rtti \
8383
-specs=$(SPECS)

templates/library_combined/Makefile.arm9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ ASFLAGS += -g -x assembler-with-cpp $(DEFINES) $(INCLUDEFLAGS) \
8484
$(ARCH) -ffunction-sections -fdata-sections \
8585
-specs=$(SPECS)
8686

87-
CFLAGS += -g -std=gnu17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
87+
CFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
8888
$(ARCH) -O2 -ffunction-sections -fdata-sections \
8989
-specs=$(SPECS)
9090

91-
CXXFLAGS += -g -std=gnu++17 $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
91+
CXXFLAGS += -g $(WARNFLAGS) $(DEFINES) $(INCLUDEFLAGS) \
9292
$(ARCH) -O2 -ffunction-sections -fdata-sections \
9393
-fno-exceptions -fno-rtti \
9494
-specs=$(SPECS)

0 commit comments

Comments
 (0)