Skip to content

Commit 1048e36

Browse files
committed
RadioLib: Work around GCC bug
Signed-off-by: Alistair Francis <[email protected]>
1 parent f19c885 commit 1048e36

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

libradio/Makefile

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,39 @@
11
LIBNAME := RadioLib
22

3+
TOCK_USERLAND_BASE_DIR ?= ../
4+
35
$(LIBNAME)_DIR := $(TOCK_USERLAND_BASE_DIR)/libradio/$(LIBNAME)
46

7+
# We ideally want this:
8+
# $(LIBNAME)_SRCS := \
9+
# $($(LIBNAME)_DIR)/src/Module.cpp \
10+
# $(wildcard $($(LIBNAME)_DIR)/src/*.cpp) \
11+
# $(wildcard $($(LIBNAME)_DIR)/src/*/*.cpp) \
12+
# $(wildcard $($(LIBNAME)_DIR)/src/*/*/*.cpp)
13+
#
14+
# But due to this in the GCC arm binary in the CI:
15+
#
16+
# ```
17+
# (insn 179 178 46 8 (set (reg:SI 3 r3 [168])
18+
# (mem/u/c:SI (plus:SI (reg:SI 12 ip [169])
19+
# (unspec:SI [
20+
# (symbol_ref/u:SI ("*.LC1") [flags 0x2])
21+
# ] UNSPEC_PIC_SYM)) [0 S4 A32])) "../../../RadioLib/src/modules/LR11x0/LR11x0.cpp":638:16 929 {*thumb1_movsi_insn}
22+
# (expr_list:REG_EQUAL (symbol_ref/u:SI ("*.LC1") [flags 0x2])
23+
# (nil)))
24+
# during RTL pass: postreload
25+
# ../../../RadioLib/src/modules/LR11x0/LR11x0.cpp:650:1: internal compiler error: in extract_constrain_insn, at recog.c:2195
26+
# ```
27+
#
28+
# we need to drop LR11x0
529
$(LIBNAME)_SRCS := \
630
$(wildcard $($(LIBNAME)_DIR)/src/*.cpp) \
7-
$(wildcard $($(LIBNAME)_DIR)/src/*/*.cpp) \
8-
$(wildcard $($(LIBNAME)_DIR)/src/*/*/*.cpp)
31+
$(wildcard $($(LIBNAME)_DIR)/src/utils/*.cpp) \
32+
$(wildcard $($(LIBNAME)_DIR)/src/modules/C*/.cpp) \
33+
$(wildcard $($(LIBNAME)_DIR)/src/modules/LL*/*.cpp) \
34+
$(wildcard $($(LIBNAME)_DIR)/src/modules/RF*/*.cpp) \
35+
$(wildcard $($(LIBNAME)_DIR)/src/modules/S*/*.cpp) \
36+
$(wildcard $($(LIBNAME)_DIR)/src/modules/n*/*.cpp) \
37+
$(wildcard $($(LIBNAME)_DIR)/src/protocols/*/*.cpp) \
938

1039
include $(TOCK_USERLAND_BASE_DIR)/TockLibrary.mk

0 commit comments

Comments
 (0)