Merge pull request #16143 from kfessel/p-optimize-native
board/native: add basic debugging compatible optimization
This commit is contained in:
commit
399ada9968
@ -20,9 +20,17 @@ export CGANNOTATE ?= cg_annotate
|
|||||||
export GPROF ?= gprof
|
export GPROF ?= gprof
|
||||||
|
|
||||||
# basic cflags:
|
# basic cflags:
|
||||||
CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG)
|
CFLAGS += -Wall -Wextra -pedantic $(CFLAGS_DBG) $(CFLAGS_OPT)
|
||||||
|
CFLAGS += -U_FORTIFY_SOURCE
|
||||||
CFLAGS_DBG ?= -g3
|
CFLAGS_DBG ?= -g3
|
||||||
|
|
||||||
|
ifneq (,$(filter backtrace,$(USEMODULE)))
|
||||||
|
$(warning module backtrace is used, do not omit frame pointers)
|
||||||
|
CFLAGS_OPT ?= -Og -fno-omit-frame-pointer
|
||||||
|
else
|
||||||
|
CFLAGS_OPT ?= -Og
|
||||||
|
endif
|
||||||
|
|
||||||
# default std set to gnu11 if not overwritten by user
|
# default std set to gnu11 if not overwritten by user
|
||||||
ifeq (,$(filter -std=%, $(CFLAGS)))
|
ifeq (,$(filter -std=%, $(CFLAGS)))
|
||||||
CFLAGS += -std=gnu11
|
CFLAGS += -std=gnu11
|
||||||
|
|||||||
@ -287,7 +287,7 @@ static int _tee(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
#else
|
#else
|
||||||
int fd = open(argv[1], O_RDWR | O_CREAT);
|
int fd = open(argv[1], O_RDWR | O_CREAT, 00777);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
printf("error while trying to create %s\n", argv[1]);
|
printf("error while trying to create %s\n", argv[1]);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -5,5 +5,11 @@ PKG_LICENSE = BSD-3-Clause
|
|||||||
|
|
||||||
include $(RIOTBASE)/pkg/pkg.mk
|
include $(RIOTBASE)/pkg/pkg.mk
|
||||||
|
|
||||||
|
# some variable seem uninitialized to gcc with -Og but are not
|
||||||
|
# https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=may%20be%20used%20uninitialized
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90710#c1
|
||||||
|
CFLAGS += -Wno-maybe-uninitialized
|
||||||
|
|
||||||
all:
|
all:
|
||||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=$(PKG_NAME)
|
"$(MAKE)" -C $(PKG_SOURCE_DIR)/src -f $(RIOTBASE)/Makefile.base MODULE=$(PKG_NAME)
|
||||||
|
|||||||
@ -5,6 +5,12 @@ PKG_LICENSE=EDL-1.0,EPL-1.0
|
|||||||
|
|
||||||
include $(RIOTBASE)/pkg/pkg.mk
|
include $(RIOTBASE)/pkg/pkg.mk
|
||||||
|
|
||||||
|
# some variable seem uninitialized to gcc with -Og but are not
|
||||||
|
# https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=may%20be%20used%20uninitialized
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90710#c1
|
||||||
|
CFLAGS += -Wno-maybe-uninitialized
|
||||||
|
|
||||||
all:
|
all:
|
||||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/core -f $(RIOTBASE)/Makefile.base MODULE=wakaama_core
|
"$(MAKE)" -C $(PKG_SOURCE_DIR)/core -f $(RIOTBASE)/Makefile.base MODULE=wakaama_core
|
||||||
"$(MAKE)" -C $(PKG_SOURCE_DIR)/core/er-coap-13 -f $(RIOTBASE)/Makefile.base MODULE=wakaama_core_coap13
|
"$(MAKE)" -C $(PKG_SOURCE_DIR)/core/er-coap-13 -f $(RIOTBASE)/Makefile.base MODULE=wakaama_core_coap13
|
||||||
|
|||||||
@ -5,6 +5,12 @@ PKG_LICENSE=GPLv2
|
|||||||
|
|
||||||
include $(RIOTBASE)/pkg/pkg.mk
|
include $(RIOTBASE)/pkg/pkg.mk
|
||||||
|
|
||||||
|
# some variable seem uninitialized to gcc with -Og but are not
|
||||||
|
# https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=may%20be%20used%20uninitialized
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42145
|
||||||
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90710#c1
|
||||||
|
CFLAGS += -Wno-maybe-uninitialized
|
||||||
|
|
||||||
.PHONY: wolfcrypt%
|
.PHONY: wolfcrypt%
|
||||||
|
|
||||||
all: $(filter wolfcrypt wolfcrypt-test wolfcrypt-benchmark,$(USEMODULE))
|
all: $(filter wolfcrypt wolfcrypt-test wolfcrypt-benchmark,$(USEMODULE))
|
||||||
|
|||||||
@ -44,10 +44,10 @@ static void test_ieee802154_set_frame_hdr_flags0_non_beacon_non_ack(void)
|
|||||||
const le_uint16_t src_pan = byteorder_htols(0);
|
const le_uint16_t src_pan = byteorder_htols(0);
|
||||||
const le_uint16_t dst_pan = byteorder_htols(0);
|
const le_uint16_t dst_pan = byteorder_htols(0);
|
||||||
const uint8_t flags = IEEE802154_FCF_TYPE_DATA;
|
const uint8_t flags = IEEE802154_FCF_TYPE_DATA;
|
||||||
uint8_t res;
|
uint8_t res[2];
|
||||||
|
|
||||||
TEST_ASSERT_EQUAL_INT(0,
|
TEST_ASSERT_EQUAL_INT(0,
|
||||||
ieee802154_set_frame_hdr(&res, NULL, 0,
|
ieee802154_set_frame_hdr(res, NULL, 0,
|
||||||
NULL, 0,
|
NULL, 0,
|
||||||
src_pan, dst_pan,
|
src_pan, dst_pan,
|
||||||
flags, TEST_UINT8));
|
flags, TEST_UINT8));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user