mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 00:13:36 +08:00
build: Ensure mandatory compiler/linker flags
Make sure the flags are present in all build configurations.
This commit is contained in:
@@ -187,10 +187,10 @@ class Builder(builder.ModuleManager):
|
||||
conf.env['HAVE_%s' % l.upper()] = True
|
||||
else:
|
||||
bld.fatal('invalid config test: %s' % (configTest))
|
||||
section_flags = ["-fdata-sections", "-ffunction-sections"]
|
||||
_add_flags_if_not_present(conf.env.CFLAGS, section_flags)
|
||||
_add_flags_if_not_present(conf.env.CXXFLAGS, section_flags)
|
||||
_add_flags_if_not_present(conf.env.LINKFLAGS, ["-Wl,--gc-sections"])
|
||||
section_flags = ["-fdata-sections", "-ffunction-sections"]
|
||||
_add_flags_if_not_present(conf.env.CFLAGS, section_flags)
|
||||
_add_flags_if_not_present(conf.env.CXXFLAGS, section_flags)
|
||||
_add_flags_if_not_present(conf.env.LINKFLAGS, ["-Wl,--gc-sections"])
|
||||
|
||||
def build(self, bld):
|
||||
#
|
||||
|
Reference in New Issue
Block a user