From 3bf26ac51f76389217cf2f604ca2420bcc050acf Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 5 May 2013 16:48:05 -0700 Subject: [PATCH 1/3] Obsolete bogus EXTRAFLAGS, add language-specific flags overrides. --- makefiles/toolchain_gnu-arm-eabi.mk | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/makefiles/toolchain_gnu-arm-eabi.mk b/makefiles/toolchain_gnu-arm-eabi.mk index 32a2773732..efb6b432a0 100644 --- a/makefiles/toolchain_gnu-arm-eabi.mk +++ b/makefiles/toolchain_gnu-arm-eabi.mk @@ -98,6 +98,14 @@ INSTRUMENTATIONDEFINES = -finstrument-functions \ ARCHCFLAGS = -std=gnu99 ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x +# Compatibility +# XXX remove this once downstream users are fixed +# +ifneq ($(EXTRAFLAGS),) +$(warning EXTRAFLAGS is deprecated, use EXTRADEFINES for common pre-processor definitions. See also EXTRACFLAGS, EXTRACXXFLAGS and EXTRALDFLAGS.) +EXTRADEFINES += $(EXTRAFLAGS) +endif + # Generic warnings # ARCHWARNINGS = -Wall \ @@ -144,6 +152,7 @@ CFLAGS = $(ARCHCFLAGS) \ $(INSTRUMENTATIONDEFINES) \ $(ARCHDEFINES) \ $(EXTRADEFINES) \ + $(EXTRACFLAGS) \ -fno-common \ $(addprefix -I,$(INCLUDE_DIRS)) @@ -156,18 +165,22 @@ CXXFLAGS = $(ARCHCXXFLAGS) \ $(ARCHXXINCLUDES) \ $(INSTRUMENTATIONDEFINES) \ $(ARCHDEFINES) \ - $(EXTRADEFINES) \ -DCONFIG_WCHAR_BUILTIN \ + $(EXTRADEFINES) \ + $(EXTRACXXFLAGS) \ $(addprefix -I,$(INCLUDE_DIRS)) # Flags we pass to the assembler # -AFLAGS = $(CFLAGS) -D__ASSEMBLY__ +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ \ + $(EXTRADEFINES) \ + $(EXTRAAFLAGS) # Flags we pass to the linker # LDFLAGS += --warn-common \ --gc-sections \ + $(EXTRALDFLAGS) \ $(addprefix -T,$(LDSCRIPT)) \ $(addprefix -L,$(LIB_DIRS)) @@ -189,7 +202,7 @@ DEP_INCLUDES = $(subst .o,.d,$(OBJS)) define COMPILE @$(ECHO) "CC: $1" @$(MKDIR) -p $(dir $2) - $(Q) $(CC) -MD -c $(CFLAGS) $(EXTRAFLAGS) $(abspath $1) -o $2 + $(Q) $(CC) -MD -c $(CFLAGS) $(abspath $1) -o $2 endef # Compile C++ source $1 to $2 @@ -198,7 +211,7 @@ endef define COMPILEXX @$(ECHO) "CXX: $1" @$(MKDIR) -p $(dir $2) - $(Q) $(CXX) -MD -c $(CXXFLAGS) $(EXTRAFLAGS) $(abspath $1) -o $2 + $(Q) $(CXX) -MD -c $(CXXFLAGS) $(abspath $1) -o $2 endef # Assemble $1 into $2 @@ -206,7 +219,7 @@ endef define ASSEMBLE @$(ECHO) "AS: $1" @$(MKDIR) -p $(dir $2) - $(Q) $(CC) -c $(AFLAGS) $(EXTRAFLAGS) $(abspath $1) -o $2 + $(Q) $(CC) -c $(AFLAGS) $(abspath $1) -o $2 endef # Produce partially-linked $1 from files in $2 From 1ca535b94145c94db04d0655c2f4fb25c76a717a Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 5 May 2013 16:52:26 -0700 Subject: [PATCH 2/3] Fix whitespace damage, update help text to indicate the -m option is for debug use only. --- src/systemcmds/pwm/pwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systemcmds/pwm/pwm.c b/src/systemcmds/pwm/pwm.c index 08e6c88dfa..ff733df52f 100644 --- a/src/systemcmds/pwm/pwm.c +++ b/src/systemcmds/pwm/pwm.c @@ -78,7 +78,7 @@ usage(const char *reason) " Channel group that should update at the alternate rate (may be specified more than once)\n" " arm | disarm Arm or disarm the ouptut\n" " ... PWM output values in microseconds to assign to the PWM outputs\n" - " Directly supply alt rate channel mask\n" + " Directly supply alt rate channel mask (debug use only)\n" "\n" "When -c is specified, any channel groups not listed with -c will update at the default rate.\n" ); From 3b65281f00150eaa29cfec1d4a4cb86fc83c326d Mon Sep 17 00:00:00 2001 From: px4dev Date: Sun, 5 May 2013 17:19:23 -0700 Subject: [PATCH 3/3] Remove EXTRAFLAGS compatibility hack. --- makefiles/toolchain_gnu-arm-eabi.mk | 8 -------- 1 file changed, 8 deletions(-) diff --git a/makefiles/toolchain_gnu-arm-eabi.mk b/makefiles/toolchain_gnu-arm-eabi.mk index efb6b432a0..0e651e53c8 100644 --- a/makefiles/toolchain_gnu-arm-eabi.mk +++ b/makefiles/toolchain_gnu-arm-eabi.mk @@ -98,14 +98,6 @@ INSTRUMENTATIONDEFINES = -finstrument-functions \ ARCHCFLAGS = -std=gnu99 ARCHCXXFLAGS = -fno-exceptions -fno-rtti -std=gnu++0x -# Compatibility -# XXX remove this once downstream users are fixed -# -ifneq ($(EXTRAFLAGS),) -$(warning EXTRAFLAGS is deprecated, use EXTRADEFINES for common pre-processor definitions. See also EXTRACFLAGS, EXTRACXXFLAGS and EXTRALDFLAGS.) -EXTRADEFINES += $(EXTRAFLAGS) -endif - # Generic warnings # ARCHWARNINGS = -Wall \