]> rtime.felk.cvut.cz Git - omk.git/commitdiff
Allow to define if default compiler provided startup file is linked into binary.
authorPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 29 May 2011 19:47:18 +0000 (21:47 +0200)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Sun, 29 May 2011 19:47:18 +0000 (21:47 +0200)
The use of standard startup files is required for MSP430
target, because there it is useless and complicated
to provide BSP specific one.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
snippets/sysless.omk

index fdd4889aef4a8cec7ef11a716f73b51eb99ac3a0..e55a0ae2e8178911cc9756b726b9f5555a52844c 100644 (file)
@@ -20,6 +20,8 @@
 #                     should be used for linking (e.g. ram flash). If this is not
 #                    specified, then the value of DEFAULT_LD_SCRIPT_VARIANT from config.target is used.
 # PREFIX_DIR       .. Prefix to  directories in _compiled and _build. Used in config.omk.
+# TARGET_STDSTARTFILES .. if left unset or set to `n', startup file provided
+#                     by compiler is supressed
 
 BUILD_DIR_NAME = _build$(addprefix /,$(PREFIX_DIR))
 COMPILED_DIR_NAME = _compiled$(addprefix /,$(PREFIX_DIR))
@@ -61,9 +63,18 @@ endif
 # Rules for compilation for target
 ifdef TARGET_RULE_TEMPLATES
 
+ifeq ($(TARGET_STDSTARTFILES),)
+TARGET_STDSTARTFILES=n
+endif
+
+ifneq ($(TARGET_STDSTARTFILES),y)
 LDFLAGS += -nostartfiles
+ifneq ($(TARGET_STDSTARTFILES),n)
+LDFLAGS += $(TARGET_STDSTARTFILES)
+endif
+endif
 
- # FIXME: These are not used. What they are good for?
+# FIXME: These are not used. What they are good for?
 LIB_CPPFLAGS += $(CPPFLAGS)
 LIB_CFLAGS   += $(CFLAGS)